var
R: TRect;
ThemeData: HTHEME;
Opts: TDTTOpts;
begin
R := Rect(10, 10, 150, 30);
OffsetRect(R, 10, 0);
ThemeData := OpenThemeData(
Handle, '
WINDOW');
Opts.dwSize := SizeOf(Opts);
Opts.crText := clREd;
Opts.iTextShadowType := TST_CONTINUOUS;
Opts.ptShadowOffset := Point(1, 1);
Opts.fApplyOverlay := true;
Opts.iGlowSize := 1;
Opts.dwFlags := DTT_TEXTCOLOR
or DTT_SHADOWTYPE
or DTT_SHADOWCOLOR
or DTT_SHADOWOFFSET
or DTT_GLOWSIZE;
DrawThemeTextEx(0, Bitmap.Canvas.Handle, TEXT_BODYTITLE, TS_NEARHOT,
'
Dies ist ein Test', -1, 0, @R, Opts);
CloseThemeData(ThemeData);
SetWindowPos(
Handle, HWND_TOPMOST, Left, Top, Width, Height, SWP_NOACTIVATE
or
SWP_NOMOVE
or SWP_NOSIZE);
UpdateLayeredWindow(
Handle, 0,
nil, @BitmapSize, Bitmap.Canvas.Handle,
@BitmapPos, 0, @BlendFunction, ULW_ALPHA);