KS> void __fastcall TGraphtest::SpeedButton1Click(TObject *Sender)
KS> {
KS> Canvas->Pen->Mode = pmBlack;
KS> Canvas->MoveTo(1,1);
KS> Canvas->LineTo(640,400);
KS> Canvas->MoveTo(1,400);
KS> Canvas->MoveTo(640,1);
KS> }
KS> Shouldn't this function draw a black cross at the Screen or at the form?
You only have 1 "LineTo" function, therefore only 1 line will be
drawn.
KS> This function loads an image and display it in an own window, but
KS> why dosn't it draw a small cross in the center of the image in a visible
KS> color?
Because you haven't specified the color to be something in relation to
the current background color. Also, you aren't constructing a pen (or
brush) to use. I've never used C++Builder but the rules about drawing
things in Windows are quite specific: one needs a pen and a specific
color.
* KWQ/2 1.2i *
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)
|