![]() |
How to post WM_COMMAND to Specified window. |
Post Reply
|
| Author | |
ledled
Newbie
Joined: 18 November 2007 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Topic: How to post WM_COMMAND to Specified window.Posted: 16 April 2008 at 9:29pm |
|
Hi, I want the WM_COMMAND message in the post to m_pParentWnd.
But, it is not possible to receive it by this code.
How is WM_COMMAND of the menu click posted in the window of Specified?------------------------------
LRESULT XX::OnTaskPanelNotify(WPARAM wParam, LPARAM lParam)
{ switch (wParam) {
case XTP_TPN_RCLICK:
{ CPoint pos;
GetCursorPos(&pos); CMenu menu; CMenu* pPopup = menu.GetSubMenu(0);
VERIFY(menu.LoadMenu(IDM_POPUP)); CXTPCommandBars::TrackPopupMenu(pPopup, (TPM_RECURSE | TPM_RIGHTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD), pos.x, pos.y, m_pParentWnd);
break;
}
}
}
|
|
![]() |
|
ledled
Newbie
Joined: 18 November 2007 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 April 2008 at 9:37pm |
|
sorry it forgot to say.
CreateControl message was able to be received by this code. |
|
![]() |
|
ledled
Newbie
Joined: 18 November 2007 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 April 2008 at 10:37pm |
|
It self-solved it. TPM_RETURNCMD was unnecessary. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |