-
ToolBar doubt
hi,
using win32 application , i have added menu in constructor of derived framewindow i want to add toolbar, for that i have overriden oncreate() function inside that i have called create() of CToolBar and called LoadToolBar(). inspite of this , the toolbar is not displaying. can u find out the solution for this,
code[]
constructor of framewindow for window creation
CParentWindow::CParentWindow ()
{
Create (NULL, _T ("sample Application"), WS_OVERLAPPEDWINDOW,
rectDefault, NULL, MAKEINTRESOURCE (IDR_MENU1));
}
//
.
.
.
.
.// toolbar creation // not working
void CParentWindow::OnCreate()
{
CToolBar tl;
tl.Create(this, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM,IDR_TOOLBAR1);
tl.LoadBitmap (IDR_TOOLBAR1);
}
code[/]
thanks
-
Re: ToolBar doubt
Try making your toolbar a member. I am betting it is just going out of scope ...
GL
-
Re: ToolBar doubt
only toolbar without a single button(empty) is displaying. i have correctly the toolbar resource with two buttons. anything has to be done to add those buttons. plz give your idea
thanks