Thema: Delphi Rahmen zeichnen

Einzelnen Beitrag anzeigen

Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.043 Beiträge
 
Delphi XE2 Professional
 
#5

Re: Rahmen zeichnen

  Alt 4. Sep 2006, 10:34
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.
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat