howto put toolbar to dialog app

This is a discussion on howto put toolbar to dialog app within the Windows Programming forums, part of the Platform Specific Boards category; how do i put a tool bar into my dialog based application CToolBar * t_bar = new CToolBar(); t_bar->CreateEx(this, TBSTYLE_FLAT, ...

  1. #1
    arunkrsharma
    Guest

    Unhappy howto put toolbar to dialog app

    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

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    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 01: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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dialog Box error
    By JJFMJR in forum Windows Programming
    Replies: 4
    Last Post: 09-04-2007, 07:51 AM
  2. Parent of a BrowseForFolder dialog box
    By @nthony in forum Windows Programming
    Replies: 4
    Last Post: 01-08-2007, 01:54 PM
  3. Splitting a dialog up into multiple classes
    By Just in forum Windows Programming
    Replies: 1
    Last Post: 05-29-2005, 11:11 PM
  4. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  5. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 11:01 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21