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

C / C++ / MFC

 
AnswerRe: call OnCancel of Dialog from a thread in the dialog Pin
Jijo.Raj21-Aug-08 19:41
Jijo.Raj21-Aug-08 19:41 
QuestionHow do I edit a combo box's list-box item in-place ? Pin
SherTeks21-Aug-08 18:12
SherTeks21-Aug-08 18:12 
AnswerRe: How do I edit a combo box's list-box item in-place ? Pin
Hamid_RT21-Aug-08 18:18
Hamid_RT21-Aug-08 18:18 
Questionprintf like function question! Pin
fantasy121521-Aug-08 17:58
fantasy121521-Aug-08 17:58 
AnswerRe: printf like function question! Pin
Hamid_RT21-Aug-08 18:14
Hamid_RT21-Aug-08 18:14 
AnswerRe: printf like function question! [modified] Pin
Joe Woodbury21-Aug-08 19:07
professionalJoe Woodbury21-Aug-08 19:07 
GeneralRe: printf like function question! Pin
fantasy121524-Aug-08 14:39
fantasy121524-Aug-08 14:39 
AnswerRe: printf like function question! Pin
Nibu babu thomas21-Aug-08 20:10
Nibu babu thomas21-Aug-08 20:10 
fantasy1215 wrote:
The compiler don't complain in the compile phase, but when you press F5 to debug, 'unhandle exception' prompt. while not debug, run it at once, you just get wield strings or output.

We all use some sort of printf or CString::Format in the code, we are not careful sometimes. So how to handle this problem or check out the bugs in the exist project?


I've had some bugs due to wrong usage of sscanf and fscanf. VC6 didn't report stack corruption errors but VC8 does! Here is a blog post on these bugs, hope this helps!

http://nibuthomas.wordpress.com/2008/08/01/careful-with-sscanf-and-fscanf/[^]

I like printf, sprintf and other functions but at we times use these in a wrong way resulting in bugs. Reading the docs carefully, again carefully, "on the format specifiers to be used for different types" will help a lot in solving and finding these bugs!

Just now found one bug with the usage of the TRACE macro. One of the trace messages contained a '%' sign resulting in application disappearance. AtlTrace treats the first argument given as a format specifier IMO hence the bug. Replaced TRACE with TRACE0 macro and now it's fine.


Nibu babu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

AnswerRe: printf like function question! Pin
CPallini21-Aug-08 21:38
mveCPallini21-Aug-08 21:38 
QuestionVC++ MFC Pin
Selvan.S21-Aug-08 17:34
Selvan.S21-Aug-08 17:34 
AnswerRe: VC++ MFC Pin
Jijo.Raj21-Aug-08 18:11
Jijo.Raj21-Aug-08 18:11 
AnswerRe: VC++ MFC Pin
Hamid_RT21-Aug-08 18:18
Hamid_RT21-Aug-08 18:18 
Questionpath from where project is executing Pin
ani_ikram21-Aug-08 17:00
ani_ikram21-Aug-08 17:00 
AnswerRe: path from where project is executing Pin
Naveen21-Aug-08 17:43
Naveen21-Aug-08 17:43 
AnswerRe: path from where project is executing Pin
fantasy121521-Aug-08 17:47
fantasy121521-Aug-08 17:47 
Questionquick question about SetWorkingDirectory Pin
monsieur_jj21-Aug-08 16:36
monsieur_jj21-Aug-08 16:36 
AnswerRe: quick question about SetWorkingDirectory Pin
Naveen21-Aug-08 16:56
Naveen21-Aug-08 16:56 
AnswerRe: quick question about SetWorkingDirectory Pin
Hamid_RT21-Aug-08 18:20
Hamid_RT21-Aug-08 18:20 
QuestionWhen I Click a row of DataGrid control,What message occurs? Pin
aygrhnwms30421-Aug-08 14:58
aygrhnwms30421-Aug-08 14:58 
AnswerRe: When I Click a row of DataGrid control,What message occurs? Pin
_AnsHUMAN_ 21-Aug-08 18:32
_AnsHUMAN_ 21-Aug-08 18:32 
QuestionNot able to receive messages to the control procedure on invoking the shortcut keys. Pin
Hari-Adarapu21-Aug-08 10:08
Hari-Adarapu21-Aug-08 10:08 
AnswerRe: Not able to receive messages to the control procedure on invoking the shortcut keys. Pin
Naveen21-Aug-08 14:19
Naveen21-Aug-08 14:19 
GeneralRe: Not able to receive messages to the control procedure on invoking the shortcut keys. Pin
Hari-Adarapu22-Aug-08 4:08
Hari-Adarapu22-Aug-08 4:08 
GeneralRe: Not able to receive messages to the control procedure on invoking the shortcut keys. Pin
Naveen22-Aug-08 4:59
Naveen22-Aug-08 4:59 
QuestionCListCtrl with CheckBox Pin
john563221-Aug-08 6:39
john563221-Aug-08 6:39 

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.