mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 06:52:35 +02:00
Qt: TQtWidgetSet.GetDC() check if hwnd is valid handle.
git-svn-id: trunk@30541 -
This commit is contained in:
parent
fc8550cf53
commit
0abaa5be8e
@ -2268,18 +2268,14 @@ begin
|
||||
WriteLn('Trace:> [WinAPI GetDC] hWnd: ', dbghex(hWnd));
|
||||
{$endif}
|
||||
|
||||
Widget := TQtWidget(hWnd);
|
||||
|
||||
if Widget <> nil then
|
||||
if QtWidgetSet.IsValidHandle(hWnd) then
|
||||
begin
|
||||
Widget := TQtWidget(hWnd);
|
||||
Result := Widget.Context;
|
||||
if Result = 0 then
|
||||
Result := HDC(QtDefaultContext);
|
||||
end
|
||||
else
|
||||
begin
|
||||
end else
|
||||
Result := HDC(QtScreenContext);
|
||||
end;
|
||||
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
WriteLn('Trace:< [WinAPI GetDC] Result: ', dbghex(Result));
|
||||
|
Loading…
Reference in New Issue
Block a user