SetTextColor设置文本前景色
__gdi_entry WINGDIAPI COLORREF WINAPI
SetTextColor(
__in HDC hdc, //绘图设备上下文
__in COLORREF color //颜色设置
);
SetBkColor设置文件背景色
__gdi_entry WINGDIAPI COLORREF WINAPI
SetBkColor(
__in HDC hdc, //绘图设备上下文件
__in COLORREF color //颜色设置
);
SetBkMode 设置指定DC的背景混合模式,背景混合模式用于与文本,填充画刷和当画笔不是实线时。
__gdi_entry WINGDIAPI int WINAPI
SetBkMode(
__in HDC hdc, //设备上下文
__in int mode //模式
);
返回值是设置的mode值
mode选项
/* Background Modes */
#define TRANSPARENT 1 //透明的背景色
#define OPAQUE 2 //背景色不透明
#define BKMODE_LAST 2
设置字间距
__gdi_entry WINGDIAPI int WINAPI
SetTextCharacterExtra(
__in HDC hdc, //设备上下文
__in int extra //间距数值
);
微软自定义颜色
#define COLOR_SCROLLBAR 0
#define COLOR_BACKGROUND 1
#define COLOR_ACTIVECAPTION 2
#define COLOR_INACTIVECAPTION 3
#define COLOR_MENU 4
#define COLOR_WINDOW 5 //窗口背景颜色
#define COLOR_WINDOWFRAME 6
#define COLOR_MENUTEXT 7
#define COLOR_WINDOWTEXT 8 //文本标准色
#define COLOR_CAPTIONTEXT 9
#define COLOR_ACTIVEBORDER 10
#define COLOR_INACTIVEBORDER 11
#define COLOR_APPWORKSPACE 12
#define COLOR_HIGHLIGHT 13
#define COLOR_HIGHLIGHTTEXT 14
#define COLOR_BTNFACE 15
#define COLOR_BTNSHADOW 16
#define COLOR_GRAYTEXT 17
#define COLOR_BTNTEXT