.


:




:

































 

 

 

 





Windows GDI (Graphics Device Interface) . , GDI ( , ), - .

C++Builder GDI, . , Windows GDI - . , Windows .

. , .

7.1 C++Builder

C++Builder Windows GDI . , . GDI (device context handle), - , . , .

, , C++Builder Canvas () . - , . Windows GDI , , .

, , , - . , . .

, C++Builder , - . , , , , , . C++Builder - , , -, . , .

7.1 , , C++Builder . GDI , OWL Windows , . .

void TMyWindow::Paint(TDC& PaintDC, bool erase, TRect& rect) {

HPEN PenHandle, OldPenHandle;

HBRUSH BrushHandle, OldBrushHandle;

PenHandle = CreatePen(PS_SOLID, 1, RGB(0, 0, 255));

OldPenHandle = SelectObject(PaintDC, PenHandle);

BrushHandle = CreateSolidBrush(RGB(255, 255, 0));

OldBrushHandle = SelectObject(PaintDC, BrushHandle);

Ellipse(10, 10, 50, 50);

SelectObject(OldBrushHandle);

DeleteObject(BrushHandle);

SelectObject(OldPenHandle);

DeleteObject(PenHandle);

)

void_fastcall TFormI::FormPaint(TObject *Sender) {

Canvas->Pen->Color = clBlue; // Canvas->Brush->Color = clYellow; // Canvas->Ellipse(10, 20, 50, 50); // }





:


: 2015-10-01; !; : 673 |


:

:

.
==> ...

1337 - | 1280 -


© 2015-2024 lektsii.org - -

: 0.008 .