Click here to Skip to main content
15,924,829 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Structure to Function Pin
Chris Losinger29-Jul-02 11:28
professionalChris Losinger29-Jul-02 11:28 
GeneralRe: Structure to Function Pin
Michael P Butler29-Jul-02 10:39
Michael P Butler29-Jul-02 10:39 
GeneralRe: Structure to Function Pin
Todd Smith29-Jul-02 11:45
Todd Smith29-Jul-02 11:45 
GeneralRe: Structure to Function Pin
Joaquín M López Muñoz29-Jul-02 11:55
Joaquín M López Muñoz29-Jul-02 11:55 
GeneralRe: Structure to Function Pin
oscar_r30-Jul-02 2:48
oscar_r30-Jul-02 2:48 
GeneralRe: Structure to Function Pin
perlmunger30-Jul-02 10:56
perlmunger30-Jul-02 10:56 
GeneralTooltips on a CToolbar Pin
Gilfrog29-Jul-02 10:10
Gilfrog29-Jul-02 10:10 
Questionhow to access C..Doc var. from any class ? Pin
Fred D.29-Jul-02 9:54
Fred D.29-Jul-02 9:54 
hi all,

does anybody know a way to access to C..Doc (or C..View) variables from ANY class in a project ?

I've tried :

// in a constructor of another class
CMtsBaseDoc* pDocument = ((CMtsBaseView*)(AfxGetApp()->m_pMainWnd))->pDoc;

// and even this one..
CMtsBaseApp* pApp = (CMtsBaseApp*)AfxGetApp();<br />
CMtsBaseDoc* pDocument = (pApp->GetMyView())->pDoc;    // using GetMyView() from one article in codeproject<br />


but nothing ! I just cannot get the right @ for my pDocument !? 'cos pDoc and pDocument should have the same @... and i get 2 different @

any help

thanx
Fred
AnswerRe: how to access C..Doc var. from any class ? Pin
Hydralisk29-Jul-02 16:47
Hydralisk29-Jul-02 16:47 
GeneralRe: how to access C..Doc var. from any class ? Pin
JennyP29-Jul-02 19:10
JennyP29-Jul-02 19:10 
GeneralRe: how to access C..Doc var. from any class ? Pin
JennyP29-Jul-02 19:33
JennyP29-Jul-02 19:33 
GeneralRe: how to access C..Doc var. from any class ? Pin
Fred D.30-Jul-02 5:01
Fred D.30-Jul-02 5:01 
GeneralRe: how to access C..Doc var. from any class ? Pin
JennyP30-Jul-02 5:54
JennyP30-Jul-02 5:54 
GeneralRe: how to access C..Doc var. from any class ? Pin
JennyP30-Jul-02 17:01
JennyP30-Jul-02 17:01 
GeneralRe: how to access C..Doc var. from any class ? Pin
JennyP30-Jul-02 18:05
JennyP30-Jul-02 18:05 
GeneralRe: how to access C..Doc var. from any class ? Pin
Fred D.31-Jul-02 3:28
Fred D.31-Jul-02 3:28 
GeneralRe: how to access C..Doc var. from any class ? Pin
Hydralisk30-Jul-02 19:07
Hydralisk30-Jul-02 19:07 
GeneralCapture Maximize/Minimize Pin
Tony Fontenot29-Jul-02 9:50
Tony Fontenot29-Jul-02 9:50 
GeneralRe: Capture Maximize/Minimize Pin
Joaquín M López Muñoz29-Jul-02 9:58
Joaquín M López Muñoz29-Jul-02 9:58 
GeneralAlt + F4 Pin
Anonymous29-Jul-02 9:46
Anonymous29-Jul-02 9:46 
GeneralRe: Alt + F4 Pin
Anonymous29-Jul-02 10:04
Anonymous29-Jul-02 10:04 
GeneralRe: Alt + F4 Pin
Roman Nurik29-Jul-02 18:19
Roman Nurik29-Jul-02 18:19 
GeneralRe: Alt + F4 Pin
Alexandru Savescu29-Jul-02 20:38
Alexandru Savescu29-Jul-02 20:38 
GeneralVariable Passing again... Pin
NickOne29-Jul-02 9:38
NickOne29-Jul-02 9:38 
GeneralRe: Variable Passing again... Pin
Joaquín M López Muñoz29-Jul-02 9:49
Joaquín M López Muñoz29-Jul-02 9:49 

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.