标签:case hwnd cas get 点击 window div 鼠标 .com
API模板:https://www.cnblogs.com/eternalmoonbeam/p/10793080.html
点击回应:
switch (message) { …… case WM_LBUTTONUP://当鼠标左键弹起 MessageBox(NULL, TEXT("I was clicked"), TEXT("Client"), MB_OK); return 0; …… }
关闭确认:
switch (message) { …… case WM_CLOSE://点击关闭按键时 if (MessageBox(hwnd, TEXT("Really want to quit?"), TEXT("Request confirming"), MB_YESNO) == IDYES) DestroyWindow(hwnd); else return 0; …… }
获取设备环境句柄:
hdc = GetDC(hwnd); //这里放置代码,此方法不需要响应WM_PAINT ReleaseDC(hwnd, hdc);
标签:case hwnd cas get 点击 window div 鼠标 .com
原文地址:https://www.cnblogs.com/eternalmoonbeam/p/10798537.html