Click here to Skip to main content
16,012,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralXP, Word 2002, Automation closes my APP !!! Pin
Braulio Dez8-Jan-02 0:06
Braulio Dez8-Jan-02 0:06 
QuestionHow set cursor for CRectTracker Pin
Eugene Pustovoyt7-Jan-02 23:39
Eugene Pustovoyt7-Jan-02 23:39 
AnswerRe: How set cursor for CRectTracker Pin
Joaquín M López Muñoz8-Jan-02 2:34
Joaquín M López Muñoz8-Jan-02 2:34 
GeneralRe: How set cursor for CRectTracker Pin
Eugene Pustovoyt8-Jan-02 20:20
Eugene Pustovoyt8-Jan-02 20:20 
GeneralWhy using BOOL over bool (or not) Pin
EiSl7-Jan-02 21:56
EiSl7-Jan-02 21:56 
GeneralRe: Why using BOOL over bool (or not) Pin
Joaquín M López Muñoz7-Jan-02 22:18
Joaquín M López Muñoz7-Jan-02 22:18 
GeneralRe: Why using BOOL over bool (or not) Pin
Bernhard8-Jan-02 3:29
Bernhard8-Jan-02 3:29 
GeneralRe: Why using BOOL over bool (or not) Pin
Joaquín M López Muñoz8-Jan-02 3:52
Joaquín M López Muñoz8-Jan-02 3:52 
Well, I'd tend to use the second form (if (pointer == 0)) because "0" is the standard name for the null pointer since C was invented. NULL is a macro of dubious reputation included in stddef.h and stdio.h, altough MS folks also provide it in windows.h for your convenience.
Why do I prefer unadorned 0 instead of NULL? Most of the time it doesn't really matter which syntax you use, and NULL is admittedly a bit clearer, but the problem with this macro is that its definition can vary from compiler vendor to compiler vendor (some define it as a bare 0, others as ((void *)0)). Worse yet, as this macro tends to be defined independently by different library writters (as it is the case in windows.h) ocassionally you can end up with different NULL definitions across compilation units. In extreme pathological situations this can make a difference.
Another, more practical, reason to prefer 0 over NULL is that you don't have to rely on any previously included header.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Why using BOOL over bool (or not) Pin
Bernhard8-Jan-02 4:05
Bernhard8-Jan-02 4:05 
GeneralRe: Why using BOOL over bool (or not) Pin
Tim Smith8-Jan-02 4:25
Tim Smith8-Jan-02 4:25 
GeneralRe: Why using BOOL over bool (or not) Pin
Joaquín M López Muñoz8-Jan-02 5:08
Joaquín M López Muñoz8-Jan-02 5:08 
GeneralRe: Why using BOOL over bool (or not) Pin
Tim Smith8-Jan-02 6:22
Tim Smith8-Jan-02 6:22 
GeneralRe: Why using BOOL over bool (or not) Pin
Christian Graus7-Jan-02 23:08
protectorChristian Graus7-Jan-02 23:08 
GeneralRe: Why using BOOL over bool (or not) Pin
Christian Graus8-Jan-02 10:26
protectorChristian Graus8-Jan-02 10:26 
GeneralRe: Why using BOOL over bool (or not) Pin
Christian Graus8-Jan-02 12:36
protectorChristian Graus8-Jan-02 12:36 
Questionhow to enum all loaded modules ? Pin
7-Jan-02 21:16
suss7-Jan-02 21:16 
AnswerRe: how to enum all loaded modules ? Pin
Joaquín M López Muñoz7-Jan-02 22:42
Joaquín M López Muñoz7-Jan-02 22:42 
GeneralRe: how to enum all loaded modules ? Pin
7-Jan-02 23:36
suss7-Jan-02 23:36 
GeneralRe: how to enum all loaded modules ? Pin
Joaquín M López Muñoz8-Jan-02 2:12
Joaquín M López Muñoz8-Jan-02 2:12 
GeneralRe: how to enum all loaded modules ? Pin
8-Jan-02 2:17
suss8-Jan-02 2:17 
GeneralRe: how to enum all loaded modules ? Pin
moliate8-Jan-02 3:03
moliate8-Jan-02 3:03 
General*.icl files Pin
Paul Selormey7-Jan-02 19:29
Paul Selormey7-Jan-02 19:29 
GeneralRe: *.icl files Pin
Michael Dunn7-Jan-02 19:43
sitebuilderMichael Dunn7-Jan-02 19:43 
GeneralRe: *.icl files Pin
Paul Selormey7-Jan-02 20:23
Paul Selormey7-Jan-02 20:23 
GeneralRe: *.icl files Pin
Michael Dunn7-Jan-02 20:31
sitebuilderMichael Dunn7-Jan-02 20: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.