Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: swap two values withou using temp. storage Pin
Kenneth Kasajian23-Jul-10 14:40
Kenneth Kasajian23-Jul-10 14:40 
AnswerRe: swap two values withou using temp. storage Pin
manjulameganathan23-Jul-10 18:00
manjulameganathan23-Jul-10 18:00 
AnswerRe: swap two values withou using temp. storage Pin
Jigar Sheth25-Jul-10 20:38
Jigar Sheth25-Jul-10 20:38 
QuestionWaveInOpen Help?? Pin
AmbiguousName21-Jul-10 19:36
AmbiguousName21-Jul-10 19:36 
AnswerRe: WaveInOpen Help?? Pin
«_Superman_»21-Jul-10 19:38
professional«_Superman_»21-Jul-10 19:38 
QuestionHow can disable a subitem where i use COutlook2Ctrl::OCL_SELECT? Pin
Le@rner21-Jul-10 19:23
Le@rner21-Jul-10 19:23 
Questionhow Does CWinApp realize the singleton pattern? Pin
zxjun8421-Jul-10 18:54
zxjun8421-Jul-10 18:54 
AnswerRe: how Does CWinApp realize the singleton pattern? Pin
«_Superman_»21-Jul-10 19:45
professional«_Superman_»21-Jul-10 19:45 
The CWinApp class is not a singleton class.
It doesn't need to be because MFC needs this class has to be created before it internally calls WinMain.

If it was designed as a singleton, you would be able to create it only after WinMain in called and also you would need to write WinMain yourself.

That is why you create a global instance of it and you must create only one as the documentation says.
This is as easy as saying that you can only have one main or WinMain function.
«_Superman

I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++)

Polymorphism in C







GeneralRe: how Does CWinApp realize the singleton pattern? Pin
zxjun8421-Jul-10 20:39
zxjun8421-Jul-10 20:39 
GeneralRe: how Does CWinApp realize the singleton pattern? Pin
«_Superman_»21-Jul-10 21:26
professional«_Superman_»21-Jul-10 21:26 
GeneralRe: how Does CWinApp realize the singleton pattern? Pin
zxjun8421-Jul-10 22:18
zxjun8421-Jul-10 22:18 
Questionproblem between OS of 32bit ans 64 bits Pin
xjh_sz21-Jul-10 15:03
xjh_sz21-Jul-10 15:03 
AnswerRe: problem between OS of 32bit ans 64 bits Pin
«_Superman_»21-Jul-10 19:53
professional«_Superman_»21-Jul-10 19:53 
QuestionCrash Window on Close [modified] Pin
Fareed Rizkalla21-Jul-10 14:10
Fareed Rizkalla21-Jul-10 14:10 
AnswerRe: Crash Window on Close Pin
«_Superman_»21-Jul-10 20:00
professional«_Superman_»21-Jul-10 20:00 
AnswerRe: Crash Window on Close Pin
ThatsAlok22-Jul-10 0:35
ThatsAlok22-Jul-10 0:35 
QuestionMemory Leak Pin
Fareed Rizkalla21-Jul-10 13:36
Fareed Rizkalla21-Jul-10 13:36 
JokeRe: Memory Leak Pin
Maximilien21-Jul-10 13:54
Maximilien21-Jul-10 13:54 
GeneralRe: Memory Leak Pin
Fareed Rizkalla21-Jul-10 14:08
Fareed Rizkalla21-Jul-10 14:08 
AnswerRe: Memory Leak Pin
Aescleal21-Jul-10 22:14
Aescleal21-Jul-10 22:14 
GeneralRe: Memory Leak Pin
David Crow22-Jul-10 3:03
David Crow22-Jul-10 3:03 
QuestionCTabCtrl color background Problem [modified] Pin
etipaq21-Jul-10 5:50
etipaq21-Jul-10 5:50 
AnswerRe: CTabCtrl color background Problem Pin
Niklas L21-Jul-10 10:12
Niklas L21-Jul-10 10:12 
JokeRe: CTabCtrl color background Problem Pin
Code-o-mat21-Jul-10 10:34
Code-o-mat21-Jul-10 10:34 
GeneralRe: CTabCtrl color background Problem Pin
Niklas L21-Jul-10 10:54
Niklas L21-Jul-10 10:54 

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.