How to get a pointer to the app's toolbar (CToolbar) from inside the view class of a MFC app?
thx.
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 09:52 AM.
GameJolt: https://gamejolt.com/@KasunL
Game Development Youtube: https://is.gd/XyhYoP
Amateur IT Blog: http://everything-geeky.blogspot.com/
(and, sorry for my amateur English)
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.