Click here to Skip to main content
15,914,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Overloading the () operator Pin
Nemanja Trifunovic17-Aug-07 6:15
Nemanja Trifunovic17-Aug-07 6:15 
GeneralRe: Overloading the () operator Pin
Yadrif17-Aug-07 8:35
Yadrif17-Aug-07 8:35 
QuestionHandle click on Statusbar Pin
baerten17-Aug-07 4:31
baerten17-Aug-07 4:31 
AnswerRe: Handle click on Statusbar Pin
Emilio Garavaglia17-Aug-07 6:31
Emilio Garavaglia17-Aug-07 6:31 
AnswerRe: Handle click on Statusbar Pin
Hans Dietrich17-Aug-07 8:27
mentorHans Dietrich17-Aug-07 8:27 
QuestionCreating ODBC Driver ( Link and good article Needed ) Pin
ashukasama17-Aug-07 4:07
ashukasama17-Aug-07 4:07 
AnswerRe: Creating ODBC Driver ( Link and good article Needed ) Pin
cmk17-Aug-07 16:58
cmk17-Aug-07 16:58 
QuestionAfxGetApp() Pin
bob1697217-Aug-07 3:45
bob1697217-Aug-07 3:45 
I've been doing this for years...

// When need access to specific item in my derived App class
CSomeApp* pApp=(CSomeApp*)AfxGetApp();
if (pApp) {
// Do something
}

// When need access to just the generic CWinApp class
CWinApp* pApp=AfxGetApp();
if (pApp) {
// Do something
}

Do I really need to check this pointer?

I struggle with the need to check the result from...

CView::GetDocument();
AfxGetApp();

Since CView seems to fail and assert like crazy without a document and the app thingy, well can you really not have something for the app pointer?
AnswerRe: AfxGetApp() Pin
Maxwell Chen17-Aug-07 3:47
Maxwell Chen17-Aug-07 3:47 
AnswerRe: AfxGetApp() Pin
Emilio Garavaglia17-Aug-07 6:36
Emilio Garavaglia17-Aug-07 6:36 
GeneralRe: AfxGetApp() Pin
bob1697217-Aug-07 6:55
bob1697217-Aug-07 6:55 
GeneralRe: AfxGetApp() Pin
Emilio Garavaglia17-Aug-07 7:11
Emilio Garavaglia17-Aug-07 7:11 
GeneralRe: AfxGetApp() Pin
bob1697217-Aug-07 7:40
bob1697217-Aug-07 7:40 
GeneralRe: AfxGetApp() Pin
Maxwell Chen17-Aug-07 9:00
Maxwell Chen17-Aug-07 9:00 
GeneralRe: AfxGetApp() Pin
Gary R. Wheeler18-Aug-07 2:15
Gary R. Wheeler18-Aug-07 2:15 
QuestionApplication crashes please help. Pin
shivditya17-Aug-07 2:31
shivditya17-Aug-07 2:31 
AnswerRe: Application crashes please help. Pin
Arun krishnan17-Aug-07 3:53
Arun krishnan17-Aug-07 3:53 
AnswerRe: Application crashes please help. Pin
Waldermort17-Aug-07 4:01
Waldermort17-Aug-07 4:01 
GeneralRe: Application crashes please help. Pin
shivditya17-Aug-07 22:05
shivditya17-Aug-07 22:05 
GeneralRe: Application crashes please help. Pin
Waldermort17-Aug-07 22:13
Waldermort17-Aug-07 22:13 
GeneralRe: Application crashes please help. Pin
Arun krishnan19-Aug-07 4:20
Arun krishnan19-Aug-07 4:20 
GeneralRe: Application crashes please help. Pin
shivditya21-Aug-07 6:15
shivditya21-Aug-07 6:15 
QuestionFile handling issue Pin
__yash__17-Aug-07 1:09
professional__yash__17-Aug-07 1:09 
AnswerRe: File handling issue Pin
sw@thi17-Aug-07 1:41
sw@thi17-Aug-07 1:41 
AnswerRe: File handling issue Pin
Waldermort17-Aug-07 1:41
Waldermort17-Aug-07 1:41 

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.