Click here to Skip to main content
15,904,288 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers16-Feb-12 19:31
Fred Ackers16-Feb-12 19:31 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep16-Feb-12 23:57
enhzflep16-Feb-12 23:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers19-Feb-12 6:57
Fred Ackers19-Feb-12 6:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep19-Feb-12 12:19
enhzflep19-Feb-12 12:19 
QuestionSending message between objects Pin
aangerma16-Feb-12 9:16
aangerma16-Feb-12 9:16 
QuestionRe: Sending message between objects Pin
David Crow16-Feb-12 10:54
David Crow16-Feb-12 10:54 
AnswerRe: Sending message between objects Pin
aangerma16-Feb-12 19:42
aangerma16-Feb-12 19:42 
AnswerRe: Sending message between objects Pin
Albert Holguin16-Feb-12 18:15
professionalAlbert Holguin16-Feb-12 18:15 
It depends how the objects are subclassed (or derived) and who their parent is. Just about all buttons in MFC are CWnd derived, but their event handlers are usually managed by the parent window (usually some CDialog or some sort of form).

If the second object that you're referring to is another button type of object, that is owned by the same parent window, then it's ok to make direct calls to access the other object. On the other hand, if that other object is in a separate dialog or form, then you should pass a message using SendMessage or PostMessage to the parent window and let it handle the event.

It's going to make quite a big difference as to what these "objects" you are talking about are and who the owner is. A number of different solutions will probably work, but you should be careful and follow framework guidelines as you may end up with an unstable solution.
AnswerRe: Sending message between objects Pin
enhzflep16-Feb-12 18:19
enhzflep16-Feb-12 18:19 
GeneralRe: Sending message between objects Pin
aangerma16-Feb-12 19:57
aangerma16-Feb-12 19:57 
GeneralRe: Sending message between objects Pin
enhzflep16-Feb-12 22:35
enhzflep16-Feb-12 22:35 
AnswerRe: Sending message between objects Pin
JackDingler17-Feb-12 10:35
JackDingler17-Feb-12 10:35 
QuestionControl Multiple Dialog boxes in SDI application Pin
johnjitu16-Feb-12 4:35
johnjitu16-Feb-12 4:35 
GeneralRe: Control Multiple Dialog boxes in SDI application Pin
David Crow16-Feb-12 4:39
David Crow16-Feb-12 4:39 
GeneralRe: Control Multiple Dialog boxes in SDI application Pin
johnjitu16-Feb-12 5:03
johnjitu16-Feb-12 5:03 
SuggestionRe: Control Multiple Dialog boxes in SDI application Pin
David Crow16-Feb-12 5:06
David Crow16-Feb-12 5:06 
Questionhow to add image in SDI Pin
sarfaraznawaz16-Feb-12 2:52
sarfaraznawaz16-Feb-12 2:52 
AnswerRe: how to add image in SDI Pin
Richard MacCutchan16-Feb-12 4:19
mveRichard MacCutchan16-Feb-12 4:19 
QuestionHow to create OLE object for MS Office Pin
LionAM15-Feb-12 23:31
LionAM15-Feb-12 23:31 
AnswerRe: How to create OLE object for MS Office Pin
CPallini16-Feb-12 0:36
mveCPallini16-Feb-12 0:36 
GeneralRe: How to create OLE object for MS Office Pin
LionAM16-Feb-12 4:51
LionAM16-Feb-12 4:51 
GeneralRe: How to create OLE object for MS Office Pin
LionAM16-Feb-12 5:59
LionAM16-Feb-12 5:59 
GeneralRe: How to create OLE object for MS Office Pin
CPallini16-Feb-12 9:23
mveCPallini16-Feb-12 9:23 
GeneralRe: How to create OLE object for MS Office Pin
LionAM16-Feb-12 21:04
LionAM16-Feb-12 21:04 
QuestionMFC Multiple Splitter for MDI Application Pin
SHWRRMSH15-Feb-12 23:29
SHWRRMSH15-Feb-12 23:29 

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.