File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -455,7 +455,7 @@ INT PhShowMessage2(
455
455
if (!message )
456
456
return -1 ;
457
457
458
- config .dwFlags = TDF_ALLOW_DIALOG_CANCELLATION | (IsWindowVisible (hWnd ) ? TDF_POSITION_RELATIVE_TO_WINDOW : 0 );
458
+ config .dwFlags = TDF_ALLOW_DIALOG_CANCELLATION | (( hWnd && IsWindowVisible (hWnd )) ? TDF_POSITION_RELATIVE_TO_WINDOW : 0 ) | TDF_SIZE_TO_CONTENT ;
459
459
config .dwCommonButtons = Buttons ;
460
460
config .hwndParent = hWnd ;
461
461
config .pszWindowTitle = PhApplicationName ;
@@ -628,7 +628,7 @@ BOOLEAN PhShowConfirmMessage(
628
628
629
629
config .hwndParent = hWnd ;
630
630
config .hInstance = PhInstanceHandle ;
631
- config .dwFlags = TDF_ALLOW_DIALOG_CANCELLATION | (IsWindowVisible (hWnd ) ? TDF_POSITION_RELATIVE_TO_WINDOW : 0 );
631
+ config .dwFlags = TDF_ALLOW_DIALOG_CANCELLATION | (( hWnd && IsWindowVisible (hWnd ) ) ? TDF_POSITION_RELATIVE_TO_WINDOW : 0 );
632
632
config .pszWindowTitle = PhApplicationName ;
633
633
config .pszMainIcon = Warning ? TD_WARNING_ICON : TD_INFORMATION_ICON ;
634
634
config .pszMainInstruction = PhaConcatStrings (3 , L"Do you want to " , action -> Buffer , L"?" )-> Buffer ;
You can’t perform that action at this time.
0 commit comments