Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Stephan Finkler
|
May 13, 2005 - 6:48 AM
|
Hi, I’ve got an built in ComboBox in a toolbar. The project is a MDI Doc/View.
How can I fill the combobox with data from the doc/view? How can I tell the doc/view which item the user has selected in the combobox?
I tried to something like that:
CMainFrame::OnPopupListBoxInitContent { ... CFrameWnd* pActiveFrame = GetActiveFrame( ); if (pActiveFrame != NULL) { CDocument *pActiveDoc = pActiveFrame->GetActiveDocument();
wndListBox.AddString(pActiveDoc->GetString() ); } }
In OnTextFieldInplaceTextSet *pActiveDoc->SetString(); Is there a better way or have you got a sample for that?
Thanks for any advice.
|
|
Technical Support
|
May 13, 2005 - 8:04 AM
|
You initialize a built-in combo box correctly. Although design of the built-in combo box is a bit complicated, it allows your users to have multiple copies of a particular combo box. This design is essential for the customization system.
|
|