Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

GDI+ to GDI color ??

charlumerlucharlumerlu Member Posts: 6
Hello,

I want to use an OCX that needs GDI colors such as COLORREF (RGB(0,255,0) for example). With .NET framework we can use ARGB colors or predefined colors but my OCX control does not understand these kind of colors. Does anyone know how we can convert colors from .NET and GDI+ to colors from MFC and GDI ???
Thanks.

Charly

Comments

  • charlumerlucharlumerlu Member Posts: 6
    : Hello,
    :
    : I want to use an OCX that needs GDI colors such as COLORREF (RGB(0,255,0) for example). With .NET framework we can use ARGB colors or predefined colors but my OCX control does not understand these kind of colors. Does anyone know how we can convert colors from .NET and GDI+ to colors from MFC and GDI ???
    : Thanks.
    :
    : Charly
    :

    Well I've just found the solution :

    (uint)ColorTranslator.ToOle(Color.Black)
Sign In or Register to comment.