Click here to Skip to main content
15,917,060 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get color Pin
Sarath C5-Jul-06 21:48
Sarath C5-Jul-06 21:48 
GeneralRe: How to get color Pin
huynhnb5-Jul-06 21:58
huynhnb5-Jul-06 21:58 
GeneralRe: How to get color Pin
Hamid_RT5-Jul-06 22:10
Hamid_RT5-Jul-06 22:10 
GeneralRe: How to get color Pin
Sarath C5-Jul-06 22:29
Sarath C5-Jul-06 22:29 
GeneralRe: How to get color Pin
Hamid_RT5-Jul-06 22:37
Hamid_RT5-Jul-06 22:37 
GeneralRe: How to get color Pin
Sarath C5-Jul-06 22:30
Sarath C5-Jul-06 22:30 
GeneralRe: How to get color Pin
Michael Dunn5-Jul-06 22:46
sitebuilderMichael Dunn5-Jul-06 22:46 
GeneralRe: How to get color Pin
huynhnb5-Jul-06 23:05
huynhnb5-Jul-06 23:05 
Michael Dunn wrote:
0 is a valid COLORREF - it's black


but, all times i click ( click on other color) m_cc.rgbResult always is 0->Not good. Dead | X|
-------
I debug and see: all time, m_cc.rgbResult is 0.
When EndDialog();
API function:
INT_PTR CColorDialog::DoModal()
{
ASSERT_VALID(this);
ASSERT(m_cc.Flags & CC_ENABLEHOOK);
ASSERT(m_cc.lpfnHook != NULL); // can still be a user hook

m_cc.hwndOwner = PreModal();
INT_PTR nResult = ::ChooseColor(&m_cc); // this function to getcolor
PostModal();
return nResult ? nResult : IDCANCEL;
}

but i dont know action: when i drag or choose color : value of color set into: Hue, Sat, Lum, Reg, Green, Blue? but i can get this color value.Confused | :confused:
I want to handle this and change it to Hex value in my edit :


Huynhnb

.: Your success is also me :.


AnswerRe: How to get color Pin
Justin Tay6-Jul-06 0:22
Justin Tay6-Jul-06 0:22 
GeneralRe: How to get color Pin
huynhnb6-Jul-06 0:54
huynhnb6-Jul-06 0:54 
Questionhow we can compare the dialog length to screen length Pin
vasusree5-Jul-06 21:15
vasusree5-Jul-06 21:15 
AnswerRe: how we can compare the dialog length to screen length /*modified*/ Pin
Hamid_RT5-Jul-06 21:28
Hamid_RT5-Jul-06 21:28 
GeneralRe: how we can compare the dialog length to screen length Pin
vasusree5-Jul-06 21:32
vasusree5-Jul-06 21:32 
GeneralRe: how we can compare the dialog length to screen length Pin
Hamid_RT5-Jul-06 21:45
Hamid_RT5-Jul-06 21:45 
GeneralRe: how we can compare the dialog length to screen length Pin
vasusree5-Jul-06 23:33
vasusree5-Jul-06 23:33 
GeneralRe: how we can compare the dialog length to screen length Pin
Hamid_RT6-Jul-06 1:01
Hamid_RT6-Jul-06 1:01 
AnswerRe: how we can compare the dialog length to screen length Pin
Weiye Chen5-Jul-06 21:47
Weiye Chen5-Jul-06 21:47 
QuestionLPINT causes Exception Pin
Checker20035-Jul-06 21:12
Checker20035-Jul-06 21:12 
AnswerRe: LPINT causes Exception Pin
Sarath C5-Jul-06 21:25
Sarath C5-Jul-06 21:25 
GeneralRe: LPINT causes Exception Pin
Checker20035-Jul-06 21:30
Checker20035-Jul-06 21:30 
GeneralRe: LPINT causes Exception Pin
Justin Tay5-Jul-06 22:27
Justin Tay5-Jul-06 22:27 
QuestionUpdateWindow is required? Pin
Sarath C5-Jul-06 20:35
Sarath C5-Jul-06 20:35 
AnswerRe: UpdateWindow is required? Pin
Hamid_RT5-Jul-06 20:41
Hamid_RT5-Jul-06 20:41 
GeneralRe: UpdateWindow is required? Pin
Sarath C5-Jul-06 20:50
Sarath C5-Jul-06 20:50 
GeneralRe: UpdateWindow is required? Pin
Sarath C5-Jul-06 20:55
Sarath C5-Jul-06 20:55 

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.