Zitat von
Luckie:
Rectangle(dc, 5, 5, 50, 50);
Ein nicht gefülltes Rechteck.
Nein, Lucky, so geht es nicht.
Zitat:
The Rectangle function draws a rectangle. The rectangle is outlined by using the current pen and filled by using the current brush.
Aber FrameRect macht genau das, was gewünscht ist.
Zitat:
The FrameRect function draws a border around the specified rectangle by using the specified brush. The width and height of the border are always one logical
unit.
int FrameRect(
HDC hDC, //
handle to
DC
CONST RECT *lprc, // rectangle
HBRUSH hbr //
handle to brush
);
Parameters
hDC
[in]
Handle to the device context in which the border is drawn.
lprc
[in] Pointer to a RECT structure that contains the logical coordinates of the upper-left and lower-right corners of the rectangle.
hbr
[in]
Handle to the brush used to draw the border.