Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to write a game called"globule beats brick"using VC++6.0 or Visual Studio 2003 in SDI? Pin
Eytukan12-Jun-08 6:36
Eytukan12-Jun-08 6:36 
AnswerRe: How to write a game called"globule beats brick"using VC++6.0 or Visual Studio 2003 in SDI? Pin
youareabigboy13-Jun-08 3:28
youareabigboy13-Jun-08 3:28 
GeneralRe: How to write a game called"globule beats brick"using VC++6.0 or Visual Studio 2003 in SDI? Pin
Nelek12-Jun-08 5:44
protectorNelek12-Jun-08 5:44 
AnswerRe: How to write a game called"globule beats brick"using VC++6.0 or Visual Studio 2003 in SDI? Pin
bulg12-Jun-08 14:20
bulg12-Jun-08 14:20 
GeneralRe: How to write a game called"globule beats brick"using VC++6.0 or Visual Studio 2003 in SDI? Pin
bulg12-Jun-08 14:21
bulg12-Jun-08 14:21 
QuestionWhy CWinApp in a Win32 console Pin
BadKarma12-Jun-08 2:12
BadKarma12-Jun-08 2:12 
AnswerRe: Why CWinApp in a Win32 console Pin
Graham Bradshaw12-Jun-08 2:40
Graham Bradshaw12-Jun-08 2:40 
AnswerRe: Why CWinApp in a Win32 console [modified] Pin
Nibu babu thomas12-Jun-08 2:45
Nibu babu thomas12-Jun-08 2:45 
BadKarma wrote:
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))


BadKarma wrote:
Why is this? The CWinApp object theApp is never used. What does it do?


Look up CWinApp constructor and then step into AfxWinInit, you will see that it needs a CWinApp object, see the call AfxGetApp(). AfxGetApp is able to get an application pointer due the following line in the CWinApp constructor.

pModuleState->m_pCurrentWinApp = this;

Some MFC specific initialization is also done in these functions and stored in thread local storage. This happens in AfxTls.cpp line number 100, comes via AfxClassInit().


Nibu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

modified on Thursday, June 12, 2008 8:51 AM

Questioncouldn't install vc++ 2008? Pin
gentleguy12-Jun-08 1:56
gentleguy12-Jun-08 1:56 
QuestionRe: couldn't install vc++ 2008? Pin
CPallini12-Jun-08 2:39
mveCPallini12-Jun-08 2:39 
AnswerRe: couldn't install vc++ 2008? Pin
theCPkid12-Jun-08 3:06
theCPkid12-Jun-08 3:06 
AnswerRe: couldn't install vc++ 2008? Pin
Mark Salsbery12-Jun-08 6:11
Mark Salsbery12-Jun-08 6:11 
GeneralRe: couldn't install vc++ 2008? Pin
led mike12-Jun-08 6:48
led mike12-Jun-08 6:48 
QuestionHow to search and delete a file Pin
Shirani12-Jun-08 1:18
Shirani12-Jun-08 1:18 
AnswerRe: How to search and delete a file Pin
_AnsHUMAN_ 12-Jun-08 1:44
_AnsHUMAN_ 12-Jun-08 1:44 
AnswerRe: How to search and delete a file Pin
vijay_aroli12-Jun-08 2:36
vijay_aroli12-Jun-08 2:36 
GeneralRe: How to search and delete a file Pin
Shirani12-Jun-08 6:39
Shirani12-Jun-08 6:39 
GeneralRe: How to search and delete a file Pin
Eytukan12-Jun-08 7:52
Eytukan12-Jun-08 7:52 
QuestionAfxCallWndProc and custom control development Pin
sawerr12-Jun-08 1:11
sawerr12-Jun-08 1:11 
QuestionHow can I get byte pointers to give CString values ? Pin
SherTeks12-Jun-08 0:56
SherTeks12-Jun-08 0:56 
AnswerRe: How can I get byte pointers to give CString values ? Pin
SandipG 12-Jun-08 2:09
SandipG 12-Jun-08 2:09 
GeneralRe: How can I get byte pointers to give CString values ? Pin
RockyJames12-Jun-08 2:12
RockyJames12-Jun-08 2:12 
GeneralRe: How can I get byte pointers to give CString values ? Pin
SandipG 12-Jun-08 2:16
SandipG 12-Jun-08 2:16 
GeneralRe: How can I get byte pointers to give CString values ? Pin
RockyJames12-Jun-08 3:11
RockyJames12-Jun-08 3:11 
AnswerRe: How can I get byte pointers to give CString values ? Pin
SherTeks12-Jun-08 21:26
SherTeks12-Jun-08 21:26 

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.