WM_PARENTNOTIFY消息


当子窗口被建立,销毁或用户单击鼠标键时,WM_PARENTNOTIFY被发送
使用如下:

LRESULT WINAPI xxx_WndProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
switch(uMsg)
{ HANDLE_MSG(hwnd,WM_PARENTNOTIFY, xxxx_OnParentNotify); }
return( DefWindowProc(hwnd,uMsg,wParam,lParam)); } void xxx_OnParentNotify(HWND hwnd, UINT msg, HWND hwndChild, int idChild) { switch(msg)
{
case WM_RBUTTONDOWN: //when the user clicks the right mouse button over the eidt window, //the system notifies the parent window by sending the //WM_PARENTNOTIFY message.once here ,we enter "peer" mode. break; }
}

更多: http://msdn.microsoft.com/en-us/library/ms632638(v=vs.85).aspx


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM