Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detecting Sound Card Pin
Mark Donkers18-Dec-01 5:09
Mark Donkers18-Dec-01 5:09 
GeneralRe: Detecting Sound Card Pin
Ernest Laurentin18-Dec-01 6:10
Ernest Laurentin18-Dec-01 6:10 
GeneralRe: Detecting Sound Card Pin
Mark Donkers18-Dec-01 6:23
Mark Donkers18-Dec-01 6:23 
GeneralRe: Detecting Sound Card Pin
Halid Niyaz19-Mar-02 0:00
Halid Niyaz19-Mar-02 0:00 
GeneralBOOL vs bool Pin
Andrew Stampor18-Dec-01 4:30
Andrew Stampor18-Dec-01 4:30 
GeneralRe: BOOL vs bool Pin
Chris Losinger18-Dec-01 4:45
professionalChris Losinger18-Dec-01 4:45 
GeneralRe: BOOL vs bool Pin
Bernhard18-Dec-01 4:52
Bernhard18-Dec-01 4:52 
GeneralRe: BOOL vs bool Pin
Fazlul Kabir18-Dec-01 4:55
Fazlul Kabir18-Dec-01 4:55 
(1) bool is C++ specific data type that can have values true or false
BOOL is Microsoft specific keyword that is nothing but an integer. As it's defined in "windef.h"
typedef int                 BOOL;
So if you plan to write portable (cross-platform) C++ code, don't use BOOL, use bool instead.

(2) size of bool 1 byte, whereas the same for BOOL 4 bytes (which is the size of an 'int')

(3) Use 'TRUE' and 'FALSE', while using BOOL and 'true' and 'false' for 'bool'
BOOL b1 = TRUE;
bool b2 = true;
(4) Since BOOL is nothing but an 'int', take extra precaution in using it. Don't simply assume that a BOOL value of other that '1' is always false.


My $0.02.

// Fazlul


Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com

GeneralRe: BOOL vs bool Pin
Tim Smith18-Dec-01 15:39
Tim Smith18-Dec-01 15:39 
GeneralRe: BOOL vs bool Pin
Fazlul Kabir19-Dec-01 6:29
Fazlul Kabir19-Dec-01 6:29 
General#File Error#'s Pin
Steve The Plant18-Dec-01 4:28
Steve The Plant18-Dec-01 4:28 
GeneralRe: #File Error#'s Pin
Alvaro Mendez18-Dec-01 6:04
Alvaro Mendez18-Dec-01 6:04 
GeneralRe: #File Error#'s Pin
Steve The Plant18-Dec-01 9:54
Steve The Plant18-Dec-01 9:54 
GeneralMaking MFC go fullscreen Pin
18-Dec-01 3:57
suss18-Dec-01 3:57 
GeneralRe: Making MFC go fullscreen Pin
Hadi Rezaee18-Dec-01 7:58
Hadi Rezaee18-Dec-01 7:58 
GeneralRe: Making MFC go fullscreen Pin
Rick York18-Dec-01 8:22
mveRick York18-Dec-01 8:22 
GeneralRe: Making MFC go fullscreen Pin
18-Dec-01 9:34
suss18-Dec-01 9:34 
GeneralRe: Making MFC go fullscreen Pin
Todd.Harvey18-Dec-01 8:47
Todd.Harvey18-Dec-01 8:47 
GeneralRe: Making MFC go fullscreen Pin
18-Dec-01 9:48
suss18-Dec-01 9:48 
QuestionHow to capture IE Event in WTL.... Pin
Huu Quynh18-Dec-01 3:44
Huu Quynh18-Dec-01 3:44 
GeneralExplain EnumChildWindows(...) Pin
Rickard Andersson2018-Dec-01 2:45
Rickard Andersson2018-Dec-01 2:45 
GeneralRe: Explain EnumChildWindows(...) Pin
Bill Wilson18-Dec-01 6:21
Bill Wilson18-Dec-01 6:21 
GeneralA Drawing Problem. Please HELP ! ! ! Pin
The_Server18-Dec-01 2:44
The_Server18-Dec-01 2:44 
GeneralRe: A Drawing Problem. Please HELP ! ! ! Pin
Joaquín M López Muñoz18-Dec-01 2:50
Joaquín M López Muñoz18-Dec-01 2:50 
GeneralRe: A Drawing Problem. Please HELP ! ! ! Pin
The_Server18-Dec-01 3:21
The_Server18-Dec-01 3:21 

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.