能不能先说明你到底要做什么,如果你真的不想截获,调用ReleaseCapture就可以了。
解决方案 »
- GDI+能设置Bitmap的Alpha值吗?
- 求方案:关于流媒体采集
- VS系列中,怎样禁用单个文件的所有断点?
- INSERT INTO table_name(column1,column2,...) VALUES (value1,value2, ...) 问题,原来的问题没有解决,再次求解,请大家帮忙。
- 关于利用DLL 进行进程间通信的问题.
- (菜鸟)如果构造函数中条件不满足,想在构造函数中让正在构造的实例析构掉,内存释放掉
- 这个问题大家看看怎么解决,可能很简单的问题,我钻进死胡同了!
- 对话框是不是不能多重嵌套?
- 我该怎么样停止循环?
- 如何实现数据文件偏移几个BIT读取?
- class view中找不到类怎么办
- SDI中加滚动条:将CView改为 CScrollView已经不现实.我现在已用代码将其显示出来,但不能使用,请问各位如何才能激活它?
就使用WH_MOUSE类型的钩子,在钩子函数中判断当前窗口的位置,如果鼠标在标题上就屏蔽鼠标消息即可。
可具体查看SetWindowsHookEx()API,那里有较为详细的说明
yPos = HIWORD(lParam); // vertical position of cursor 返回值就是 xPos, yPos 在窗口的什么位置,你返回什么Windows就认为是什么
比如 xPos, yPos 在 Client 区,你却返回 HTCAPTION 那就认为是在标题栏,可以
用鼠标托走窗口,如果在标题区,你返回的是 HTCLIENT 就认为是在 Client 区
返回值包括以下值:HTBORDER In the border of a window that does not have a sizing border
HTBOTTOM In the lower horizontal border of a window
HTBOTTOMLEFT In the lower-left corner of a window border
HTBOTTOMRIGHT In the lower-right corner of a window border
HTCAPTION In a title bar
HTCLIENT In a client area
HTERROR On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error)
HTGROWBOX In a size box (same as HTSIZE)
HTHSCROLL In a horizontal scroll bar
HTLEFT In the left border of a window
HTMENU In a menu
HTNOWHERE On the screen background or on a dividing line between windows
HTREDUCE In a Minimize button
HTRIGHT In the right border of a window
HTSIZE In a size box (same as HTGROWBOX)
HTSYSMENU In a System menu or in a Close button in a child window
HTTOP In the upper horizontal border of a window
HTTOPLEFT In the upper-left corner of a window border
HTTOPRIGHT In the upper right corner of a window border
HTTRANSPARENT In a window currently covered by another window
HTVSCROLL In the vertical scroll bar
HTZOOM In a Maximize button
是不是我没有说清楚,我的意思是,在Windows中,当窗口在窗口模式(非最大化或最小化)时当你用鼠标指向标题栏,按住鼠标的左键不放,这时窗口的其他消息 如:
WM_TIMER,等都不响应,这样一来,窗口该刷新的不刷新,该滚动的没滚动。
follow is my reason:
there is only one message handling cycle as we know.
it can not deal the next messaege before end one message
in the GUI thread. I advice you make a work thread. and
use the waitforsingleobject to enumlate a wm_timer.
good lucky
Jansen Zhu.