CMFCToolBarComboBoxButton dont work on some machines
-
Hi i created a Combobox Button in toolbar. It working fine in my machine. But when i testing it on other machines not all but some with win 10 and 7. It case to stop running application.
ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
{
UINT uiToolBarId = (UINT)wp;switch (uiToolBarId) { case IDR\_MAINFRAME: case IDR\_MAINFRAME\_256: {
CMFCToolBarComboBoxButton comboButton(ID_COMBO, GetCmdMgr()->GetCmdImage(ID_COMBO, FALSE), CBS_DROPDOWNLIST);
comboButton.AddItem(_T("opt 1"));
comboButton.AddItem(_T("opt 2"));
comboButton.AddItem(_T("opt 3"));comboButton.SelectItem(0);
m_wndToolBar.ReplaceButton(ID_COMBO, comboButton);} break; } return 0;
}
Im out of ideas How to make it working.
-
Hi i created a Combobox Button in toolbar. It working fine in my machine. But when i testing it on other machines not all but some with win 10 and 7. It case to stop running application.
ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
{
UINT uiToolBarId = (UINT)wp;switch (uiToolBarId) { case IDR\_MAINFRAME: case IDR\_MAINFRAME\_256: {
CMFCToolBarComboBoxButton comboButton(ID_COMBO, GetCmdMgr()->GetCmdImage(ID_COMBO, FALSE), CBS_DROPDOWNLIST);
comboButton.AddItem(_T("opt 1"));
comboButton.AddItem(_T("opt 2"));
comboButton.AddItem(_T("opt 3"));comboButton.SelectItem(0);
m_wndToolBar.ReplaceButton(ID_COMBO, comboButton);} break; } return 0;
}
Im out of ideas How to make it working.
-
vojtee wrote:
How to make it working.
The first thing you need to do is to find out why it is "not working", and explain exactly what "not working" means. Without that information it is impossible to help.
I cant describe it better than not working :). So i have 2 application. In first app that code is included and in second app that code is not included. First application don't work on some machines but on thers works fine. Windows do not generate any error. It just start and close immediately. Second app working fine everywhere.
-
I cant describe it better than not working :). So i have 2 application. In first app that code is included and in second app that code is not included. First application don't work on some machines but on thers works fine. Windows do not generate any error. It just start and close immediately. Second app working fine everywhere.
-
Hi i created a Combobox Button in toolbar. It working fine in my machine. But when i testing it on other machines not all but some with win 10 and 7. It case to stop running application.
ON_REGISTERED_MESSAGE(AFX_WM_RESETTOOLBAR, OnToolbarReset)
LRESULT CMainFrame::OnToolbarReset(WPARAM wp, LPARAM)
{
UINT uiToolBarId = (UINT)wp;switch (uiToolBarId) { case IDR\_MAINFRAME: case IDR\_MAINFRAME\_256: {
CMFCToolBarComboBoxButton comboButton(ID_COMBO, GetCmdMgr()->GetCmdImage(ID_COMBO, FALSE), CBS_DROPDOWNLIST);
comboButton.AddItem(_T("opt 1"));
comboButton.AddItem(_T("opt 2"));
comboButton.AddItem(_T("opt 3"));comboButton.SelectItem(0);
m_wndToolBar.ReplaceButton(ID_COMBO, comboButton);} break; } return 0;
}
Im out of ideas How to make it working.