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

C / C++ / MFC

 
GeneralRe: Program shutdown problems Pin
led mike7-Dec-06 11:44
led mike7-Dec-06 11:44 
QuestionXLL problem Pin
rodka_raskolnikov7-Dec-06 7:32
rodka_raskolnikov7-Dec-06 7:32 
QuestionAnyone explain me this thing .. I'l b thankful .. [modified] Pin
Pimra7-Dec-06 7:07
Pimra7-Dec-06 7:07 
AnswerRe: Anyone explain me this thing .. I'l b thankful .. Pin
David Crow7-Dec-06 7:18
David Crow7-Dec-06 7:18 
GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
Pimra7-Dec-06 7:31
Pimra7-Dec-06 7:31 
GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
Maximilien7-Dec-06 7:41
Maximilien7-Dec-06 7:41 
GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
David Crow7-Dec-06 7:42
David Crow7-Dec-06 7:42 
AnswerRe: Anyone explain me this thing .. I'l b thankful .. Pin
Dan McCormick7-Dec-06 8:34
Dan McCormick7-Dec-06 8:34 
1. Sounds like the conditional expression syntax is confusing you.

return tree ? TRUE : FALSE;
is equivalent to
if (tree != NULL)
    return TRUE;
else
    return FALSE;


2. A long time ago, in a time now forgotten, the data type bool and it's associated constants of true and false had not been created.

Microsoft wanted a boolean type for use in their Windows code, so they created one and named it 'BOOL'. It was created using a typedef statement. BOOL has associated constants of TRUE and FALSE that are defined using the C-Preprocessor macro facility (in other words, #define). Much code was written using BOOL, TRUE and FALSE.

Some time later, the ANSI committee got around to adding bool to the language as a native type (that is exactly one byte in size). Alas, the Windows code base, which used BOOL, was now quite large. It was a bigger pain to change to use bool than not to change, so BOOL was kept. So we have the legacy in Windows C++ code of seeing both BOOL and bool used.

In order for BOOL to work, the proper headers must be included in the file. The definitions live in <WinDef.h> but if you just include <windows.h> ( or "stdafx.h" if you are using MFC ) before the template definition, the template code will have these values defined.

Dan

Be clear about the difference between your role as a programmer and as a tester. The tester in you must be suspicious, uncompromising, hostile, and compulsively obsessed with destroying, utterly destroying, the programmer's software.
-----
Boris Beizer

GeneralRe: Anyone explain me this thing .. I'l b thankful .. Pin
Steve Echols7-Dec-06 11:32
Steve Echols7-Dec-06 11:32 
Questionwin32 SDK Download. Pin
prodan7-Dec-06 6:34
prodan7-Dec-06 6:34 
AnswerRe: win32 SDK Download. Pin
toxcct7-Dec-06 6:55
toxcct7-Dec-06 6:55 
GeneralRe: win32 SDK Download. Pin
prodan7-Dec-06 7:19
prodan7-Dec-06 7:19 
AnswerRe: win32 SDK Download. Pin
Michael Dunn7-Dec-06 8:05
sitebuilderMichael Dunn7-Dec-06 8:05 
QuestionList Control Item Height [modified] Pin
switang7-Dec-06 6:10
switang7-Dec-06 6:10 
QuestionRe: List Control Item Height Pin
David Crow7-Dec-06 7:24
David Crow7-Dec-06 7:24 
GeneralRe: List Control Item Height [modified] Pin
switang7-Dec-06 7:48
switang7-Dec-06 7:48 
GeneralRe: List Control Item Height Pin
switang7-Dec-06 8:58
switang7-Dec-06 8:58 
GeneralRe: List Control Item Height Pin
switang7-Dec-06 9:17
switang7-Dec-06 9:17 
GeneralRe: List Control Item Height Pin
Steve Echols7-Dec-06 11:36
Steve Echols7-Dec-06 11:36 
GeneralRe: List Control Item Height Pin
switang7-Dec-06 11:39
switang7-Dec-06 11:39 
GeneralRe: List Control Item Height Pin
Steve Echols7-Dec-06 11:54
Steve Echols7-Dec-06 11:54 
GeneralRe: List Control Item Height Pin
Steve Echols7-Dec-06 12:01
Steve Echols7-Dec-06 12:01 
AnswerRe: List Control Item Height [modified] Pin
switang8-Dec-06 2:40
switang8-Dec-06 2:40 
QuestionC# and C++ Integration Pin
Revant Jain7-Dec-06 3:03
Revant Jain7-Dec-06 3:03 
AnswerRe: C# and C++ Integration Pin
led mike7-Dec-06 4:38
led mike7-Dec-06 4:38 

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.