function IsHintMsg(var Msg: TMsg): Boolean; virtual;
Description
Call IsHintMsg to determine whether the message specified by the Msg parameter requires hiding the hint window. Upon seeing a mouse, keyboard, command, or activation message, IsHintMsg returns True. The global Application object calls IsHintMsg to check messages while the hint window is on the screen, and hides the window if IsHintMsg returns True.
function WindowProc(hWnd, uMsg, wParam, lParam: Integer): Integer; stdcall;
begin
Result := DefWindowProc(hWnd, uMsg, wParam, lParam);
{ Checks for messages }
if (lParam = Button1) and (uMsg = WM_COMMAND) then
CheckPassword;
if uMsg = WM_DESTROY then
Halt;
end;
这个呀,我给你一段我写的C的代码,你看吧,其实DELPHI只是封装了一些消息处理或其它的东西罢了:
LRESULT CTopEisKeyboardCtrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
switch(message)
{
case WM_ACTIVATE:
MSG msg;
wParam=WA_INACTIVE;
msg.wParam=wParam;
msg.lParam=wParam;
msg.message=message;
msg.hwnd=hwnd;
DispatchMessage(&msg);
break;
case WM_MOUSEACTIVATE: