Toolbar in CDialog
-
hello, I have a problem ... I want to create a CDialog ... and add to it a toobar i have tried m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); m_wndToolBar.LoadToolBar(IDR_MAINFRAME); where m_wndToolBar is a member of my CDialog class and IDR_MAINFRAME is the resource ID for my toolbar and... this code is in OnInitDialog event ... the functions return OK but the toolbar isn't there .... please help ..... thanks !!!!!!
-
hello, I have a problem ... I want to create a CDialog ... and add to it a toobar i have tried m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); m_wndToolBar.LoadToolBar(IDR_MAINFRAME); where m_wndToolBar is a member of my CDialog class and IDR_MAINFRAME is the resource ID for my toolbar and... this code is in OnInitDialog event ... the functions return OK but the toolbar isn't there .... please help ..... thanks !!!!!!
//add a toolbar to the dialog m_toolBar.CreateEx(this, TBSTYLE_FLAT | TBSTYLE_TRANSPARENT , WS_CHILD |WS_VISIBLE | CBRS_FLOATING ); m_toolBar.LoadToolBar(IDR_TOOLBAR); m_toolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
-
//add a toolbar to the dialog m_toolBar.CreateEx(this, TBSTYLE_FLAT | TBSTYLE_TRANSPARENT , WS_CHILD |WS_VISIBLE | CBRS_FLOATING ); m_toolBar.LoadToolBar(IDR_TOOLBAR); m_toolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);