How to draw directly on the Windows Desktop?
Through some API functions like
To draw a text
Handle := GetDesktopWindow;
Dc := GetWindowDC(Handle) ;
ACanvas := TCanvas.Create;
try
ACanvas.Handle := DC;
BeginPath(ACanvas.Handle) ;
ACanvas.Font.Color := clRed;
ACanvas.Font.Name := 'Tahoma';
ACanvas.Font.Size := 30;
SetBkMode(ACanvas.Handle, TRANSPARENT) ;
EndPath(ACanvas.Handle) ;
ACanvas.TextOut(0, 0, TextToDraw) ;
finally
ReleaseDC(Handle, ACanvas.Handle) ;
ACanvas.Free;
end;
Is This Answer Correct ? | 2 Yes | 2 No |
I'm using Delphi 4/5 and have am trying to fill a RichEdit control with both European characters and Thai characters - while I can change character colours the font stays with what was selected for the control:- reLangB.SelAttributes.Color :=dCol; reLangB.SelAttributes.Name :=FontName[dLang]; reLangB.SelAttributes.Charset :=FontChar[dLang]; reLangB.SelAttributes.Style :=[]; reLangB.Lines.Add(dText); The FontName and FontChar arrays contain the font info, and using a similar method for Captions and EditBoexes works! Anybody any ideas? Thanx in advance!
How much does MTS improve connect times?
How to determine the week number of a given day in the year?
How to Move a form by clicking in its client area ?
How to Disable system menu in code?
How to Connect via ODBC using Delphi or C++ Builder ?
How to Map a DLL into another process ?
How to Clear the window in a console application?
what is the Purpose of the interbase Client32 files?
How to Use mouse_event() to similate mouse events?
Explain ODBC Constraints ?
How to Retrieve a users login name ?