Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CRichEditCtrl FormatRange Bounding Rectangle Pin
Larry J. Siddens11-Jun-03 2:36
Larry J. Siddens11-Jun-03 2:36 
GeneralCatch the "enter" Pin
Woltan10-Jun-03 3:34
Woltan10-Jun-03 3:34 
GeneralRe: Catch the "enter" Pin
Maximilien10-Jun-03 3:44
Maximilien10-Jun-03 3:44 
GeneralRe: Catch the "enter" Pin
Mike Dimmick10-Jun-03 6:12
Mike Dimmick10-Jun-03 6:12 
GeneralRe: Catch the "enter" Pin
Florin Ochiana10-Jun-03 4:15
Florin Ochiana10-Jun-03 4:15 
Generalget_innerText Pin
Majid Shahabfar10-Jun-03 3:26
Majid Shahabfar10-Jun-03 3:26 
GeneralRe: get_innerText Pin
David Crow10-Jun-03 6:58
David Crow10-Jun-03 6:58 
General#define macro expansions Pin
David Chamberlain10-Jun-03 3:06
David Chamberlain10-Jun-03 3:06 
I don't have an intimate knowledge of the finer points of macro expansion, but these look suspicious to me, and I am wondering if they will cause problems:

#define ABC 120<br />
#define HALF_ABC ABC / 2<br />
#define QUART_ABC ABC / 4   // this is one-quarter


The first one is normally what I expect to see as a simple substitution. The second one is an operation. The third is an operation with a trailing comment. Will these be expanded properly if used as follows:

for (int i = 0; i < QUART_ABC; ++i)<br />
   {<br />
   if (i >= HALF_ABC)<br />
      // ... processing<br />
   }


Besides converting all of these to const ints, what is a
better way to make sure they do what is intended? The software appears to be working properly, but those last pesky hard-to-find bugs may be in these areas.

Dave

"You can say that again." -- Dept. of Redundancy Dept.
GeneralRe: #define macro expansions Pin
basementman10-Jun-03 3:55
basementman10-Jun-03 3:55 
GeneralRe: #define macro expansions Pin
David Chamberlain10-Jun-03 4:36
David Chamberlain10-Jun-03 4:36 
GeneralRe: #define macro expansions Pin
Peter Weyzen10-Jun-03 20:26
Peter Weyzen10-Jun-03 20:26 
GeneralRe: #define macro expansions Pin
Iain Clarke, Warrior Programmer10-Jun-03 4:03
Iain Clarke, Warrior Programmer10-Jun-03 4:03 
GeneralIntersecting windows Pin
pankajdaga10-Jun-03 3:02
pankajdaga10-Jun-03 3:02 
GeneralRe: Intersecting windows Pin
basementman10-Jun-03 3:59
basementman10-Jun-03 3:59 
GeneralDo a shift+Tab in PreTranslateMessage() Pin
Claude Gagnon10-Jun-03 3:00
Claude Gagnon10-Jun-03 3:00 
GeneralRe: Do a shift+Tab in PreTranslateMessage() Pin
Ryan Binns10-Jun-03 4:14
Ryan Binns10-Jun-03 4:14 
GeneralRe: Do a shift+Tab in PreTranslateMessage() Pin
valikac10-Jun-03 7:04
valikac10-Jun-03 7:04 
GeneralMoving text Pin
Dennis L10-Jun-03 2:39
Dennis L10-Jun-03 2:39 
GeneralRe: Moving text Pin
Iain Clarke, Warrior Programmer10-Jun-03 3:15
Iain Clarke, Warrior Programmer10-Jun-03 3:15 
GeneralCodewarrior dynamically creation Pin
DuFunk10-Jun-03 2:30
DuFunk10-Jun-03 2:30 
GeneralRe: Codewarrior dynamically creation Pin
Maximilien10-Jun-03 2:39
Maximilien10-Jun-03 2:39 
GeneralRe: Codewarrior dynamically creation Pin
DuFunk10-Jun-03 2:45
DuFunk10-Jun-03 2:45 
GeneralRe: Codewarrior dynamically creation Pin
Maximilien10-Jun-03 3:19
Maximilien10-Jun-03 3:19 
GeneralCTreeCtrl font size Pin
AnkushChopra10-Jun-03 2:29
AnkushChopra10-Jun-03 2:29 
GeneralRe: CTreeCtrl font size Pin
Roger Allen10-Jun-03 2:58
Roger Allen10-Jun-03 2:58 

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.