Click here to Skip to main content
15,885,366 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: About opengl screen shot is black Pin
Richard MacCutchan16-Jul-12 23:29
mveRichard MacCutchan16-Jul-12 23:29 
AnswerRe: About opengl screen shot is black Pin
Software_Developer17-Jul-12 3:48
Software_Developer17-Jul-12 3:48 
QuestionBasic / standard MFC VC6.0 CListCtrl questions Pin
Vaclav_16-Jul-12 10:02
Vaclav_16-Jul-12 10:02 
AnswerRe: Basic / standard MFC VC6.0 CListCtrl questions Pin
Jochen Arndt16-Jul-12 21:09
professionalJochen Arndt16-Jul-12 21:09 
GeneralRe: Basic / standard MFC VC6.0 CListCtrl questions Pin
Vaclav_17-Jul-12 3:23
Vaclav_17-Jul-12 3:23 
GeneralRe: Basic / standard MFC VC6.0 CListCtrl questions Pin
Jochen Arndt17-Jul-12 3:33
professionalJochen Arndt17-Jul-12 3:33 
GeneralSOLVED Basic / standard MFC VC6.0 CListCtrl questions Pin
Vaclav_18-Jul-12 3:47
Vaclav_18-Jul-12 3:47 
QuestionCMFCToolbar EnableReflections : how is it supposed to work ? Pin
Maximilien16-Jul-12 9:26
Maximilien16-Jul-12 9:26 
I'm trying to understand how the CMFCToolbar works when adding controls in it, in particular adding a CMFCToolBarComboBoxButton.

I can create the toobar and add the combo box button (in the handler of AFX_WM_RESETTOOLBAR) and add the message to handle it :

C++
ON_COMMAND(ID_COMBOBOX, OnComboBox)
ON_CBN_SELENDOK(ID_COMBOBOX, OnComboBox)


In that case the messages are handled in the document class.

Now, I'd like to be able to handle the message in the toolbar class (to have less clutter in the document or main frame classes).

So, I create a new toolbar class derived from CMFCToolbar (still able to add the combobox and handle the message if in the document class)

Now, I'm not certain what message I need to handle, seems I tried everyone of them (I've read TN062 on msdn).

I tried enabling the reflection on the toolbar :

m_myToolbar.EnableReflections(TRUE);


documentation for the above says : "Call this method to enable command reflection for toolbar buttons that contain embedded controls, such as combo boxes."

I've also tried to use the method CMFCToolbar::SetRouteCommandsViaFrame, but it does not seems to do anything interesting.

googling and binging does not return useful hits.

Anyone able to use that as expected ? or am I completely clueless and I'm not reading/understanding the documentation ?

Thanks

Max.
Watched code never compiles.

AnswerRe: CMFCToolbar EnableReflections : how is it supposed to work ? Pin
Eugen Podsypalnikov16-Jul-12 23:10
Eugen Podsypalnikov16-Jul-12 23:10 
Questionwhy no virtual constructor? Pin
shanmugarajaa16-Jul-12 3:34
shanmugarajaa16-Jul-12 3:34 
AnswerRe: why no virtual constructor? Pin
sanjaylk16-Jul-12 3:54
sanjaylk16-Jul-12 3:54 
GeneralRe: why no virtual constructor? Pin
Stefan_Lang16-Jul-12 22:07
Stefan_Lang16-Jul-12 22:07 
AnswerRe: why no virtual constructor? PinPopular
jschell16-Jul-12 6:01
jschell16-Jul-12 6:01 
GeneralRe: why no virtual constructor? Pin
Stefan_Lang16-Jul-12 22:08
Stefan_Lang16-Jul-12 22:08 
AnswerRe: why no virtual constructor? Pin
Chris Losinger16-Jul-12 7:02
professionalChris Losinger16-Jul-12 7:02 
AnswerRe: why no virtual constructor? Pin
David Crow16-Jul-12 7:06
David Crow16-Jul-12 7:06 
GeneralRe: why no virtual constructor? Pin
jschell16-Jul-12 10:49
jschell16-Jul-12 10:49 
AnswerRe: why no virtual constructor? Pin
Mattias Högström16-Jul-12 11:34
Mattias Högström16-Jul-12 11:34 
GeneralRe: why no virtual constructor? Pin
Stefan_Lang16-Jul-12 22:29
Stefan_Lang16-Jul-12 22:29 
GeneralRe: why no virtual constructor? Pin
Mattias Högström17-Jul-12 0:38
Mattias Högström17-Jul-12 0:38 
GeneralRe: why no virtual constructor? Pin
Stefan_Lang17-Jul-12 2:00
Stefan_Lang17-Jul-12 2:00 
GeneralRe: why no virtual constructor? Pin
Mattias Högström17-Jul-12 10:07
Mattias Högström17-Jul-12 10:07 
JokeRe: why no virtual constructor? Pin
Albert Holguin17-Jul-12 12:19
professionalAlbert Holguin17-Jul-12 12:19 
GeneralRe: why no virtual constructor? Pin
jschell20-Jul-12 6:52
jschell20-Jul-12 6:52 
GeneralRe: why no virtual constructor? Pin
Mattias Högström20-Jul-12 7:33
Mattias Högström20-Jul-12 7:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.