Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How can CString be converted to LPCTSTR without any operator()? Pin
Dean Seo24-Jul-11 2:10
Dean Seo24-Jul-11 2:10 
AnswerRe: How can CString be converted to LPCTSTR without any operator()? Pin
Rajesh R Subramanian24-Jul-11 3:20
professionalRajesh R Subramanian24-Jul-11 3:20 
GeneralRe: How can CString be converted to LPCTSTR without any operator()? Pin
Dean Seo25-Jul-11 16:44
Dean Seo25-Jul-11 16:44 
QuestionAfxGetMainWnd() equals to AfxGetMainWnd ? Pin
yu-jian21-Jul-11 16:24
yu-jian21-Jul-11 16:24 
AnswerRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
Mark Salsbery21-Jul-11 17:06
Mark Salsbery21-Jul-11 17:06 
GeneralRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
yu-jian25-Jul-11 4:16
yu-jian25-Jul-11 4:16 
AnswerRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
Richard MacCutchan21-Jul-11 22:05
mveRichard MacCutchan21-Jul-11 22:05 
AnswerRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
Stefan_Lang22-Jul-11 0:20
Stefan_Lang22-Jul-11 0:20 
You are using a C style typecast here. By doing so you tell the compiler taht YOU know that the variable you're casting is in truth of the type you are casting to. The compiler will therefore ignore any other information and believe you.

The compiler is simply doing what you tell it: ignore the stupidity of the cast.

Maybe you can take one lesson from this: never use C-Style type casts. They are almost always an error!

Check out GotW # 17 to learn more about type casts and how (not) to use them.
JokeRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
«_Superman_»22-Jul-11 2:30
professional«_Superman_»22-Jul-11 2:30 
GeneralRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
Richard MacCutchan22-Jul-11 4:18
mveRichard MacCutchan22-Jul-11 4:18 
GeneralRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
«_Superman_»22-Jul-11 6:03
professional«_Superman_»22-Jul-11 6:03 
GeneralRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
Richard MacCutchan22-Jul-11 22:58
mveRichard MacCutchan22-Jul-11 22:58 
GeneralRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
«_Superman_»23-Jul-11 4:01
professional«_Superman_»23-Jul-11 4:01 
GeneralRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
Richard MacCutchan23-Jul-11 4:25
mveRichard MacCutchan23-Jul-11 4:25 
QuestionRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
David Crow22-Jul-11 6:03
David Crow22-Jul-11 6:03 
JokeRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
«_Superman_»22-Jul-11 9:28
professional«_Superman_»22-Jul-11 9:28 
GeneralRe: AfxGetMainWnd() equals to AfxGetMainWnd ? Pin
yu-jian25-Jul-11 4:20
yu-jian25-Jul-11 4:20 
QuestionQUERY: How to control external exe & read it's process details Pin
andwan021-Jul-11 5:16
andwan021-Jul-11 5:16 
AnswerRe: QUERY: How to control external exe & read it's process details Pin
Richard Andrew x6421-Jul-11 5:34
professionalRichard Andrew x6421-Jul-11 5:34 
AnswerRe: QUERY: How to control external exe & read it's process details Pin
Abhi Lahare21-Jul-11 5:38
Abhi Lahare21-Jul-11 5:38 
AnswerRe: QUERY: How to control external exe & read it's process details Pin
jschell21-Jul-11 8:50
jschell21-Jul-11 8:50 
AnswerRe: QUERY: How to control external exe & read it's process details Pin
«_Superman_»21-Jul-11 9:00
professional«_Superman_»21-Jul-11 9:00 
QuestionDoes "delete" operator work for PVOID pointers? Pin
Cold_Fearing_Bird21-Jul-11 2:36
Cold_Fearing_Bird21-Jul-11 2:36 
AnswerRe: Does "delete" operator work for PVOID pointers? Pin
Maximilien21-Jul-11 3:03
Maximilien21-Jul-11 3:03 
GeneralRe: Does "delete" operator work for PVOID pointers? Pin
Albert Holguin21-Jul-11 4:31
professionalAlbert Holguin21-Jul-11 4:31 

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.