这连个有什么区别啊?分别用在什么场合下呢?

解决方案 »

  1.   

    NC 指的是非客户区。就是边框上,标题栏上。
     OnNcMouseMove 鼠标在非客户区上发生移动时的消息响应。
    OnNcHitTest 非客户区上的点击测试,击中测试。
      

  2.   

    The framework calls this member function for the CWnd object that contains the cursor (or the CWnd object that used the SetCapture member function to capture the mouse input) every time the mouse is moved.MSDN上这样说,貌似不是点击测试,只要移动就会触发。而且我测试时再客户区移动鼠标都会触发。很不明白
      

  3.   

    顺便问个问题,非客户区如何刷新?invalidate()刷新的都是客户区,我怎么找也没找到非客户区刷新在哪里,只能自己调用OnNcPaint()解决了……
      

  4.   

     OnNcHitTest 这个比较高级。。你可在OnNcHitTest 你们设定返回值,来告诉 OnNcMouseMove ,你正在HT_CAPTION,还是HT_MENU,还是其他什么地方移动鼠标的,很有用的哦。。