Browse Source

* Prevent a crash of the tw2423 test on some versions of Windows.

Yuriy Sydorov 3 years ago
parent
commit
daa05f19cb
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests/webtbs/tw2423.pp

+ 4 - 0
tests/webtbs/tw2423.pp

@@ -6,6 +6,7 @@
 {$mode objfpc}
 {$endif}
 { $define BugAvoid}
+uses windows;
 type
  pVariant=^Variant;
 function ShowHTMLDialog(const hwndParent:longint;const pmk:pointer;
@@ -103,5 +104,8 @@ begin
 
 {$endif}
 
+ // Create a dummy main window to prevent a crash in ShowHTMLDialog() on some versions of Windows
+ CreateWindow('STATIC', 'Test', WS_POPUP, 0, 0, 200, 200, 0, 0, HInstance, nil);
+
  ShowHTMLDialog(0,pmk,InParam,nil,nil);
 end.