AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Child Window Transparent

Ein Thema von EWeiss · begonnen am 21. Apr 2017
Antwort Antwort
EWeiss
(Gast)

n/a Beiträge
 
#1

Child Window Transparent

  Alt 21. Apr 2017, 20:04
Gibt es eine andere Möglichkeit ein Child Window transparent zu setzen ohne SetWindowRgn?
Ich möchte damit einen Overlay Text auf mein VideoWindow setzen.

Im Moment gehe ich so vor.

Delphi-Quellcode:
    WM_TIMER:
      begin
        if wP = MOVIE_TIMER then
        begin
          if TimerTick then
          begin
            Result := 0;
            exit;
          end;

          if aMediaProperty.PlaybackLength > 0 then
            try
              MilSecond := KVideo_GetStreamPosition div 10000;
              trbSearch.SetTrackValue(trbSearch.Handle, MilSecond);
              Second := MilSecond div 1000;
              
              if Second = LastPlayingPos then
              begin
                TimerTick := false;
                Result := 0;
                exit;
              end
              else
                LastPlayingPos := Second;

              time := FormatDateTime('hh:nn:ss', Second / 86400);

              w := 255;
              h := 60;

              rw.Right := w;
              rw.Bottom := h;
              rw.Left := 0;
              rw.Top := 0;

              DC := GetDC(TextHandle);

              hTempDC := DoubleBuffer(DC, rw.Right, rw.Bottom, CreateBuffer);

              GDIP_DrawTextToDC(hTempDC, time, rw, MakeColor
                (255, 3, 123, 250), 'LCDDisplayCapsSSK', 60, FontStyleBold, -1, 0, LCDFont);

              SKAERO_SetCTLText(lblMovieElapsed.Handle, time);

              ARgn := RegionFromBitmap(FDBufferhBMTemp, $000000);
              SetWindowRgn(TextHandle, ARgn, true);
            finally
              DoubleBuffer(0, 0, 0, DestroyBuffer);
              ReleaseDC(TextHandle, DC);
              DeleteObject(ARgn);
            end;
        end;
      end;
Das funktioniert soweit ganz gut. Mir wäre aber eine einfachere Lösung lieber.

gruss

Geändert von EWeiss (11. Jul 2019 um 15:47 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:53 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz