Click here to Skip to main content
15,881,516 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can someone explain this please Pin
Chris Losinger27-Jan-05 5:38
professionalChris Losinger27-Jan-05 5:38 
GeneralRe: Can someone explain this please Pin
Tom Wright27-Jan-05 5:44
Tom Wright27-Jan-05 5:44 
GeneralRe: Can someone explain this please Pin
Chris Losinger27-Jan-05 5:51
professionalChris Losinger27-Jan-05 5:51 
GeneralRe: Can someone explain this please Pin
Tom Wright27-Jan-05 10:48
Tom Wright27-Jan-05 10:48 
GeneralRe: Can someone explain this please Pin
Chris Losinger27-Jan-05 10:55
professionalChris Losinger27-Jan-05 10:55 
GeneralRe: Can someone explain this please Pin
Tom Wright27-Jan-05 11:09
Tom Wright27-Jan-05 11:09 
GeneralRe: Can someone explain this please Pin
Chris Losinger27-Jan-05 12:07
professionalChris Losinger27-Jan-05 12:07 
GeneralRe: Can someone explain this please Pin
David Crow27-Jan-05 5:42
David Crow27-Jan-05 5:42 
It is casting the return value of AfxGetApp() from a CWinApp* to a CLASendMailApp* so that the LoadSettings() method can be accessed.

In the past, I've always added this to my app's .h file right below the class declaration so that I did not have so many of those casts staring at me:

#define GetSendMailApp() (((CLASendMailApp*)AfxGetApp()))
Then to use it:

CLASendMailApp* sendmail = GetSendMailApp();



"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


GeneralRe: Can someone explain this please Pin
Tom Wright27-Jan-05 5:49
Tom Wright27-Jan-05 5:49 
GeneralRe: Can someone explain this please Pin
David Crow27-Jan-05 5:53
David Crow27-Jan-05 5:53 
GeneralRe: Can someone explain this please Pin
Tom Wright27-Jan-05 10:26
Tom Wright27-Jan-05 10:26 
GeneralDocument order Pin
vineas27-Jan-05 4:33
vineas27-Jan-05 4:33 
GeneralRe: Document order Pin
Neville Franks27-Jan-05 5:57
Neville Franks27-Jan-05 5:57 
GeneralRe: Document order Pin
vineas27-Jan-05 6:31
vineas27-Jan-05 6:31 
Generalmodulus error result Pin
mytz27-Jan-05 3:05
mytz27-Jan-05 3:05 
GeneralRe: modulus error result Pin
Chris Losinger27-Jan-05 3:16
professionalChris Losinger27-Jan-05 3:16 
GeneralRe: modulus error result Pin
Antony M Kancidrowski27-Jan-05 3:17
Antony M Kancidrowski27-Jan-05 3:17 
GeneralRe: modulus error result Pin
Maximilien27-Jan-05 3:17
Maximilien27-Jan-05 3:17 
Generalmodulus prob Pin
mytz27-Jan-05 3:00
mytz27-Jan-05 3:00 
GeneralRe: modulus prob Pin
Chris Losinger27-Jan-05 3:05
professionalChris Losinger27-Jan-05 3:05 
Generalcann't complie .c files in vc++ 6.0 Pin
vikram yadav27-Jan-05 2:38
vikram yadav27-Jan-05 2:38 
GeneralRe: cann't complie .c files in vc++ 6.0 Pin
David Crow27-Jan-05 2:46
David Crow27-Jan-05 2:46 
GeneralRe: cann't complie .c files in vc++ 6.0 Pin
Bob Ciora27-Jan-05 6:10
Bob Ciora27-Jan-05 6:10 
Generalusing modulus... Pin
mytz27-Jan-05 2:35
mytz27-Jan-05 2:35 
GeneralRe: using modulus... Pin
David Crow27-Jan-05 2:49
David Crow27-Jan-05 2: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.