Click here to Skip to main content
15,914,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CreateEx memory leak? Pin
Tomer Kanza16-Jun-05 0:03
Tomer Kanza16-Jun-05 0:03 
GeneralArray Problem Pin
aaadetos14-Jun-05 22:41
aaadetos14-Jun-05 22:41 
GeneralRe: Array Problem Pin
narendra_ b14-Jun-05 23:48
narendra_ b14-Jun-05 23:48 
GeneralRe: Array Problem Pin
David Crow15-Jun-05 5:14
David Crow15-Jun-05 5:14 
GeneralRe: Array Problem Pin
aaadetos15-Jun-05 6:58
aaadetos15-Jun-05 6:58 
GeneralRe: Array Problem Pin
David Crow15-Jun-05 7:35
David Crow15-Jun-05 7:35 
GeneralMultiple options Pin
Rostfrei14-Jun-05 22:33
Rostfrei14-Jun-05 22:33 
GeneralRe: Multiple options Pin
Cedric Moonen14-Jun-05 22:39
Cedric Moonen14-Jun-05 22:39 
It is not using multiple arguments but using one single argument that is used as a flag:

<br />
#define LED_GREEN  0x001<br />
#define LED_BLUE   0x002<br />
#define LED_RED    0x004<br />


The define are just to set one bit to 1

And so, inside your function, you check if the specified bit is set:

void SetLed(int LedMask)<br />
{<br />
  if (LedMask & LED_GREEN)<br />
    // Activate green led<br />
<br />
  ...<br />
  ...<br />
}<br />


[EDIT] I forgot to say that:
You can then call your function like that:

SetLed(GREEN_LED | RED_LED);

That will activate the green and red leds

Hope this helps
GeneralRe: Multiple options Pin
Rostfrei14-Jun-05 23:12
Rostfrei14-Jun-05 23:12 
Questionchange Location URL in IE using BHO? Pin
ThinkingPrometheus14-Jun-05 21:47
ThinkingPrometheus14-Jun-05 21:47 
GeneralActiveX Setup program Pin
Anonymous14-Jun-05 21:25
Anonymous14-Jun-05 21:25 
GeneralRe: ActiveX Setup program Pin
Cedric Moonen14-Jun-05 21:52
Cedric Moonen14-Jun-05 21:52 
GeneralActiveX in Excel Pin
Mimmi51114-Jun-05 21:01
Mimmi51114-Jun-05 21:01 
General#include ... Pin
pardis14-Jun-05 20:43
pardis14-Jun-05 20:43 
GeneralRe: #include ... Pin
Bob Stanneveld14-Jun-05 20:45
Bob Stanneveld14-Jun-05 20:45 
GeneralRe: #include ... Pin
Rick York15-Jun-05 8:21
mveRick York15-Jun-05 8:21 
GeneralTab Icon Pin
LiYS14-Jun-05 20:06
LiYS14-Jun-05 20:06 
Generalclient-server application Pin
ask_you14-Jun-05 20:03
ask_you14-Jun-05 20:03 
GeneralRe: client-server application Pin
ThatsAlok14-Jun-05 21:13
ThatsAlok14-Jun-05 21:13 
QuestionCan Visual C++ .Net genarate SSE code Pin
HasanMalaysia14-Jun-05 18:40
HasanMalaysia14-Jun-05 18:40 
AnswerRe: Can Visual C++ .Net genarate SSE code Pin
narendra_ b14-Jun-05 19:11
narendra_ b14-Jun-05 19:11 
AnswerRe: Can Visual C++ .Net genarate SSE code Pin
narendra_ b14-Jun-05 19:13
narendra_ b14-Jun-05 19:13 
GeneralRe: Can Visual C++ .Net genarate SSE code Pin
HasanMalaysia18-Jun-05 22:44
HasanMalaysia18-Jun-05 22:44 
GeneralIMPLEMENT_DYNAMIC Error Pin
Guoguor14-Jun-05 17:58
Guoguor14-Jun-05 17:58 
GeneralRe: IMPLEMENT_DYNAMIC Error Pin
narendra_ b14-Jun-05 19:03
narendra_ b14-Jun-05 19:03 

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.