Adding A Toolbox in A dialog box.

This is a discussion on Adding A Toolbox in A dialog box. within the Windows Programming forums, part of the Platform Specific Boards category; How Do I add a Toolbar To A Dialog(Created Using App Wizard) ? I Tried To Create Use The LoadToolbar() ...

  1. #1
    Unregistered
    Guest

    Adding A Toolbox in A dialog box.

    How Do I add a Toolbar To A Dialog(Created Using App Wizard) ?

    I Tried To Create Use The LoadToolbar() Function To Load The Toolbar Resource......Nothing Happen.

    Then I Use The SetButtons() Function To Set The Buttons.........Nothing happen.

    I Tried To Look For Books On How To Add Toolbar To Applications But They All Use The CFrameWnd Class Derived Application To Show It. I Succeed In Adding A toolbar To An Application Derived From CFrameWnd Without Using The App wizard(Just Hand Typed.)

    But Dialog.......I Just Could Not Do it. (So Sad!)

    There Is A Way To Add Toolbar to Dialogs But I Do Not Understand The Given Example In The Msdn CD.

    If You Know How, Can You Explain In Details To Me ?
    I Am Ready To Learn, Just Hopping That Some Expert Is Ready To Teach.

    If You Can Help But Find That This Subject Requires Too Much Space, Please E-Mail To Me At
    bracercom@hotmail.com
    Thank You So Much.

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,854
    Without using some form of C++ or the MFC, toolbars are harder.

    I have one on my MDI main window, not a dialog.
    After I created trhe toolbar in the editor I first fill the TBBUTTON array with the details of the buttons.

    Call
    CreateToolbarEx()
    and SetWindowPos()
    then ShowWindow() and UpdateWindow()
    so it is redrawn.

    As I said all this is on a window not a dialog but they are the steps you need to take.

  3. #3
    Unregistered
    Guest
    I understand your problem !
    Your problem lies in your forgetfulness.
    Your use:

    m_ToolBar.Create(this);
    m_ToolBar.LoadToolBar();

    ============================
    AND THIS!!!!!
    m_ToolBar.MoveWindow(CRect) !
    ============================

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 01:59 PM
  2. Replies: 2
    Last Post: 05-31-2005, 03:02 PM
  3. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 07:00 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

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