|
|
|
|
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 |
|
Delver Medina
|
May 31, 2006 - 9:16 AM
|
Cannot seem to create a new Menu. Have added all the code. edited the .rc file.
I can see the bitmaps I have added when I pull down the section on IDR_MAINFRAME up top and I see the option for the menu I have created when I right click on an existing menu. But when I chose it nothing happens and it does not show up as clicked or selected. I have tried to duplicate the code of the other existing menu.
//funnybars.rc String table
IDS_STRING160 160 Show or hide the Annotation toolbar\nToggle Annotation ToolBar
////////////////////////////////////////////////////// //MainFrm.h
CExtToolControlBar m_PictometryAnnotationTools;
////////////////////////////////////////////////////// //MainFrm.cpp
// 1
ON_COMMAND_EX(IDS_STRING160, OnBarCheck ) ON_UPDATE_COMMAND_UI(IDS_STRING160, OnUpdateControlBarMenu)
// 2 if( (! m_AnnotationTools.Create( _T("Annotation Tools (24 bits 44x40 buttons)"), this, IDS_STRING160 ) ) || (! m_AnnotationTools.LoadToolBar(IDR_TOOLBAR5)) ) { TRACE0("Failed to create true-color toolbar\n"); return -1; // fail to create }
// 3
int nCount = m_AnnotationTools.GetButtonsCount(); for( int i = 0; i < nCount; i++ ) { CExtBarButton * pTBB = m_AnnotationTools.GetButton( i );
}
// 4
m_AnnotationTools.EnableDocking(CBRS_ALIGN_ANY);
// 5
DockControlBar( &m_AnnotationTools, AFX_IDW_DOCKBAR_TOP );
|
|
Delver Medina
|
May 31, 2006 - 9:17 AM
|
typo on the last
////////////////////////////////////////////////////// //MainFrm.h
CExtToolControlBar m_AnnotationTools;
|
|
Technical Support
|
Jun 1, 2006 - 3:08 AM
|
There is not enough information in your message to come to any conclusion about the problem. Could you send us the modified version of the sample project?
|
|
Delver Medina
|
Jun 1, 2006 - 8:19 AM
|
|
|
Technical Support
|
Jun 1, 2006 - 1:30 PM
|
Yes, we received your project and replied you by email.
|
|
Delver Medina
|
Jun 1, 2006 - 6:49 AM
|
|
|
Technical Support
|
Jun 1, 2006 - 1:25 PM
|
|
|