扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
在本页阅读全文(共9页)
WM_CREATE:
begin
uCXXMsg := RegisterWindowMessage(SELF_MESSAGE_NAME);
end;
WM_RBUTTONDBLCLK: //$0206
PostQuitMessage(0);
WM_COMMAND: //$0111
begin
if lParam = hBtnClose then
begin
if MessageBox(hWnd,PChar('确定要退出【'+CXX_WND_CAPTION+'】吗?'),'确认',MB_YESNO or MB_ICONQUESTION) = IDYES then
PostQuitMessage(0);
end
else if lParam = hBtnCheck then
begin
//CXX_SetProgramTimer(True);
//PostMessage(HWND_BROADCAST,uCXXMsg,0,0);
//SetupHook(True);
CXX_SendCopyData();
end;
end;
WM_PAINT:
begin
dc := BeginPaint(hWnd,ps);
if NOT CXX_DrawBGBitmap(dc,hBGBmp) then
MessageBox(hWnd,'绘制主窗口背景失败呢!','提示',MB_OK or MB_ICONWARNING);
end;
WM_DESTROY:
begin
CXX_SetProgramTimer(false);
Halt; //$0002:
end;
end; //End of Case
Result := DefWindowProc(hWnd,uMsg,wParam,lParam);
end;
//应用程序实例化
function CXX_InitInstance():boolean;
var
wndClass:TWndClass;
begin
hInstMain := hInstance;
hCur := LoadCursor(hInstMain,'HANDLE');
if hCur = 0 then
MessageBox(hWndMain,'加载主窗口背景图片失败!!!','提示',MB_OK or MB_ICONWARNING)
else
SetCursor(hCur);
hBGBmp := LoadBitmap(hInstMain,'BACKBMP');
if hBGBmp = 0 then
MessageBox(hWndMain,'加载主窗口背景图片失败!!!','提示',MB_OK or MB_ICONWARNING);
wndClass.cbClsExtra := 0;
wndClass.cbWndExtra := 0;
wndClass.hInstance := hInstMain;
wndClass.hIcon := 0;
wndClass.hCursor := LoadCursor(0,IDC_HAND);
wndClass.hbrBackground := CTLCOLOR_EDIT;
wndClass.lpfnWndProc := @CXX_MainWindowProc;
wndClass.lpszClassName := CXX_WND_CLASS;
wndClass.lpszMenuName := nil;
wndClass.style := CS_DBLCLKS;
Result := Boolean(RegisterClassA(wndClass));
end;
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者