佚名通过本文主要向大家介绍了colorref color,colorref,colorref rgb,mfc colorref,c colorref等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: OLE_COLOR 怎样转换成COLORREF?
描述:
解决方案1:
描述:
有个DX说用COleControl::TranslateColor,我用COleControl olecontrl实例化的时候
提示说是纯虚函数不能这样实例化,不知道该怎么做了,求DX们帮忙.
解决方案1:
STDAPI OleTranslateColor (
OLE_COLOR clr, //Color to be converted into a COLORREF
HPALETTE hpal, //Palette used for conversion
COLORREF *pcolorref //Pointer to the caller's variable that
// receives the converted result
);
hpal 可以为 NULL
你在哪里用的呀?
如果你的类继承自COleControl,
你直接写TranslateColor就可以了
可以使用OleTranslateColor
#include "olectl.h"