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
Printable View
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.