WM_CONTEXTMENU消息产生的原因不光是收到WM_RBUTTONUP,还可能是WM_NCRBUTTONUP,还可能是按下了SHIFT+F10如果你只需要鼠标右键客户区时弹出菜单,可以只响应WM_RBUTTONUP其他区别在于:nRButtonDown 中的参数point 是相对与窗口的左上角坐标(relative to the upper-left corner of the window.MSDN)OnContextMenu 中的参数point 是屏幕坐标(Position of the cursor, in screen coordinates)