Click here to Skip to main content
15,917,321 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
it's alright i found my mistake : a problem of where i declared the pDocument !

so now this part of code works fine, and i get access to the real values, all good.

PgGPS::PgGPS() : CPropertyPage(PgGPS::IDD)<br />
{<br />
	pDocument = NULL;<br />
	pDocument = (CMtsBaseDoc*)((CMainFrame*)AfxGetApp()->m_pMainWnd)->GetActiveFrame()->GetActiveDocument();<br />
	<br />
	//{{AFX_DATA_INIT(PgGPS)<br />
	//}}AFX_DATA_INIT<br />
}


by doing so in the constructor pDocument, accessible anywhere within the class, allows you to access to all the variables and methods in C..Doc. Cool | :cool:



Fred
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 
GeneralRe: Variable Passing again... Pin
NickOne29-Jul-02 10:26
NickOne29-Jul-02 10:26 
GeneralRe: Variable Passing again... Pin
NickOne29-Jul-02 10:42
NickOne29-Jul-02 10:42 
GeneralKeeping a dialog on top Pin
Tony Fontenot29-Jul-02 8:39
Tony Fontenot29-Jul-02 8:39 
GeneralRe: Keeping a dialog on top Pin
Tomasz Sowinski29-Jul-02 8:46
Tomasz Sowinski29-Jul-02 8:46 
GeneralRe: Keeping a dialog on top Pin
Tony Fontenot29-Jul-02 8:53
Tony Fontenot29-Jul-02 8:53 
GeneralRe: Keeping a dialog on top Pin
Jeremy Falcon29-Jul-02 8:48
professionalJeremy Falcon29-Jul-02 8:48 
Generallimit to # of characters in richEditCtrl Pin
ns29-Jul-02 10:00
ns29-Jul-02 10:00 
GeneralRe: limit to # of characters in richEditCtrl Pin
[James Pullicino]30-Jul-02 2:01
[James Pullicino]30-Jul-02 2:01 

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.