|
|
|
|
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.
Subject |
Author |
Date |
|
Matthew Fraser
|
Apr 23, 2007 - 12:47 AM
|
Hi!!
If I got the following codes, how to increase the width of a popup menu ?
---------------------------------------------------------------------------------------------
LRESULT CChildFrame::OnExtMenuPrepare(WPARAM wParam, LPARAM lParam) { CExtPopupMenuWnd::MsgPrepareMenuData_t * pData = reinterpret_cast < CExtPopupMenuWnd::MsgPrepareMenuData_t * > ( wParam ); ASSERT( pData != NULL ); CExtPopupMenuWnd * pPopup = pData->m_pPopup; ASSERT( pPopup != NULL );
// Here...I can, of course, use pPopup (which points a popup menu) // I want to increase and extend its width here...
Any comment would be very very welcome. Thanks in advance.
|
|
Technical Support
|
Apr 23, 2007 - 9:48 AM
|
You can insert one or more space characters at the beginning/end of a menu item. You can also add the left area to the menu as it is demonstrated in the ProfUIS_Controls sample. Please let us know more details about this? Why do you need a larger menu than that provided by the currently installed paint manager by default?
|
|
Matthew Fraser
|
Apr 24, 2007 - 3:44 AM
|
As it is a dynamic popup menu, I don’t know the length of some menu items. If the length of a menu item is short enough, it is no problem. But what-if it is long... At the moment, around 10 characters can be shown. The remaining characters are shown like dot dot dot (...) or nothing being shown. So I just need to increase its width.
Thanks.
|
|
Technical Support
|
Apr 25, 2007 - 2:48 AM
|
We guess the following line is missing in your CChildFrame::OnExtMenuPrepare() method: pData->m_bMenuChanged = true; This causes that the popup menu’s layout is not recomputed after you have initialized it dynamically.
|
|