Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to post WM_COMMAND to Specified window.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to post WM_COMMAND to Specified window.

 Post Reply Post Reply
Author
Message
ledled View Drop Down
Newbie
Newbie


Joined: 18 November 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote ledled Quote  Post ReplyReply Direct Link To This Post 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;
            VERIFY(menu.LoadMenu(IDM_POPUP));
            CMenu* pPopup = menu.GetSubMenu(0);
CXTPCommandBars::TrackPopupMenu(pPopup, (TPM_RECURSE | TPM_RIGHTBUTTON | TPM_NONOTIFY | TPM_RETURNCMD), pos.x, pos.y, m_pParentWnd);
              break;
       }
   }
}
Back to Top
ledled View Drop Down
Newbie
Newbie


Joined: 18 November 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote ledled Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 9:37pm
sorry it forgot to say.
 
CreateControl message was able to be received by this code.

Back to Top
ledled View Drop Down
Newbie
Newbie


Joined: 18 November 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote ledled Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 10:37pm

It self-solved it.

TPM_RETURNCMD was unnecessary.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.