Click here to Skip to main content
16,019,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Git: Inserting a commit below root? Pin
«_Superman_»2-Apr-11 17:30
professional«_Superman_»2-Apr-11 17:30 
QuestionUsing WebBrowser Control in mfc application,Cpu usage is 50%. Pin
DesmondJiang1-Apr-11 21:48
DesmondJiang1-Apr-11 21:48 
QuestionRe: Using WebBrowser Control in mfc application,Cpu usage is 50%. Pin
Niklas L2-Apr-11 5:39
Niklas L2-Apr-11 5:39 
Questiona weird behavior Pin
Krauze31-Mar-11 22:17
Krauze31-Mar-11 22:17 
QuestionRe: a weird behavior Pin
CPallini1-Apr-11 0:26
mveCPallini1-Apr-11 0:26 
AnswerRe: a weird behavior Pin
Krauze1-Apr-11 0:37
Krauze1-Apr-11 0:37 
QuestionRe: a weird behavior Pin
CPallini1-Apr-11 2:05
mveCPallini1-Apr-11 2:05 
AnswerRe: a weird behavior [modified] Pin
Stefan_Lang1-Apr-11 3:08
Stefan_Lang1-Apr-11 3:08 
Are you sure TRUE is defined as 1? I know in MFC it is, but I've seen implementations that use the definition
#define FALSE 0
#define TRUE (!FALSE)

I don't see how this could be the cause of your problem, but it might add to it.

Also, have you checked the type BOOL is in fact defined as int and not overwritten by some old header? Wouldn't be the first time I've seen conflicting macro definitions...

You could of course overcome such issues by explicitely defining an int variable that holds the intended value:
void SetOrder(BOOL bOrder) {
    int iOrder(bOrder?1:0);
    _itot_s(iOrder, ...


P.S.:
I just checked the definition of the not operator '!', and it appears my above example
#define TRUE (!FALSE)
would in fact result in the definition
#define TRUE true
(provided you have a modern C++ compiler that supports the type bool). In a context that requires an int, true would be converted to 1 as required by the standard, so the concern I brought up can in fact not be a problem at all, and my workaround is uncalled for.

modified on Friday, April 1, 2011 10:41 AM

QuestionHow to determine the control under cursor Pin
Arrin31-Mar-11 20:47
Arrin31-Mar-11 20:47 
AnswerRe: How to determine the control under cursor Pin
CodyDaemon31-Mar-11 21:44
CodyDaemon31-Mar-11 21:44 
GeneralRe: How to determine the control under cursor Pin
Arrin31-Mar-11 22:51
Arrin31-Mar-11 22:51 
GeneralRe: How to determine the control under cursor Pin
Damir Valiulin1-Apr-11 4:41
Damir Valiulin1-Apr-11 4:41 
AnswerRe: How to determine the control under cursor Pin
Arrin7-Apr-11 4:18
Arrin7-Apr-11 4:18 
AnswerRe: How to determine the control under cursor Pin
Arrin7-Apr-11 4:19
Arrin7-Apr-11 4:19 
QuestionExtract text(English & Chinese) from pdf [modified] Pin
wonderway31-Mar-11 16:47
wonderway31-Mar-11 16:47 
AnswerRe: Extract text(English & Chinese) from pdf Pin
Peter_in_278031-Mar-11 17:28
professionalPeter_in_278031-Mar-11 17:28 
QuestionIssue while Use DLL in MFC Exe Application Pin
Andraw Tang31-Mar-11 9:01
Andraw Tang31-Mar-11 9:01 
AnswerRe: Issue while Use DLL in MFC Exe Application Pin
Albert Holguin31-Mar-11 9:28
professionalAlbert Holguin31-Mar-11 9:28 
GeneralRe: Issue while Use DLL in MFC Exe Application Pin
Andraw Tang31-Mar-11 9:33
Andraw Tang31-Mar-11 9:33 
GeneralRe: Issue while Use DLL in MFC Exe Application Pin
Albert Holguin31-Mar-11 9:38
professionalAlbert Holguin31-Mar-11 9:38 
GeneralRe: Issue while Use DLL in MFC Exe Application Pin
Andraw Tang31-Mar-11 10:53
Andraw Tang31-Mar-11 10:53 
GeneralRe: Issue while Use DLL in MFC Exe Application Pin
Albert Holguin31-Mar-11 11:00
professionalAlbert Holguin31-Mar-11 11:00 
QuestionAnything wrong Pin
Smith#31-Mar-11 4:46
Smith#31-Mar-11 4:46 
AnswerRe: Anything wrong [modified] Pin
Luc Pattyn31-Mar-11 5:17
sitebuilderLuc Pattyn31-Mar-11 5:17 
GeneralRe: Anything wrong Pin
Smith#31-Mar-11 5:33
Smith#31-Mar-11 5:33 

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.