主题:高手进来看看这个程序错误在哪啊?
Unit.h的程序
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
private:
// User declarations
public:
// User declarations
_fastcall TForm1(TComponent*Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
Unit.cpp的程序
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
void__fastcall TForm::WndProc(TMessage &Message)--提示这里错拉,但不知怎么改
{
if (Message.Msg==WM_GETMINMAXINFO)
{
LPMINMAXINFO lpmmi=(LPMINMAXINFO)Message.LParam;
lpmmi->ptMaxSize.x=300;
lpmmi->ptMaxSize.y=200;
lpmmi->ptMaxPosition.x=Left;
lpmmi->ptMaxPosition.y=Top;
lpmmi->ptMaxTrackSize.x=300;
lpmmi->ptMaxTrackSize.y=200;
lpmmi->ptMinTrackSize.x=200;
lpmmi->ptMinTrackSize.y=100;
Labell->Caption="Width="+AnsiString(Width)+
"Height"+AnsiString(Height);
}
TForm::WndProc(Message);
}
它老是说有错,错在哪啊?怎么改啊?
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
private:
// User declarations
public:
// User declarations
_fastcall TForm1(TComponent*Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
Unit.cpp的程序
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
void__fastcall TForm::WndProc(TMessage &Message)--提示这里错拉,但不知怎么改
{
if (Message.Msg==WM_GETMINMAXINFO)
{
LPMINMAXINFO lpmmi=(LPMINMAXINFO)Message.LParam;
lpmmi->ptMaxSize.x=300;
lpmmi->ptMaxSize.y=200;
lpmmi->ptMaxPosition.x=Left;
lpmmi->ptMaxPosition.y=Top;
lpmmi->ptMaxTrackSize.x=300;
lpmmi->ptMaxTrackSize.y=200;
lpmmi->ptMinTrackSize.x=200;
lpmmi->ptMinTrackSize.y=100;
Labell->Caption="Width="+AnsiString(Width)+
"Height"+AnsiString(Height);
}
TForm::WndProc(Message);
}
它老是说有错,错在哪啊?怎么改啊?