能不能先说明你到底要做什么,如果你真的不想截获,调用ReleaseCapture就可以了。

解决方案 »

  1.   

    用Windows钩子最好的。
    就使用WH_MOUSE类型的钩子,在钩子函数中判断当前窗口的位置,如果鼠标在标题上就屏蔽鼠标消息即可。
    可具体查看SetWindowsHookEx()API,那里有较为详细的说明
      

  2.   

    可以截Windows消息 WM_NCHITTEST xPos = LOWORD(lParam);  // horizontal position of cursor 
    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
      

  3.   

    各位大虾:
        是不是我没有说清楚,我的意思是,在Windows中,当窗口在窗口模式(非最大化或最小化)时当你用鼠标指向标题栏,按住鼠标的左键不放,这时窗口的其他消息 如:
    WM_TIMER,等都不响应,这样一来,窗口该刷新的不刷新,该滚动的没滚动。
      

  4.   

    I think it is impossible for a normal application.
    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.