S
steve_tiger_03
Guest
I'm having issue when I try to find any menu items in my CMFCMenuBar control (Feature Pack).
In my CMainFrame::OnCreate() function, I have
if( !m_wndMenuBar.Create( this ) )
{
TRACE0( "Failed to create menubar\n" );
return -1; // fail to create
}
m_wndMenuBar.SetPaneStyle( m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC | CBRS_TOOLTIPS | CBRS_FLYBY );
Everything is ok, but when I try
int index = m_wndMenuBar.CommandToIndex( IDM_H_DYNMENU );
index = m_wndMenuBar.CommandToIndex( IDM_T_VERSION );
index = m_wndMenuBar.CommandToIndex( IDM_F_PRINT );
All of the index values are -1, these IDs are existed in the menu. Is there anything that I missed? Is it because the actual toolbar doesn't match with the menu?
The menu shows correct all menu items.
Thanks,
Steve
Continue reading...
In my CMainFrame::OnCreate() function, I have
if( !m_wndMenuBar.Create( this ) )
{
TRACE0( "Failed to create menubar\n" );
return -1; // fail to create
}
m_wndMenuBar.SetPaneStyle( m_wndMenuBar.GetPaneStyle() | CBRS_SIZE_DYNAMIC | CBRS_TOOLTIPS | CBRS_FLYBY );
Everything is ok, but when I try
int index = m_wndMenuBar.CommandToIndex( IDM_H_DYNMENU );
index = m_wndMenuBar.CommandToIndex( IDM_T_VERSION );
index = m_wndMenuBar.CommandToIndex( IDM_F_PRINT );
All of the index values are -1, these IDs are existed in the menu. Is there anything that I missed? Is it because the actual toolbar doesn't match with the menu?
The menu shows correct all menu items.
Thanks,
Steve
Continue reading...