Einzelnen Beitrag anzeigen

Satty67

Registriert seit: 24. Feb 2007
Ort: Baden
1.566 Beiträge
 
Delphi 2007 Professional
 
#9

AW: TFramePanel, Panel mit "Loch"

  Alt 19. Nov 2011, 15:30
Zufällig durch einen Link in einem aktuellen Thread wieder auf diesen Thread gestossen:

Zum Freigeben der HRGN bzw. MSDN zu SetWindowRGN;

After a successful call to SetWindowRgn, the system owns the region specified by the region handle hRgn.
The system does not make a copy of the region. Thus, do not make further function calls with this region handle.
In particular, do not delete this region handle.
The system deletes the region handle when it no longer needed.


Man sollte also Stahli's Anpassung noch etwas verfeinern:
Delphi-Quellcode:
  if SetWindowRGN(Handle, HRegion, True) = 0 then
    DeleteObject(HRegion);
PS. Sieht man solche Handles eigentlich im Taskmanager als GDI Handle? Dann könnte man das prüfen...

Geändert von Satty67 (19. Nov 2011 um 15:34 Uhr)
  Mit Zitat antworten Zitat