Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CString class Pin
David Crow23-Mar-05 7:56
David Crow23-Mar-05 7:56 
GeneralRe: CString class Pin
toxcct23-Mar-05 8:37
toxcct23-Mar-05 8:37 
GeneralRe: CString class Pin
Michael Dunn23-Mar-05 14:23
sitebuilderMichael Dunn23-Mar-05 14:23 
GeneralEvents in MFC... Pin
anderslundsgard23-Mar-05 5:06
anderslundsgard23-Mar-05 5:06 
GeneralRe: Events in MFC... Pin
David Crow23-Mar-05 5:39
David Crow23-Mar-05 5:39 
GeneralRe: Events in MFC... Pin
anderslundsgard23-Mar-05 7:51
anderslundsgard23-Mar-05 7:51 
GeneralRe: Events in MFC... Pin
David Crow23-Mar-05 7:54
David Crow23-Mar-05 7:54 
GeneralRe: Events in MFC... Pin
Maximilien23-Mar-05 8:10
Maximilien23-Mar-05 8:10 
depending on the relation between A and B there are numerous ways of "catching" events ...

if A and B know each other ( i.e. A includes a pointer/reference to B, or vice-versa ), you can directly call methods from A to B ( or vice-versa )

if A and B do not know each other ( or you don't want to make them know each other ), you can make them inherit from CCmdTarget and use SendMessage/PostMessage and handle your user message in each class

if you don't want to have a dependency on MFC/Win32, you could use one form of the Observer Pattern to register each class as either observer or observable to send message between them.



Maximilien Lincourt
Your Head A Splode - Strong Bad
GeneralRe: Events in MFC... Pin
anderslundsgard23-Mar-05 9:39
anderslundsgard23-Mar-05 9:39 
GeneralRe: Events in MFC... Pin
PJ Arends23-Mar-05 11:03
professionalPJ Arends23-Mar-05 11:03 
GeneralRe: Events in MFC... Pin
anderslundsgard25-Mar-05 4:55
anderslundsgard25-Mar-05 4:55 
GeneralPrinting in MFC Pin
Ziggy Short23-Mar-05 4:20
Ziggy Short23-Mar-05 4:20 
GeneralRe: Printing in MFC Pin
David Crow23-Mar-05 5:35
David Crow23-Mar-05 5:35 
Generalcontext menus in visual studio 6 Pin
sumo6923-Mar-05 3:50
sumo6923-Mar-05 3:50 
GeneralRe: context menus in visual studio 6 Pin
YaronNir23-Mar-05 4:31
YaronNir23-Mar-05 4:31 
GeneralRe: context menus in visual studio 6 Pin
sumo6923-Mar-05 5:24
sumo6923-Mar-05 5:24 
GeneralInno setup question Pin
YaronNir23-Mar-05 3:46
YaronNir23-Mar-05 3:46 
GeneralRe: Inno setup question Pin
JohnJ23-Mar-05 4:26
JohnJ23-Mar-05 4:26 
GeneralRe: Inno setup question Pin
YaronNir23-Mar-05 4:29
YaronNir23-Mar-05 4:29 
GeneralVideo/Audio Format Pin
Anonymous23-Mar-05 3:18
Anonymous23-Mar-05 3:18 
GeneralRe: Video/Audio Format Pin
David Crow23-Mar-05 3:31
David Crow23-Mar-05 3:31 
GeneralRe: Video/Audio Format Pin
Dragos1979200223-Mar-05 10:10
Dragos1979200223-Mar-05 10:10 
GeneralRe: Video/Audio Format Pin
David Crow23-Mar-05 10:24
David Crow23-Mar-05 10:24 
GeneralGetting a control's absolute position and size at runtime Pin
eJyo23-Mar-05 2:25
eJyo23-Mar-05 2:25 
GeneralRe: Getting a control's absolute position and size at runtime Pin
Ravi Bhavnani23-Mar-05 2:34
professionalRavi Bhavnani23-Mar-05 2:34 

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.