Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>selectobject()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SelectObject()
Select an object for drawing functions
------------------------------------------------------------------------------

Syntax
SelectObject( <hDC>, <hObject> )   -->   hOldObject

Arguments
<hDC> specifies the device context for a window.

<hObject> is the handle to a GDI object (a brush, font, or
pen).

Returns
An integer representing the previous handle to an object is
returned.

Description
This function selects a new GDI (graphics device interface)
object into the specified device context.  This object will be
used for future GDI operations using the <hDC> device context,
unless another object of the same type (brush, font, pen) is
selected.

NOTE: Do not delete an object that is still selected, and do
not delete a device context without re-selecting the original
GDI objects.

Example
hPen = CreatePen( PS_DASH, 5, RGB( 100, 100, 100 ) )
hOldPen = SelectObject( hDC, hPen )
Rectangle( hDC, 100, 100, 400, 400 )
SelectObject( hDC, hOldPen )


See Also: CreateHatchBrush() CreatePen() CreateSolidBrush() GetDC() Rectangle()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson