Click here to Skip to main content
15,910,277 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmulti-processes's memory sharing problem? Pin
nenfa3-Dec-09 19:45
nenfa3-Dec-09 19:45 
QuestionRe: multi-processes's memory sharing problem? Pin
norish3-Dec-09 22:12
norish3-Dec-09 22:12 
AnswerRe: multi-processes's memory sharing problem? Pin
Michael Schubert4-Dec-09 5:25
Michael Schubert4-Dec-09 5:25 
GeneralRe: multi-processes's memory sharing problem? Pin
nenfa7-Dec-09 20:08
nenfa7-Dec-09 20:08 
QuestionAccessing Dialog member Variable problem Pin
kamalilam3-Dec-09 19:30
kamalilam3-Dec-09 19:30 
AnswerRe: Accessing Dialog member Variable problem Pin
«_Superman_»3-Dec-09 19:40
professional«_Superman_»3-Dec-09 19:40 
AnswerRe: Accessing Dialog member Variable problem Pin
Madhu Nair3-Dec-09 19:44
Madhu Nair3-Dec-09 19:44 
AnswerRe: Accessing Dialog member Variable problem Pin
Cedric Moonen3-Dec-09 20:10
Cedric Moonen3-Dec-09 20:10 
The same way you would do for any other classes. Your CDialog and CDocument classes are still classes and they follow the same rules as normal classes. So, to be able to access a variable from a CDialog object, you first need to have an instance of that class (e.g. CDialog myDialog, in which case myDialog is your instance). Then your CDocument needs to be able to access that variable (if he create the instance, then he already owns it and can use it). Finally, the members you want to access in your dialog class have to be accessible, which means either they are public or you provide a getter method for them.

But this is really basic C++ knowledge, I suggest you take some time to read and understand the concept of classes, because that's exactly what it is here. It's not because those classes are document and dialog classes that they do not follow the standard rules of C++.

Cédric Moonen
Software developer

Charting control [v2.0]
OpenGL game tutorial in C++

AnswerRe: Accessing Dialog member Variable problem Pin
Rajesh R Subramanian3-Dec-09 21:14
professionalRajesh R Subramanian3-Dec-09 21:14 
QuestionWhich window has the focus [modified] Pin
SujayG3-Dec-09 18:17
SujayG3-Dec-09 18:17 
AnswerRe: Which window has the focus Pin
«_Superman_»3-Dec-09 18:21
professional«_Superman_»3-Dec-09 18:21 
GeneralRe: Which window has the focus Pin
SujayG3-Dec-09 18:31
SujayG3-Dec-09 18:31 
GeneralRe: Which window has the focus [modified] Pin
Madhu Nair3-Dec-09 19:28
Madhu Nair3-Dec-09 19:28 
AnswerRe: Which window has the focus Pin
vasu_sri3-Dec-09 20:18
vasu_sri3-Dec-09 20:18 
QuestionIs there a convenient way to change a System environment variable in MFC? Pin
Erik3-Dec-09 18:16
Erik3-Dec-09 18:16 
AnswerRe: Is there a convenient way to change a System environment variable in MFC? Pin
T21023-Dec-09 19:27
T21023-Dec-09 19:27 
GeneralRe: Is there a convenient way to change a System environment variable in MFC? Pin
Erik3-Dec-09 23:36
Erik3-Dec-09 23:36 
QuestionRe: Is there a convenient way to change a System environment variable in MFC? Pin
David Crow4-Dec-09 3:41
David Crow4-Dec-09 3:41 
Questionwhy RES file contain ICO file path? Pin
HOW WHAT3-Dec-09 17:06
HOW WHAT3-Dec-09 17:06 
AnswerRe: why RES file contain ICO file path? [modified] Pin
Adam Roderick J3-Dec-09 17:14
Adam Roderick J3-Dec-09 17:14 
Questionerror LNK2001: unresolved external symbol _wWinMain@16 Pin
includeh103-Dec-09 15:32
includeh103-Dec-09 15:32 
QuestionRe: error LNK2001: unresolved external symbol _wWinMain@16 Pin
David Crow3-Dec-09 16:02
David Crow3-Dec-09 16:02 
AnswerRe: error LNK2001: unresolved external symbol _wWinMain@16 Pin
Adam Roderick J3-Dec-09 17:06
Adam Roderick J3-Dec-09 17:06 
Questionload bitmap into memory [modified] Pin
transoft3-Dec-09 11:54
transoft3-Dec-09 11:54 
AnswerRe: load bitmap into memory Pin
«_Superman_»3-Dec-09 13:04
professional«_Superman_»3-Dec-09 13:04 

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.