首先看看MS对Visual Styles的解释: Windows XP and later operating systems support a feature called visual styles that enables the appearance of common controls Read More
posted @ 2016-03-31 18:02 findumars Views(670) Comments(0) Diggs(0)
击标题栏右边的关闭按钮“红叉”时,程序会向窗口发送WM_CLOSE消息,因此可以截取此消息在窗口关系前做一些提示或者是不允许点击时关闭程序 [cpp] view plain copy case WM_CLOSE: if (...) { PostQuitMessage(WM_QUIT); return Read More
posted @ 2016-03-31 17:58 findumars Views(403) Comments(0) Diggs(0)
在WM_KEYDOWN中处理F10(VK_F10)消息总是获取不到,后来用spy++监听窗口消息发现按下F10并没有WM_KEYDOWN消息产生,而是产生了WM_SYSKEYDOWN http://blog.csdn.net/x356982611/article/details/46636507 Read More
posted @ 2016-03-31 17:53 findumars Views(382) Comments(0) Diggs(0)
[cpp] view plain copy [cpp] view plain copy #include "stdafx.h" #include "delay.h" void DoEvents() { MSG msg; while (PeekMessage(&msg, (HWND)NULL, 0,  Read More
posted @ 2016-03-31 17:52 findumars Views(1139) Comments(0) Diggs(0)
前提:WM_NCHITTEST是很重要的,只要鼠标在活动,Windows无时无刻在发这个消息进行探测。 虽然WndProc具有优先权,但是却刻意调用了inherited WndProc(Message);,因此会首先执行TWinControl.WMNCHitTest,如果发现是透明并且能找到一个TC Read More
posted @ 2016-03-31 16:32 findumars Views(1457) Comments(0) Diggs(0)