|
-
October 6th, 2005, 10:19 AM
#1
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
-
October 6th, 2005, 12:12 PM
#2
Re: ToolBar doubt
Try making your toolbar a member. I am betting it is just going out of scope ...
GL
-
October 6th, 2005, 12:44 PM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|