Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Has anyone used the PaintTo function to draw WinControls on a canvas bitmap? Help! I can’t do anything. Find similar branches


Kost   (2001-12-14 14:10) [0]

Has anyone used the PaintTo function to draw WinControl "s on a canvas bitmap? Help! I can't do anything.



valery_f   (2001-12-14 18:16) [1]

Enjoyed. The only "but" is that the initially invisible WinControl does not have a handle and gives an ex- tersion at PaintTo. If this is your component - call CreateHandle, if not - make it visible then hide it - the handle will appear and PaintTo will work.



DK   (2001-12-15 03:52) [2]

2valery_f
Can i ask you:
Like this? There is a control, but there is no handle. Is this possible?



Kost   (2001-12-15 13:05) [3]

There is a form TForm1. On it is placed the "experimental button" BitBtn1.
There is a desire, by clicking on another button - Button1 to do the following:
- draw a BitBtn1 image onto a canvas bitmap canvas using PaintTo
- bring the resulting bitmap to the outline of the form

DOES NOT WORK! BitBtn1 is not drawn in bitmap! WHY! WHERE AM I AM NOT RIGHT?

procedure TForm1.FormCreate (Sender: TObject);
begin
// Create a bitmap
bmp: = TBitmap.Create;
bmp.Width: = 150;
bmp.Height: = 150;
end;

procedure TForm1.Button1Click (Sender: TObject);
begin
// When you click on the button, draw BitBtn1 on the canvas bitmap
BitBtn1.PaintTo (bmp.Canvas.Handle, 0, 0);
Invalidate; // To cause the form to be redrawn
end;

procedure TForm1.FormPaint (Sender: TObject);
begin
// Display the bitmap form
Canvas.Draw (0,0, bmp);
end;



DK   (2001-12-16 02:26) [4]

Everything is working!!!
Maybe you just do not handle pressing a button?
procedure TForm1. Button1Click(Sender: TObject);
procedure TForm1. BitBtn1Click(Sender: TObject);



Kost   (2001-12-16 12:12) [5]

And, all the same, does not work. The button in bitmap is not drawn. TPanel is drawn and TButton and TBitBtn are not.



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.57 MB
Time: 0.026 c
3-21972
Wetnose
2001-12-06 08:30
2002.01.08
FIBs + & Generators


3-21942
Rev
2001-12-03 12:19
2002.01.08
Good people help with the stored procedure.


1-22050
Russian
2001-12-18 17:03
2002.01.08
WELL VERY INTERESTING QUESTION :))))


3-21978
Anonymous worker
2001-12-04 20:25
2002.01.08
ADO + Excel + Delphi5


14-22392
~ Mag ~
2001-11-10 13:27
2002.01.08
People how to unlock the registry in windows ???





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish