Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to store a RGB bitmap image in to an 2d byte array and how to display that image from array Pin
enhzflep5-May-10 17:21
enhzflep5-May-10 17:21 
QuestionRicheditctrl displayed with Selection on Pin
ForNow5-May-10 15:07
ForNow5-May-10 15:07 
AnswerRe: Richeditctrl displayed with Selection on Pin
stebich6-May-10 2:12
professionalstebich6-May-10 2:12 
GeneralRe: Richeditctrl displayed with Selection on Pin
ForNow6-May-10 6:39
ForNow6-May-10 6:39 
Questionbool & BOOL Pin
dipuks5-May-10 12:21
dipuks5-May-10 12:21 
AnswerRe: bool & BOOL Pin
«_Superman_»5-May-10 12:35
professional«_Superman_»5-May-10 12:35 
AnswerRe: bool & BOOL Pin
Stephen Hewitt5-May-10 14:08
Stephen Hewitt5-May-10 14:08 
AnswerRe: BOOL and bool Pin
wangningyu5-May-10 15:25
wangningyu5-May-10 15:25 
1、BOOL is Microsoft's macro . In fact, is only 4 bytes of int type. This definitions ,you can find it in the VC setup directory (WINDEF.h、AFX.H), It can be found this following code:
// WINDEF.H
typedef unsigned long       DWORD;
typedef int                 BOOL;
typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef float               FLOAT;

// AFX.H
#define FALSE   0
#define TRUE    1
#define NULL    0


bool is C/C + + keywords, about MSDN2005 help document, explained below:

This keyword is a built-in type. A variable of this type can have values true and false. Conditional expressions have the type bool and so have values of type bool. For example, i!=0 now has true or false depending on the value of i.

The values true and false have the following relationship:

When a postfix or prefix ++ operator is applied to a variable of type bool, the variable is set to true. The postfix or prefix -- operator cannot be applied to a variable of this type.

The bool type participates in integral promotions. An r-value of type bool can be converted to an r-value of type int, with false becoming zero and true becoming one. As a distinct type, bool participates in overload resolution.

2、Define BOOL and bool of the reasons.

In the memory space,the true、false、null is occupying 1 bytes.But TRUE、FALSE、NULL is occupying 4 bytes.

According to the Intel CPU's paging memory mechanism, 4 bytes can prevent memory inattentive,

it can prevent to produce more ram pieces,and help the data transmission. Poke tongue | ;-P
Questiondeclare, define, and call of a function passing two dimensional arrays [modified] Pin
mrby1235-May-10 10:26
mrby1235-May-10 10:26 
AnswerRe: declare, define, and call of a function passing two dimensional arrays Pin
«_Superman_»5-May-10 12:12
professional«_Superman_»5-May-10 12:12 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
mrby1235-May-10 12:36
mrby1235-May-10 12:36 
QuestionRe: declare, define, and call of a function passing two dimensional arrays Pin
«_Superman_»5-May-10 12:38
professional«_Superman_»5-May-10 12:38 
AnswerRe: declare, define, and call of a function passing two dimensional arrays Pin
mrby1235-May-10 12:41
mrby1235-May-10 12:41 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
«_Superman_»5-May-10 12:47
professional«_Superman_»5-May-10 12:47 
GeneralRe: declare, define, and call of a function passing two dimensional arrays [modified] Pin
mrby1235-May-10 12:58
mrby1235-May-10 12:58 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
Tim Craig5-May-10 14:42
Tim Craig5-May-10 14:42 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
mrby1235-May-10 13:31
mrby1235-May-10 13:31 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
Shi,Yudi5-May-10 16:24
Shi,Yudi5-May-10 16:24 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
mrby1235-May-10 18:42
mrby1235-May-10 18:42 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
Shi,Yudi7-May-10 18:34
Shi,Yudi7-May-10 18:34 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
mrby1236-May-10 7:05
mrby1236-May-10 7:05 
AnswerRe: declare, define, and call of a function passing two dimensional arrays Pin
David Crow6-May-10 3:13
David Crow6-May-10 3:13 
GeneralRe: declare, define, and call of a function passing two dimensional arrays Pin
mrby1236-May-10 7:19
mrby1236-May-10 7:19 
Questionhow make limit running my program? Pin
Rezame5-May-10 6:05
Rezame5-May-10 6:05 
AnswerRe: how make limit running my program? Pin
Maximilien5-May-10 6:24
Maximilien5-May-10 6:24 

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.