现在的位置: 首页 > 综合 > 正文

WM_PARENTNOTIFY消息

2012年01月02日 ⁄ 综合 ⁄ 共 553字 ⁄ 字号 评论关闭

当子窗口被建立,销毁或用户单击鼠标键时,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

抱歉!评论已关闭.