请问如何重载TForm类的WndProc函数截获消息??
函数中定义: void __fastcall WndProc (TMessage & Message);
void __fastcall TForm1::WndProc(TMessage & Message)
{
//TODO: Add your source code here
switch (Message.Msg)
{
ShowMessage("djk");
case WM_SYSCOMMAND:
if(Message.WParam==SC_MINIMIZE||
Message.WParam==SC_MAXIMIZE||
Message.WParam==SC_RESTORE)
return;
case WM_SIZE:
break;
case WM_USER+1:
TICspAlarmProc *pICspAlarmProc = new TICspAlarmProc;
DWORD idConnect = Message.WParam;
if (pICspAlarmProc) m_pAlarmSvr->Accept(idConnect, pICspAlarmProc);
break; // End case WM_USER+1
}
TForm1::WndProc(Message);
}
为何无法实现截获消息/