Pls correct me where I am going wrong,
Created a Tool Bar object in Dialog derived class
Called this in OnCreate of CDialog derived class
Let me know why the tool bar is not getting called.
if (!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))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
Bhargs wrote:
I am able to load a menu directly from the resource editor but can I
get Something like this.
Menu with a arrow
Menu1 \/ Menu2 \/
Also Help me to load a tool bar.
thanks
Bhargavi
Bhargs wrote:
How to load a tool bar and menu in a Dialog Box.
I did create a Dialog box when abutton is clicked .
1)I guess we need to create a variable of CToolBar and use this in
Create,Right !!!
2) For Menu...
Viewer = new CCVDlg();
//Check if new succeeded and we got a valid pointer to a dialog
object
if(Viewer != NULL)
{
BOOL ret = Viewer->Create(IDD_DLG_VIEWER,this);
if(!ret) //Create failed.
AfxMessageBox("Error creating Dialog");
Viewer->ShowWindow(SW_SHOW);
}
else
AfxMessageBox("Error Creating Dialog Object");
Pls guide
Bhargavi