Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS General Discussion » Dialog toolbar missing icons Collapse All
Subject Author Date
Jase Wolfe Apr 17, 2008 - 10:28 AM

I’m placing a toolbar control on a dialog window.  However, the buttons do not display their icons.  The icons do display in the menu properly.  Any suggestions?

 


Here is the code:


 


.h file


CExtToolControlBar   


Technical Support Apr 18, 2008 - 1:22 PM

Your code looks OK. Please let us know whether the CUserManager dialog window is the main application window or it is opened over other window? The menu bar window must be only one in scope of one command profile in the command manager. If your user manager dialog is opened over some other window with a menu bar, the CUserManager class should manage its own command profile having a unique profile name. It should setup a new command profile in the CUserManager::OnInitDialog() method using the g_CmdManager->ProfileSetup(...) code. It should remove its command profile in the CUserManager::OnOK() and CUserManager::OnCancel() methods using the g_CmdManager->ProfileRemove(...) code.

Jase Wolfe Apr 17, 2008 - 10:36 AM

Sorry, I accidently hit post,


 


Here is the code:


.h file


CExtToolControlBar    m_wndToolBar;


 


.cpp file


BOOL CUserManager::OnInitDialog()


{


    if( ! CExtNCW < CExtResizableDialog >::OnInitDialog() )


    {



ASSERT( FALSE );


return FALSE;



    }


    VERIFY(



g_CmdManager->UpdateFromToolBar(


    __PROF_UIS_PROJECT_CMD_PROFILE_NAME,


    IDR_TOOLBAR2


    )


);



    ASSERT( m_wndMenuBar.GetSafeHwnd() != NULL );


    if( ! m_wndMenuBar.LoadMenuBar( IDR_USERADMIN ))


    {



ASSERT( FALSE );


return FALSE;



    }


    m_wndMenuBar.SetBarStyle(



m_wndMenuBar.GetBarStyle() & ~CBRS_GRIPPER


);



    ASSERT( m_wndToolBar.GetSafeHwnd() != NULL );


    if( ! m_wndToolBar.LoadToolBar( IDR_TOOLBAR2 ))


    {



ASSERT( FALSE );


return FALSE;



    }


    m_wndToolBar.SetBarStyle(



m_wndToolBar.GetBarStyle() & ~CBRS_GRIPPER


);



    CWnd::RepositionBars( 0, 0xFFFF, 0 );


    return TRUE;


}