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

C / C++ / MFC

 
GeneralRe: Handling First Chance Exception Pin
Stephen Hewitt4-Jan-07 20:15
Stephen Hewitt4-Jan-07 20:15 
GeneralRe: Handling First Chance Exception Pin
Joan M4-Jan-07 20:24
professionalJoan M4-Jan-07 20:24 
GeneralRe: Handling First Chance Exception Pin
Stephen Hewitt4-Jan-07 20:28
Stephen Hewitt4-Jan-07 20:28 
AnswerRe: Handling First Chance Exception Pin
Joan M4-Jan-07 20:08
professionalJoan M4-Jan-07 20:08 
AnswerRe: Handling First Chance Exception Pin
Hamid_RT4-Jan-07 20:11
Hamid_RT4-Jan-07 20:11 
QuestionReturn value Pin
manu_22054-Jan-07 19:26
manu_22054-Jan-07 19:26 
AnswerRe: Return value Pin
Jonathan [Darka]5-Jan-07 0:09
professionalJonathan [Darka]5-Jan-07 0:09 
QuestionMFC Question : (From where AFxWinMain gets CwinApp object) [modified] Pin
jk chan4-Jan-07 18:23
jk chan4-Jan-07 18:23 
Dear all,

Anybody knows from where AfxWinMain gets the CWinApp global object pointer ?
When i looked the MFC source file (winmain.cpp) i can see the following lines.

nt AFXAPI AfxWinMain(..../*params*/)
{

int nReturnCode = -1;
CWinThread* pThread = AfxGetThread();
CWinApp* pApp = AfxGetApp();

}

Surely AfxGetApp() returns that global object. me again looked the AfxGetApp function , it is calling a AfxGetModuleState state function and this function returns the CWinApp object. AfxGetModuleState gets this value from CThreadLocal class's object.

My question is How MFC getting the pointer of my CWinApp derived class object.

Share your ideas please..



-- modified at 0:51 Friday 5th January, 2007

If u can Dream... U can do it

AnswerRe: MFC Question : (From where AFxWinMain gets CwinApp object) Pin
Stephen Hewitt4-Jan-07 19:08
Stephen Hewitt4-Jan-07 19:08 
GeneralRe: MFC Question : (From where AFxWinMain gets CwinApp object) Pin
jk chan4-Jan-07 19:56
jk chan4-Jan-07 19:56 
QuestionNeed help with registry Pin
arbster4-Jan-07 18:22
arbster4-Jan-07 18:22 
AnswerRe: Need help with registry Pin
Hamid_RT4-Jan-07 18:26
Hamid_RT4-Jan-07 18:26 
QuestionRe: Need help with registry Pin
arbster4-Jan-07 19:25
arbster4-Jan-07 19:25 
AnswerRe: Need help with registry Pin
Hamid_RT4-Jan-07 19:49
Hamid_RT4-Jan-07 19:49 
QuestionRe: Need help with registry Pin
prasad_som4-Jan-07 18:28
prasad_som4-Jan-07 18:28 
GeneralRe: Need help with registry Pin
arbster4-Jan-07 19:30
arbster4-Jan-07 19:30 
GeneralRe: Need help with registry Pin
Rajesh R Subramanian4-Jan-07 19:49
professionalRajesh R Subramanian4-Jan-07 19:49 
AnswerRe: Need help with registry Pin
Rajesh R Subramanian4-Jan-07 18:48
professionalRajesh R Subramanian4-Jan-07 18:48 
QuestionRe: Need help with registry Pin
arbster4-Jan-07 19:28
arbster4-Jan-07 19:28 
AnswerRe: Need help with registry Pin
Rajesh R Subramanian4-Jan-07 19:32
professionalRajesh R Subramanian4-Jan-07 19:32 
AnswerRe: Need help with registry Pin
Weiye Chen4-Jan-07 22:43
Weiye Chen4-Jan-07 22:43 
AnswerRe: Need help with registry Pin
S Douglas5-Jan-07 1:26
professionalS Douglas5-Jan-07 1:26 
AnswerRe: Need help with registry Pin
ThatsAlok5-Jan-07 3:01
ThatsAlok5-Jan-07 3:01 
QuestionGS option Pin
rp_suman4-Jan-07 18:18
rp_suman4-Jan-07 18:18 
AnswerRe: GS option Pin
Rajesh R Subramanian4-Jan-07 18:51
professionalRajesh R Subramanian4-Jan-07 18:51 

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.