The information in this article applies to:
SUMMARYThis article shows by example how to use the COleControl::TranslateColor() method can be used to convert an OLE_COLOR value into a COLORREF value by using the cast operator. MORE INFORMATIONThe main difference between an OLE_COLOR and a COLORREF is that if an OLE_COLOR has its high-order bit set, the low-order byte is treated as a system color index. The function OleTranslateColor(), which is called by COleControl::TranslateColor(), translates the system color index into a COLORREF when this condition is detected. The following code illustrates conversion between an OLE_COLOR and a COLORREF:
REFERENCESFor a complete list of the translations performed by OleTranslateColor(), or for more information about the OLE_COLOR type, please see the "Microsoft OLE Control Developer's Kit User's Guide and Reference," Appendix D: OLE Controls Architecture, under the heading "Standard Color Type." Additional query words: kbinf 1.00 1.10
Keywords : |
Last Reviewed: January 18, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |