CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: ToolBar doubt

  1. #1
    Join Date
    Sep 2005
    Location
    Chennai,India
    Posts
    60

    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

  2. #2
    Join Date
    Jul 2003
    Posts
    147

    Re: ToolBar doubt

    Try making your toolbar a member. I am betting it is just going out of scope ...

    GL

  3. #3
    Join Date
    Sep 2005
    Location
    Chennai,India
    Posts
    60

    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
  •  





Click Here to Expand Forum to Full Width

Featured