Click here to Skip to main content
15,891,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhen click on the close button on the righttopmost dialog, how to hide the dialog not close the app? Pin
fantasy121531-Jul-08 16:03
fantasy121531-Jul-08 16:03 
AnswerRe: When click on the close button on the righttopmost dialog, how to hide the dialog not close the app? Pin
Mark Salsbery31-Jul-08 16:23
Mark Salsbery31-Jul-08 16:23 
GeneralRe: When click on the close button on the righttopmost dialog, how to hide the dialog not close the app? Pin
fantasy121531-Jul-08 17:09
fantasy121531-Jul-08 17:09 
GeneralRe: When click on the close button on the righttopmost dialog, how to hide the dialog not close the app? Pin
Mark Salsbery1-Aug-08 5:31
Mark Salsbery1-Aug-08 5:31 
Question#define statements Pin
MarkB77731-Jul-08 15:55
MarkB77731-Jul-08 15:55 
AnswerRe: #define statements Pin
Mark Salsbery31-Jul-08 16:13
Mark Salsbery31-Jul-08 16:13 
GeneralRe: #define statements Pin
MarkB77731-Jul-08 16:24
MarkB77731-Jul-08 16:24 
GeneralRe: #define statements Pin
Mark Salsbery31-Jul-08 16:30
Mark Salsbery31-Jul-08 16:30 
MarkBrock wrote:
Could I argue that by calling randomise() it's performing a "specific task"?


Of course you could, but you'd be wrong LOL - just kidding Smile | :)

The thing is, you can't "call" randomize. The compiler pre=processor replaces
occurrences of randomize(n) to the token (macro expansion), so the actual code
called at runtime is rand() % (i).

Note that more parenthesis should probably be used here...

#define randomize(i) (rand() % i)

... just in case you use it in a complex expression...

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: #define statements Pin
CPallini31-Jul-08 21:17
mveCPallini31-Jul-08 21:17 
AnswerRe: #define statements Pin
David Crow1-Aug-08 3:18
David Crow1-Aug-08 3:18 
GeneralRe: #define statements Pin
MarkB7771-Aug-08 3:21
MarkB7771-Aug-08 3:21 
QuestionHow to hook the system events, such as shutoff? Pin
kcynic31-Jul-08 14:00
kcynic31-Jul-08 14:00 
AnswerRe: How to hook the system events, such as shutoff? Pin
Mark Salsbery31-Jul-08 15:25
Mark Salsbery31-Jul-08 15:25 
GeneralRe: How to hook the system events, such as shutoff? Pin
kcynic31-Jul-08 15:40
kcynic31-Jul-08 15:40 
GeneralRe: How to hook the system events, such as shutoff? Pin
Mark Salsbery31-Jul-08 15:48
Mark Salsbery31-Jul-08 15:48 
GeneralRe: How to hook the system events, such as shutoff? Pin
kcynic31-Jul-08 15:59
kcynic31-Jul-08 15:59 
GeneralRe: How to hook the system events, such as shutoff? Pin
Mark Salsbery31-Jul-08 16:08
Mark Salsbery31-Jul-08 16:08 
GeneralRe: How to hook the system events, such as shutoff? Pin
kcynic31-Jul-08 16:12
kcynic31-Jul-08 16:12 
GeneralRe: How to hook the system events, such as shutoff? Pin
Mark Salsbery1-Aug-08 5:28
Mark Salsbery1-Aug-08 5:28 
GeneralRe: How to hook the system events, such as shutoff? Pin
Randor 31-Jul-08 16:14
professional Randor 31-Jul-08 16:14 
GeneralRe: How to hook the system events, such as shutoff? Pin
kcynic31-Jul-08 16:20
kcynic31-Jul-08 16:20 
GeneralRe: How to hook the system events, such as shutoff? Pin
Mark Salsbery31-Jul-08 16:24
Mark Salsbery31-Jul-08 16:24 
QuestionQuiz or Test program help needed.. Pin
the oso31-Jul-08 13:13
the oso31-Jul-08 13:13 
QuestionRe: Quiz or Test program help needed.. Pin
CPallini31-Jul-08 21:59
mveCPallini31-Jul-08 21:59 
AnswerRe: Quiz or Test program help needed.. Pin
David Crow1-Aug-08 3:15
David Crow1-Aug-08 3:15 

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.