Jump to content
Software FX Community

Re: How to convert from OLE_COLOR to COLORREF


User (Legacy)

Recommended Posts

This means the color is part of a palette I would say. And you are right you

need to get handle to that palette. But even if you have it you need to

look-up the palette yourself because OLETranslateColor still gives you back

0x0100XXXX. For more information about input & output values look into MSDN

under OLETranslateColor.

Sorry can't help on this...

Stephan

DWL

"Edward Evans" <eevans@pacsim.com> wrote in message

news:5fNqCLGZAHA.2916@sfxserver.softwarefx.com...

> I tried passing null as the pallet parameter, and the value I got from the

> function was the same I put in. For example, I'm notified that a series

got

> it's color changed to bright yellow, which has the ole color value of

> 0x100000B. The corresponding COLORREF value should be somewhere around

> 0x000FFFF, but OleTranslateColor(...) just gave me back the 0x100000B

value.

>

> Stephan Klaffer wrote in message

> <1dsmNh2YAHA.2916@sfxserver.softwarefx.com>...

> >You can use OLETranslateColor(), setting the handle of the palette to

NULL.

> >

> >Stephan

> >

> >

> >"Edward Evans" <eevans@pacsim.com> wrote in message

> >news:OwCpDJLYAHA.1696@sfxserver.softwarefx.com...

> >> I've installed an events handler in my chart that get's notified when a

> >item

> >> has it's color changed (i.e. I've overriden Fire_ChangeColor(int, int,

> >> DWORD) ).

> >>

> >> The color the chart sends me is in OLE_COLOR format, and I need to

> convert

> >> it to COLORREF format.

> >>

> >> The function OleTranlateColor() requires a handle to the pallete that

the

> >> OLE_COLOR belongs to, and I can't find any interface in the chart to

get

> >> the pallette.

> >>

> >> Am I stuck?

> >>

> >> -Edward Evans

> >>

> >>

> >>

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...