cmfctoolbar

How to manually show CMFCToolBarComboBoxButton sub-menu?

你。 提交于 2021-02-11 13:59:50
问题 Standard behaviour for CMFCToolBarComboBoxButton is to have a clickable button plus a drop-down arrow for displaying a submenu. I want to show the submenu independently of where the click was made. How can I do it? My code to create the button is, more or less, the following (it has been extracted from a larger project, so I apologize for any missing not-too-important piece of code): // In class declaration: CMenu m_menu; CMFCToolBar m_toolbar; // Where toolbar initialization takes place: m

How to manually show CMFCToolBarComboBoxButton sub-menu?

余生长醉 提交于 2021-02-11 13:57:31
问题 Standard behaviour for CMFCToolBarComboBoxButton is to have a clickable button plus a drop-down arrow for displaying a submenu. I want to show the submenu independently of where the click was made. How can I do it? My code to create the button is, more or less, the following (it has been extracted from a larger project, so I apologize for any missing not-too-important piece of code): // In class declaration: CMenu m_menu; CMFCToolBar m_toolbar; // Where toolbar initialization takes place: m

MFC: How do you get CMFCToolBarComboBoxButton to show on a CMFCToolBar?

一笑奈何 提交于 2020-06-17 09:33:12
问题 Something I thought would be easy I can't get to work. How do I get a ComboBox to show on the CMFCToolBar ? Here's what I have done that doesn't work (meaning it just shows the original placeholder button with the circle (grayed out)). 1 - I added a button to the toolbar in resource editor giving it the id ID_EDIT_FIND_COMBO (I also put a circle in it just to know it's in use). 2- in CMainFrame I added ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset) to message map and the

How to add description in dynamically created CMFCToolbar's ToolTip?

两盒软妹~` 提交于 2019-12-25 17:14:39
问题 The CMFCToolbar Inherits the function EnableToolTip which does not help the developer if he is creating the toolbar dynamically and not adding the Description and title in resource. I made an extension for CMFCToolBar and wrote a function : BOOL CMFCToolBarEx::OnNeedTipText(UINT /*id*/, NMHDR* pNMH, LRESULT* /*pResult*/) { TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMH; // UINT nID = static_cast<int>(pNMH->idFrom); CString strTip = _T(""); CPoint point; ::GetCursorPos(&point); ScreenToClient(&point)