Click here to Skip to main content
15,847,549 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers16-Feb-12 20:31
Fred Ackers16-Feb-12 20:31 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep17-Feb-12 0:57
enhzflep17-Feb-12 0:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
Fred Ackers19-Feb-12 7:57
Fred Ackers19-Feb-12 7:57 
GeneralRe: WebSockets in native C++ (not managed) Pin
enhzflep19-Feb-12 13:19
enhzflep19-Feb-12 13:19 
QuestionSending message between objects Pin
aangerma16-Feb-12 10:16
aangerma16-Feb-12 10:16 
QuestionRe: Sending message between objects Pin
David Crow16-Feb-12 11:54
David Crow16-Feb-12 11:54 
AnswerRe: Sending message between objects Pin
aangerma16-Feb-12 20:42
aangerma16-Feb-12 20:42 
AnswerRe: Sending message between objects Pin
Albert Holguin16-Feb-12 19:15
professionalAlbert Holguin16-Feb-12 19: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 19:19
enhzflep16-Feb-12 19:19 
GeneralRe: Sending message between objects Pin
aangerma16-Feb-12 20:57
aangerma16-Feb-12 20:57 
GeneralRe: Sending message between objects Pin
enhzflep16-Feb-12 23:35
enhzflep16-Feb-12 23:35 
AnswerRe: Sending message between objects Pin
JackDingler17-Feb-12 11:35
JackDingler17-Feb-12 11:35 
QuestionControl Multiple Dialog boxes in SDI application Pin
johnjitu16-Feb-12 5:35
johnjitu16-Feb-12 5:35 
GeneralRe: Control Multiple Dialog boxes in SDI application Pin
David Crow16-Feb-12 5:39
David Crow16-Feb-12 5:39 
GeneralRe: Control Multiple Dialog boxes in SDI application Pin
johnjitu16-Feb-12 6:03
johnjitu16-Feb-12 6:03 
SuggestionRe: Control Multiple Dialog boxes in SDI application Pin
David Crow16-Feb-12 6:06
David Crow16-Feb-12 6:06 
Questionhow to add image in SDI Pin
sarfaraznawaz16-Feb-12 3:52
sarfaraznawaz16-Feb-12 3:52 
AnswerRe: how to add image in SDI Pin
Richard MacCutchan16-Feb-12 5:19
mveRichard MacCutchan16-Feb-12 5:19 
QuestionHow to create OLE object for MS Office Pin
LionAM16-Feb-12 0:31
LionAM16-Feb-12 0:31 
AnswerRe: How to create OLE object for MS Office Pin
CPallini16-Feb-12 1:36
mveCPallini16-Feb-12 1:36 
GeneralRe: How to create OLE object for MS Office Pin
LionAM16-Feb-12 5:51
LionAM16-Feb-12 5:51 
GeneralRe: How to create OLE object for MS Office Pin
LionAM16-Feb-12 6:59
LionAM16-Feb-12 6:59 
GeneralRe: How to create OLE object for MS Office Pin
CPallini16-Feb-12 10:23
mveCPallini16-Feb-12 10:23 
GeneralRe: How to create OLE object for MS Office Pin
LionAM16-Feb-12 22:04
LionAM16-Feb-12 22:04 
QuestionMFC Multiple Splitter for MDI Application Pin
SHWRRMSH16-Feb-12 0:29
SHWRRMSH16-Feb-12 0: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.