Re: [Dev-C++] ChooseColor frustration
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2002-10-21 11:47:34
|
Ah, I think you mean
switch (ID_CHOOSE_COLOR)
{
case: GREEN
{
// make green
}
break;
case: BLUE
{
// etc.
}
break;
default:
{
// make black
}
break;
}
The switch statement checks the variable passed in, and matches it to a
case.
>From: "Vlada Djurovic" <dj...@im...>
>To: "'DevC++ help'" <dev...@li...>
>Subject: [Dev-C++] ChooseColor frustration
>Date: Mon, 21 Oct 2002 13:13:15 +0200
>
>Hi, everybody
>I have a problem with ChooseColor common dialog. I wrote the code, it
>compiled OK, but what ever color I choose, I get black. I can't figure out
>what's wrong. Here's the code, so if anyone can help me...thanks.
>
>case ID_CHOOSE_COLOR:
> {
> CHOOSECOLOR chColor;
> chColor.lStructSize=sizeof(CHOOSECOLOR);
> chColor.hwndOwner=hwnd;
> chColor.lpCustColors=crCustColor;
> chColor.Flags=CC_FULLOPEN;
>
> ChooseColor(&chColor);
> crCurColor=chColor.rgbResult; /*crCurColor is
>global variable*/
> }
> break;
_________________________________________________________________
Choose an Internet access plan right for you -- try MSN!
http://resourcecenter.msn.com/access/plans/default.asp
|