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 |
|
Colin Brain
|
Jun 21, 2007 - 2:41 AM
|
I’m using ProfUIS 2.70, Visual Studion 6.0 and Windows XP Sp2.
I’m trying to create a dialog-based application, similar to the ProfUIS Controls example, with a menu bar and toolbar. I’ve inserted custom controls for the two bars as per the ’Getting Started’ article. I’ve created a menu and toolbar resource and loaded them as below and called the RepositionBars method at the bottom of InitDialog. When I run (MBCS debug) the two bars aren’t displayed. I’ve included snippets of code below.
Include file:
CExtMenuControlBar m_wndMenuBar ; CExtToolControlBar m_wndToolBar ;
CPP file: OnInitDialog VERIFY( CExtNCW < CExtResizableDialog >::OnInitDialog() );
BOOL CTestBathMatDlg::OnInitDialog() { VERIFY( CExtNCW < CExtResizableDialog >::OnInitDialog() );
ASSERT( m_wndMenuBar.GetSafeHwnd() != NULL ); if( ! m_wndMenuBar.LoadMenuBar( IDR_MENU_FOR_MY_MENUBAR )) { ASSERT( FALSE ); return FALSE; } m_wndMenuBar.SetBarStyle( m_wndMenuBar.GetBarStyle() & ~CBRS_GRIPPER );
ASSERT( m_wndToolBar.GetSafeHwnd() != NULL ); if( ! m_wndToolBar.LoadToolBar(IDR_TOOLBAR_FOR_MY_TOOLBAR)) { ASSERT( FALSE ); return FALSE; } m_wndToolBar.SetBarStyle( m_wndToolBar.GetBarStyle() & ~CBRS_GRIPPER );
. . .
// TODO: Add extra initialization here CWnd::RepositionBars( 0, 0xFFFF, 0 );
return TRUE; // return TRUE unless you set the focus to a control }
I’m sure I’m doing something stupid but can’t see it. Any help please.
|
|
Technical Support
|
Jun 21, 2007 - 4:36 AM
|
Do you have DDX entries added for the menu bar and toolbar?
|
|