From: Steve on


"John Smith" <spam(a)not-a-real-domain-name.com> wrote in message
news:OxG92oYDLHA.5476(a)TK2MSFTNGP06.phx.gbl...
> Here's what my color values look like now:
>
> DrawBorder hdc, rct, lPnt, hPen, 10999801
>
> If I replace the value above (10999801) with a value converted from hex to
> decimal it draws an entirely different color.
>
>
> How can I accurately convert colors?
>
>
> Thank you

The number you are passing (10999801) is a decimal number. If you wanted
that to be interpreted as a hex number simply append &H to the front of it
like so &H10999801.

Steve

From: Jeff Johnson on
"John Smith" <spam(a)not-a-real-domain-name.com> wrote in message
news:OxG92oYDLHA.5476(a)TK2MSFTNGP06.phx.gbl...

> Here's what my color values look like now:
>
> DrawBorder hdc, rct, lPnt, hPen, 10999801
>
> If I replace the value above (10999801) with a value converted from hex to
> decimal it draws an entirely different color.

So try reversing Red and Blue in the hex representation before you convert
it to decimal.

For example, your color above is #A7D7F9. If we use RGB order then Red = A7,
Green = D7, Blue = F9 and we get a pale slate blue. If, however, this number
is in BGR order (Red = F9, Green = D7, Blue = A7) it should result in a
flesh tone (or at least it's pretty close the the flesh tone of a white guy
like me). Whichever one of these your 10999801 above is tells you how your
hex format needs to be.