SelectObject The SelectObject function selects an object into the specified device context. The new object replaces the previous object of the same type. VB4-32,5,6 Declare Function SelectObject Lib "gdi32" Alias "SelectObject" (ByVal hdc As Long, ByVal hObject As Long) As Long |
Operating Systems Supported |
Requires Windows NT 3.1 or later; Requires Windows 95 or later |
· hdc Identifies the device context.
· hgdiobj Identifies the object to be selected. The specified object must have been created by using one of the following functions: CreateBitmap, CreateBitmapIndirect, CreateCompatibleBitmap, CreateDIBitmap, CreateDIBSection, CreateBrushIndirect, CreateDIBPatternBrush, CreateDIBPatternBrushPt, CreateHatchBrush, CreatePatternBrush, CreateSolidBrush, CreateFont, CreateFontIndirect, CreatePen, CreatePenIndirect, CombineRgn, CreateEllipticRgn, CreateEllipticRgnIndirect, CreatePolygonRgn, CreateRectRgn, CreateRectRgnIndirect |
If the selected object is not a region and the function succeeds, the return value is the handle of the object being replaced. If the selected object is a region and the function succeeds, the return value is one of the following values: SIMPLEREGION Region consists of a single rectangle. COMPLEXREGION Region consists of more than one rectangle. NULLREGION Region is empty.
If an error occurs and the selected object is not a region, the return value is NULL. Otherwise, it is GDI_ERROR. |
|