Click here to Skip to main content
16,005,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get the pixel values of character drawn inside rectangle present on dialog in vc++,mfc Pin
prerananit12-Nov-09 23:50
prerananit12-Nov-09 23:50 
QuestionCompare XMLs Pin
josepe325212-Nov-09 23:46
josepe325212-Nov-09 23:46 
QuestionCheck windows TaskManager Pin
MsmVc12-Nov-09 23:44
MsmVc12-Nov-09 23:44 
QuestionRe: Check windows TaskManager Pin
David Crow13-Nov-09 3:17
David Crow13-Nov-09 3:17 
AnswerRe: Check windows TaskManager Pin
MsmVc13-Nov-09 17:09
MsmVc13-Nov-09 17:09 
QuestionRe: Check windows TaskManager Pin
David Crow13-Nov-09 17:16
David Crow13-Nov-09 17:16 
Questiontypecasting Pin
FotisSs12-Nov-09 23:21
FotisSs12-Nov-09 23:21 
AnswerRe: typecasting Pin
Cedric Moonen12-Nov-09 23:31
Cedric Moonen12-Nov-09 23:31 
FotisSs wrote:
I' ve seen a lot of guys using a typecasting


Well, they were wrong... LPCTSTR is an array of TCHAR and the definition of a TCHAR depends if UNICODE is enabled or not. So, the code will work fine if UNICODE is not defined but it will not work if UNICODE is defined. In which case, if you have the typecast, it will simply be plain wrong (the string will be corrupted), but if you don't have the cast, then it will not compile (which is way better, because at least you don't have a nasty bug in your code). Typecasts should be avoided at maximum: using them too much means probably that you don't understand what you are doing.

I suggest that you read this article[^], it explains a lot about character encoding (and about TCHAR).

Cédric Moonen
Software developer

Charting control [v2.0]
OpenGL game tutorial in C++

AnswerRe: typecasting Pin
Rajesh R Subramanian12-Nov-09 23:39
professionalRajesh R Subramanian12-Nov-09 23:39 
GeneralRe: typecasting Pin
FotisSs12-Nov-09 23:52
FotisSs12-Nov-09 23:52 
AnswerRe: typecasting Pin
Rajesh R Subramanian13-Nov-09 0:15
professionalRajesh R Subramanian13-Nov-09 0:15 
AnswerRe: typecasting Pin
David Crow13-Nov-09 3:25
David Crow13-Nov-09 3:25 
Questionlinking exe to DLLs with the same name as the system dlls Pin
RohanBhosale2112-Nov-09 23:06
RohanBhosale2112-Nov-09 23:06 
AnswerRe: linking exe to DLLs with the same name as the system dlls Pin
Rajesh R Subramanian12-Nov-09 23:26
professionalRajesh R Subramanian12-Nov-09 23:26 
GeneralRe: linking exe to DLLs with the same name as the system dlls Pin
RohanBhosale2115-Nov-09 18:18
RohanBhosale2115-Nov-09 18:18 
Questionis there any free PDF printers drivers or pdf libraries Pin
eswar pothula12-Nov-09 22:04
eswar pothula12-Nov-09 22:04 
AnswerRe: is there any free PDF printers drivers or pdf libraries Pin
Richard MacCutchan12-Nov-09 22:19
mveRichard MacCutchan12-Nov-09 22:19 
AnswerRe: is there any free PDF printers drivers or pdf libraries Pin
Rajesh R Subramanian12-Nov-09 22:28
professionalRajesh R Subramanian12-Nov-09 22:28 
QuestionBlock Worlds Problem Pin
Jim_Long12-Nov-09 21:37
Jim_Long12-Nov-09 21:37 
QuestionRe: Block Worlds Problem Pin
CPallini12-Nov-09 21:46
mveCPallini12-Nov-09 21:46 
AnswerRe: Block Worlds Problem Pin
Richard MacCutchan12-Nov-09 22:24
mveRichard MacCutchan12-Nov-09 22:24 
JokeRe: Block Worlds Problem Pin
Covean12-Nov-09 22:56
Covean12-Nov-09 22:56 
GeneralRe: Block Worlds Problem Pin
Richard MacCutchan12-Nov-09 23:19
mveRichard MacCutchan12-Nov-09 23:19 
GeneralRe: Block Worlds Problem Pin
Jim_Long13-Nov-09 2:02
Jim_Long13-Nov-09 2:02 
AnswerRe: Block Worlds Problem Pin
David Crow13-Nov-09 3:37
David Crow13-Nov-09 3:37 

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.