Pointer to the toolbar

This is a discussion on Pointer to the toolbar within the Windows Programming forums, part of the Platform Specific Boards category; How to get a pointer to the app's toolbar (CToolbar) from inside the view class of a MFC app? thx....

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    374

    Pointer to the toolbar

    How to get a pointer to the app's toolbar (CToolbar) from inside the view class of a MFC app?
    thx.
    Last edited by geek@02; 11-14-2006 at 08:52 AM.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    The toolbar is not handled by the view class. It is handled by CFrameWnd which also handles docking. You can get a pointer to it by using AfxGetMainWnd() and typecasting the pointer to the type of your CFrameWnd derived class.

    From there you can access CFrameWnd base class public funtions and data via the pointer as well as your derived class's public functions and data.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10:10 AM
  2. Quick Pointer Question
    By gwarf420 in forum C Programming
    Replies: 15
    Last Post: 06-01-2008, 03:47 PM
  3. Parameter passing with pointer to pointer
    By notsure in forum C++ Programming
    Replies: 15
    Last Post: 08-12-2006, 07:12 AM
  4. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM

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