Handling WM_ENTERMENULOOP and WM_EXITMENULOOP |
Post Reply |
Author | |
emmanuel
Newbie Joined: 07 February 2007 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 07 February 2007 at 3:00pm |
In a normal MFC app (not using ToolkitPro) you can receive the WM_ENTERMENULOOP and WM_EXITMENULOOP messages through the CFrameWnd derived class. However, this does not appear to be the case with a ToolkitPro MFC app. Is there a way to receive these messages (ideally through the derived CFrameWnd class)?
Thanks
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
No, CommandBars don't have such messages. What do you want implement in such handlers?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
emmanuel
Newbie Joined: 07 February 2007 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Ahh, so these messages are never generated. I'm developing an application that contains a 3D render window (using Direct3D) that is continously rendered to. However, I would like to pause the rendering when the user activates a menu (e.g. File). The standard way of handling this in a D3D app is to pause/unpause the drawing in response to the WM_ENTERMENULOOP and WM_EXITMENULOOP messages. Is there some analogous way of handling this with CommandBars? Thanks again. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
If you have 10.3/10.4 here workaround:
class CMyCommandBars : public CXTPCommandBars
{ DECLARE_DYNCREATE(CMyCommandBars) CMyCommandBars() { m_bTracking = FALSE; } void OnTrackingModeChanged(CXTPCommandBar* pCommandBar, int bMode) { CXTPCommandBars::OnTrackingModeChanged(pCommandBar, bMode); if (bMode && !m_bTracking)
{ m_bTracking = TRUE; GetSite()->SendMessage(WM_ENTERMENULOOP); } else if (!bMode && !GetMouseManager()->IsTrackedLock(0) && m_bTracking) { m_bTracking = FALSE; GetSite()->SendMessage(WM_EXITMENULOOP); } } BOOL m_bTracking;
}; IMPLEMENT_DYNCREATE(CMyCommandBars, CXTPCommandBars) usage:
if (!InitCommandBars(RUNTIME_CLASS(CMyCommandBars)))
return -1; |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
emmanuel
Newbie Joined: 07 February 2007 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
|
That did the trick. Thanks! |
|
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 |