Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to get dial-up connection status Pin
J.Z4-Jul-04 7:15
J.Z4-Jul-04 7:15 
AnswerRe: how to get dial-up connection status Pin
Scozturk4-Jul-04 8:32
professionalScozturk4-Jul-04 8:32 
GeneralIncludes Pin
Dennis Gourjii4-Jul-04 7:12
Dennis Gourjii4-Jul-04 7:12 
GeneralRe: Includes Pin
J.B.4-Jul-04 7:29
J.B.4-Jul-04 7:29 
GeneralRe: Includes Pin
Dennis Gourjii4-Jul-04 8:44
Dennis Gourjii4-Jul-04 8:44 
GeneralRe: Includes Pin
Ravi Bhavnani4-Jul-04 8:53
professionalRavi Bhavnani4-Jul-04 8:53 
GeneralRe: Includes Pin
Dennis Gourjii5-Jul-04 5:16
Dennis Gourjii5-Jul-04 5:16 
GeneralBOOL to bool conversion Pin
J.B.4-Jul-04 6:39
J.B.4-Jul-04 6:39 
Hi guys,

as coming from a pure C++ programming background, I'm quite used to the use of boolean type bool and has decided to continue using it when developing MFC apps. From MSDN, I understood that bool type variable would occupy less memory than BOOL (1 bytes vs. 2 or 4 bytes), since BOOL is actually int type. Correct?

In my programs, I have some BOOL type DDX control value to be passed as function parameters. And when I did that, I get warning message like the following:
warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)

performance warning, doesn't sound very good to me Frown | :( Is it better I do a conversion manually before passing it or that effort isn't generally required?

<code>
BOOL bTest;

if (bParameter == true)
	bTest = TRUE;
else
	bTest = FALSE;

Thanks!
GeneralRe: BOOL to bool conversion Pin
User 66584-Jul-04 7:07
User 66584-Jul-04 7:07 
GeneralRe: BOOL to bool conversion Pin
Tim Smith4-Jul-04 7:12
Tim Smith4-Jul-04 7:12 
GeneralRe: BOOL to bool conversion Pin
J.B.4-Jul-04 7:19
J.B.4-Jul-04 7:19 
GeneralRe: BOOL to bool conversion Pin
User 66584-Jul-04 7:34
User 66584-Jul-04 7:34 
GeneralRe: BOOL to bool conversion Pin
A T I F4-Jul-04 22:14
A T I F4-Jul-04 22:14 
GeneralRe: BOOL to bool conversion Pin
User 66585-Jul-04 0:54
User 66585-Jul-04 0:54 
GeneralRe: BOOL to bool conversion Pin
Tim Smith5-Jul-04 4:03
Tim Smith5-Jul-04 4:03 
GeneralRe: BOOL to bool conversion Pin
V.4-Jul-04 22:18
professionalV.4-Jul-04 22:18 
GeneralRe: BOOL to bool conversion Pin
Tim Smith5-Jul-04 4:01
Tim Smith5-Jul-04 4:01 
GeneralUsing MFC in Win32 Application Pin
vyjesh4-Jul-04 0:33
vyjesh4-Jul-04 0:33 
GeneralRe: Using MFC in Win32 Application Pin
gamitech4-Jul-04 6:19
gamitech4-Jul-04 6:19 
GeneralRe: Using MFC in Win32 Application Pin
Frank K4-Jul-04 19:34
Frank K4-Jul-04 19:34 
Generalproblem with console app Pin
cpeed4-Jul-04 0:29
cpeed4-Jul-04 0:29 
GeneralRe: problem with console app Pin
Mike Nordell4-Jul-04 1:17
Mike Nordell4-Jul-04 1:17 
GeneralRe: problem with console app Pin
cpeed4-Jul-04 1:25
cpeed4-Jul-04 1:25 
Generalthe &quot;outp&quot; command Pin
Member 12178723-Jul-04 22:59
Member 12178723-Jul-04 22:59 
GeneralRe: the &quot;outp&quot; command Pin
peterchen4-Jul-04 0:30
peterchen4-Jul-04 0:30 

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.