CDC::SelectStockObject 与CDC::SelectObject

来源:百度知道 编辑:UC知道 时间:2024/06/17 09:17:50
CDC::SelectStockObject 与CDC::SelectObject 有什么区别?

不一样啊
SelectStockObject只能把有限的几种对象选入设备环境,而SelectObject是可以把任意GDI对象选入设备环境的啊

你查一下MSDN吧,上面枚举出所有SelectStockObject能选入的对象,以下是原文

BLACK_BRUSH Black brush.
DKGRAY_BRUSH Dark gray brush.
GRAY_BRUSH Gray brush.
HOLLOW_BRUSH Hollow brush.
LTGRAY_BRUSH Light gray brush.
NULL_BRUSH Null brush.
WHITE_BRUSH White brush.
BLACK_PEN Black pen.
NULL_PEN Null pen.
WHITE_PEN White pen.
ANSI_FIXED_FONT ANSI fixed system font.
ANSI_VAR_FONT ANSI variable system font.
DEVICE_DEFAULT_FONT Device-dependent font.
OEM_FIXED_FONT OEM-dependent fixed font.
SYSTEM_FONT The system font. By default, Windows uses the system font to draw menus, dialog-box controls, and other text. In Windows versions 3.0 and later, the system font is proportional width; earlier versions of Windows use a fixed-width system font.
SYSTEM_FIXED_FONT The fixed-width system font used in Windows pr