Click here to Skip to main content
15,902,869 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A List in memory... Pin
John M. Drescher8-Aug-03 13:10
John M. Drescher8-Aug-03 13:10 
Questionhow can I access variable in View class from my dialog member function? Pin
mr20037-Aug-03 12:23
mr20037-Aug-03 12:23 
AnswerRe: how can I access variable in View class from my dialog member function? Pin
John M. Drescher7-Aug-03 12:33
John M. Drescher7-Aug-03 12:33 
GeneralRe: how can I access variable in View class from my dialog member function? Pin
mr20037-Aug-03 13:28
mr20037-Aug-03 13:28 
GeneralRe: how can I access variable in View class from my dialog member function? Pin
John M. Drescher7-Aug-03 13:31
John M. Drescher7-Aug-03 13:31 
GeneralRe: how can I access variable in View class from my dialog member function? Pin
mr20037-Aug-03 13:48
mr20037-Aug-03 13:48 
GeneralRe: how can I access variable in View class from my dialog member function? Pin
Maximilien7-Aug-03 14:23
Maximilien7-Aug-03 14:23 
GeneralRe: how can I access variable in View class from my dialog member function? Pin
John M. Drescher7-Aug-03 15:41
John M. Drescher7-Aug-03 15:41 
So the dialog is created in the view or the doc?

I assume it is the view.
Add variable to your dialog
class CMyDialog : public CDialog
{
public:
CMyView* m_pMyView;
// The rest of the dialog code goes here

}


Then in our view
// I assume this is the code that you show the dialog after the correct menu button is pushed

CMyView::OnMenuButtonPushed()
{
CMyDialog dlg;

dlg.m_pMyView = this;
dlg.DoModal();

}




John
AnswerRe: how can I access variable in View class from my dialog member function? Pin
PremL8-Aug-03 5:31
PremL8-Aug-03 5:31 
Generalrand ( ) Pin
DaveE9th7-Aug-03 12:08
DaveE9th7-Aug-03 12:08 
GeneralRe: rand ( ) Pin
Bob Stanneveld7-Aug-03 12:19
Bob Stanneveld7-Aug-03 12:19 
GeneralRe: rand ( ) Pin
DaveE9th7-Aug-03 13:13
DaveE9th7-Aug-03 13:13 
GeneralRe: rand ( ) Pin
John M. Drescher7-Aug-03 13:26
John M. Drescher7-Aug-03 13:26 
GeneralRe: rand ( ) Pin
Bob Stanneveld7-Aug-03 21:41
Bob Stanneveld7-Aug-03 21:41 
GeneralRe: rand ( ) Pin
Joe Woodbury7-Aug-03 12:23
professionalJoe Woodbury7-Aug-03 12:23 
GeneralRe: rand ( ) Pin
DaveE9th7-Aug-03 12:27
DaveE9th7-Aug-03 12:27 
GeneralRe: rand ( ) Pin
DaveE9th7-Aug-03 13:32
DaveE9th7-Aug-03 13:32 
GeneralRe: rand ( ) Pin
kochhar7-Aug-03 18:56
kochhar7-Aug-03 18:56 
GeneralRe: rand ( ) Pin
DaveE9th7-Aug-03 19:30
DaveE9th7-Aug-03 19:30 
GeneralCFile problem Pin
DougW487-Aug-03 11:21
DougW487-Aug-03 11:21 
GeneralRe: CFile problem Pin
Bob Stanneveld7-Aug-03 12:13
Bob Stanneveld7-Aug-03 12:13 
GeneralRe: CFile problem Pin
DougW487-Aug-03 13:22
DougW487-Aug-03 13:22 
GeneralRe: CFile problem Pin
Ryan Binns7-Aug-03 13:30
Ryan Binns7-Aug-03 13:30 
QuestionHow to reset Timers Pin
gc_17-Aug-03 10:58
gc_17-Aug-03 10:58 
AnswerRe: How to reset Timers Pin
PJ Arends7-Aug-03 11:22
professionalPJ Arends7-Aug-03 11:22 

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.