Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtPopupMenuWnd::g_nMsgPopupDrawLeftArea question Collapse All
Subject Author Date
Matthew Fraser Apr 26, 2007 - 11:05 PM

Hi!!

I got the following message map.
OnExtMenuPrepare and OnDrawPopupMenuItem method are called
but OnDrawPopupLeftArea method is not called.
I just followed an example given.

Any idea ?

Thanks.



BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
///

ON_REGISTERED_MESSAGE(CExtPopupMenuWnd::g_nMsgPrepareMenu, OnExtMenuPrepare)
ON_REGISTERED_MESSAGE(CExtPopupMenuWnd::g_nMsgPopupDrawItem, OnDrawPopupMenuItem)
ON_REGISTERED_MESSAGE(CExtPopupMenuWnd::g_nMsgPopupDrawLeftArea, OnDrawPopupLeftArea)
END_MESSAGE_MAP()

Technical Support Apr 27, 2007 - 11:46 AM

The popup menus displayed from the menu bar in your application send their notification messages to the main frame window only and you should resend the needed messages to the active MDI child frame manually and exactly as it is demonstrated in the DRAWCLI sample. The context menus send their messages to the window handle which was specified when invoking the CExtPopupMenuWnd::CreatePopupMenu(), CExtPopupMenuWnd::LoadMenu() or CExtPopupMenuWnd::UpdateFromMenu() methods.



Suhai Gyorgy Apr 27, 2007 - 1:56 AM

g_nMsgPopupDrawLeftArea message is sent only if you give a width for the left area:

CExtPopupMenuWnd * pPopup = new CExtPopupMenuWnd;
    pPopup->SetLeftAreaWidth( 30 );


Another thing: this left area is not the area where the icons of the command items are displayed, but some additional left area drawn when the width of it is set with SetLeftAreaWidth. Hope that helps.