六种GDI对象,画笔、画刷、位图、区域、字体和调色板。除了调色板之外,这些对象都是通过SelectObject选进设备描述表的。
This function returns the previously selected object of the specified type.
SelectObject将返回设备描述表中上一次选择的对象句柄。
例:
hPen = SelectObject (hdc, CreatePen (PS_DASH, 0, RGB (255, 0, 0))) ;
DeleteObject (SelectObject (hdc, hPen)) ;
或:
hPen = CreatePen(PS_DASH,0,RGB(255,0,0));
hOldPen = SelectObject(hdc,hPen);
```````balbalbalbalbalb``````````````
SelectObject(hdc,hOldPen);
DeleteObject(hPen);
来源:CSDN
作者:小陆老师
链接:https://blog.csdn.net/qq_34573534/article/details/103567051