#2
IPV62007-08-24 08:40
|
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
TForm1::WndProc(TMessage &Message);
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void_fastcall TForm1::WndProc(TMessage &Message)
{
switch(Message.msg)
{
case WM_WINDONWPSCHAGING:
if (LPWINDOWPOS(Message.LParam)->y<20)
LPWINDOWPOS(Message.LParam)->y=0;
if (LPWINDOWPOS(Message.LParam)->x<100)
LPWINDOWPOS(Message.LParam)->x=0;
break;
}
TForm1::WndProc(Message);
}
错误:
[C++ Error] Unit1.cpp(11): E2316 'TForm1::WndProc(TMessage &)' is not a member of 'TForm1'
[C++ Error] Unit1.cpp(19): E2141 Declaration syntax error