Click here to Skip to main content
15,895,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRun-time objects and CRuntimeClass Pin
Antti Keskinen1-Nov-03 10:08
Antti Keskinen1-Nov-03 10:08 
GeneralSimple MFC Timer dos not work! Pin
ahmetaa1-Nov-03 8:34
ahmetaa1-Nov-03 8:34 
GeneralRe: Simple MFC Timer dos not work! Pin
Antti Keskinen1-Nov-03 10:55
Antti Keskinen1-Nov-03 10:55 
GeneralRe: Simple MFC Timer dos not work! Pin
ahmetaa1-Nov-03 12:12
ahmetaa1-Nov-03 12:12 
QuestionHow to access a Global variable from another Dialog box. Pin
Deepak Samuel1-Nov-03 7:05
Deepak Samuel1-Nov-03 7:05 
AnswerRe: How to access a Global variable from another Dialog box. Pin
valikac1-Nov-03 7:07
valikac1-Nov-03 7:07 
AnswerRe: How to access a Global variable from another Dialog box. Pin
Terry O'Nolley1-Nov-03 9:51
Terry O'Nolley1-Nov-03 9:51 
GeneralRe: How to access a Global variable from another Dialog box. Pin
Markyg2-Nov-03 15:21
Markyg2-Nov-03 15:21 
In Fact the simplest way to do this is to have a parent class handle the variable so that both dialogs can access the variable, regardless if they are modal or modeless dialogs. For example if both dialogs are displayed from a handler in the MainFrame class, have the mainframe class contain the variable, make the variable public (or better still add functions to get and set the variable), then pass this into the dialog classes when they are created, then either dialog can call GetParent()->(variable name) or GetParent()->(function name).

As an alternative to this you can make a third class that is soley used for holding data (e.g. not a display class), this could then hold the data to change, and both dialogs could hold a pointer to this class and then they can access the variables and functions of that class.

Mark.Smile | :)
GeneralOutlook Automation (C++) Pin
Anonymous1-Nov-03 6:43
Anonymous1-Nov-03 6:43 
GeneralProperly subclassing list box Pin
georgiek501-Nov-03 3:49
georgiek501-Nov-03 3:49 
GeneralRe: Properly subclassing list box Pin
Michael Dunn1-Nov-03 5:45
sitebuilderMichael Dunn1-Nov-03 5:45 
GeneralDisplaying Keyboard hook processes Pin
imranhabib1-Nov-03 3:40
imranhabib1-Nov-03 3:40 
GeneralRe: Displaying Keyboard hook processes Pin
Duncan Edwards Jones1-Nov-03 4:05
professionalDuncan Edwards Jones1-Nov-03 4:05 
GeneralRe: Displaying Keyboard hook processes Pin
imranhabib1-Nov-03 10:15
imranhabib1-Nov-03 10:15 
Generalfrom where can i get shlobj.h for version 5.0 of shell32.dll Pin
User 2155971-Nov-03 3:17
User 2155971-Nov-03 3:17 
GeneralRe: from where can i get shlobj.h for version 5.0 of shell32.dll Pin
Michael Dunn1-Nov-03 5:47
sitebuilderMichael Dunn1-Nov-03 5:47 
GeneralRe: from where can i get shlobj.h for version 5.0 of shell32.dll Pin
User 2155971-Nov-03 19:03
User 2155971-Nov-03 19:03 
GeneralRe: from where can i get shlobj.h for version 5.0 of shell32.dll Pin
Ravi Bhavnani2-Nov-03 8:39
professionalRavi Bhavnani2-Nov-03 8:39 
GeneralMSDN Sample can not run on Window XP. Pin
George21-Nov-03 3:09
George21-Nov-03 3:09 
GeneralCreating a Child Process with Redirected Input and Output Pin
Highersong1-Nov-03 2:12
Highersong1-Nov-03 2:12 
GeneralRe: Creating a Child Process with Redirected Input and Output Pin
includeh101-Nov-03 7:25
includeh101-Nov-03 7:25 
GeneralProblem with multiple instances of Dialog box Pin
Deepak Samuel1-Nov-03 0:07
Deepak Samuel1-Nov-03 0:07 
GeneralRe: Problem with multiple instances of Dialog box Pin
Abhishek Srivastava1-Nov-03 0:18
Abhishek Srivastava1-Nov-03 0:18 
GeneralRe: Problem with multiple instances of Dialog box Pin
Deepak Samuel1-Nov-03 0:31
Deepak Samuel1-Nov-03 0:31 
GeneralProblem with edit box Pin
Deepak Samuel1-Nov-03 0:02
Deepak Samuel1-Nov-03 0:02 

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.