惧留孙网

juliusun.com

惧留孙网 > 惧留孙课堂 > 在线手册 > WINDOWS API手册 > GetStockObject
acceptAdjustWindowRectAdjustWindowRectExAngleArcAppendMenuArcArcToBeginPaintbindBitBltBM_GETCHECKBM_SETCHECKButton_GetCheckButton_SetCheckClientToScreenclosesocketconnectCreateCompatibleDCCreateDialogCreateDialogParamCreateFontCreateMenuCreatePenCreatePopupMenuCreateSolidBrushCreateWindowCreateWindowExDefWindowProcDeleteDCDeleteObjectDestroyCursorDestroyIconDestroyMenuDestroyWindowDialogBoxDialogBoxParamDialogProcDispatchMessageDrawIconDrawIconExEdit_HideBalloonTipEdit_ShowBalloonTipEDITBALLOONTIPEllipseEM_HIDEBALLOONTIPEM_SHOWBALLOONTIPEndDialogEndPaintFillRectFrameRectGetArcDirectionGetClientRectGetDlgItemGetDlgItemTextGetMessageGetStockObjectGetSystemMetricsGetTextAlignGetWindowTextGetWindowTextLengthInvalidateRectIsDialogMessageLineTolistenLoadCursorLoadIconLoadImageMAKEINTRESOURCEMessageBoxMoveToExMSGPiePOINTPolygonPolylinePolylineToPolyPolylinePostMessagePostQuitMessagePostThreadMessageRectanglerecvRegisterClassRegisterClassExRoundRectScreenToClientSelectObjectsendSendDlgItemMessageSendMessageSetArcDirectionSetBkColorSetBkModeSetDlgItemTextSetPixelSetTextAlignSetTextColorSetWindowTextShowWindowsocketstrcmpStretchBltstrlenTextOutTrackPopupMenuTrackPopupMenuExTranslateMessageUnregisterClassUpdateWindowwcscmpwcslenWindowProcWinMainWM_CHARWM_CLOSEWM_COMMANDWM_CREATEWM_DESTROYWM_GETTEXTWM_GETTEXTLENGTHWM_INITDIALOGWM_KEYDOWNWM_KEYUPWM_LBUTTONDBLCLKWM_LBUTTONDOWNWM_LBUTTONUPWM_MBUTTONDBLCLKWM_MBUTTONDOWNWM_MBUTTONUPWM_MOUSEHWHEELWM_MOUSEMOVEWM_MOUSEWHEELWM_NCDESTROYWM_NCHITTESTWM_PAINTWM_QUITWM_RBUTTONDBLCLKWM_RBUTTONDBLCLKWM_RBUTTONDOWNWM_RBUTTONUPWM_SETFONTWM_SETTEXTWM_XBUTTONDBLCLKWM_XBUTTONDOWNWM_XBUTTONUPWNDCLASSWNDCLASSEXWSACleanupWSADATAWSAStartupwsprintf

GetStockObject 函数

返回备用画笔、画刷、字体或调色板句柄。
 函数原型:
 HGDIOBJ GetStockObject ( int fnObject  );
参数
fnObject
类型:int
备用对象的类型,常用值如下:

意义
BLACK_BRUSH黑色画刷
DKGRAY_BRUSH深灰色画刷
GRAY_BRUSH灰色画刷
HOLLOW_BRUSH空画刷,同NULL_BRUSH
NULL_BRUSH空画刷,同HOLLOW_BRUSH
LTGRAY_BRUSH浅灰色画刷
WHITE_BRUSH白色画刷
BLACK_PEN黑色画笔
NULL_PEN空画笔,不会画出任何内容。
WHITE_PEN白画笔
DEVICE_DEFAULT_FONT设备相关的字体
DEFAULT_PALETTE默认调色板,这种调色板由系统调色板中几个静态颜色组成


上述列表为常用值,点击 转到官方说明及完整列表
返回值
类型:HGDIOBJ
如果成功,返回所请求逻辑对象的句柄。
如果失败,返回 NULL。
备注
说明由微软官方翻译而来,可查看 官方英文版说明
支持
最低桌面系统支持Windows 2000 Professional
头文件Wingdi.h (已包含在Windows.h中)
Gdi32.lib
DLLGdi32.dll

作者:QQ:3304576112 交流QQ群:316930386 C语言窗口程序学习群 本站保留本页版权,可共享网址,匆复制内容

抖音
©2015-2024 惧留孙网 juliusun.com

京ICP备15039193号-1

首页 教程 下载 文章 聊天 我的