Toolbar sends certain messages to an owner window. This set of messages
includes WM_COMMAND.
Combo box sends notification messages to a parent window using command
message.
Ergo, you can handle any notification from combo in main frame window that
owns tool bar or any object that is included in MFC command message routing
mechanism.
You can use variety of approaches:
OnCmdMsg
OnCommand
And if you are interested in any particular notification code (sel changed)
use macro:
ON_CBN_SELCHANGE.
Again you can map ON_CBN_SELCHANGE to any object that is included in MFC
command message routing mechanism.
--
RainMan
Post by Z.K.Thanks for the info. Actually, I did something similar. I grab the data in
an onselect function in the toolbar class and then I wrote a few helper
functions that are accessible from the MainFrame pointer to access my data.
Z.K.
Post by DrewOr should I have said a GetToolbarCombo() method.
Drew
Post by Z.K.I added a combobox in my toolbar, but how do I get access to the combobox
from the formview class without making the toolbar variable in MainFrm.cpp
public?
Z.K.