how do i put a tool bar into my dialog based application
CToolBar * t_bar = new CToolBar();
t_bar->CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE );
t_bar->LoadToolBar(IDR_TOOLBAR1);
but the tool bar just doesn't seems to load ... thanx a lot
how do i put a tool bar into my dialog based application
CToolBar * t_bar = new CToolBar();
t_bar->CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE );
t_bar->LoadToolBar(IDR_TOOLBAR1);
but the tool bar just doesn't seems to load ... thanx a lot
Try
t_bar->LoadToolBar(MAKEINTRESOURCE(IDR_TOOLBAR1));
if you created a toolbar with the resource editor.
OR
try casting the HMENU of CreateWindowEx() as the ID of the toolbar if you create it 'on the fly'
ie (HMENU)IDR_TOOLBAR
check that you have used ShowWindow(), UpdateWindow() after creating the toolbar.
Last edited by novacain; 11-20-2001 at 02:08 AM.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill