EgtExecutor 2.4f2 :

- migliorie a funzioni lua EgtFileDialog e EgtDialogBox.
This commit is contained in:
DarioS
2022-07-03 18:58:04 +02:00
parent 1933de2b50
commit 7db0c750dc
2 changed files with 3 additions and 3 deletions
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -586,14 +586,14 @@ LuaFileDialog( lua_State* L)
OPENFILENAME ofn ;
ZeroMemory( &ofn, sizeof( ofn)) ;
ofn.lStructSize = sizeof( ofn) ;
ofn.hwndOwner = ExeGetMainWindowHandle() ; // FindTopWindow() ;
ofn.hwndOwner = ExeGetMainWindowHandle() ;
ofn.lpstrFilter = LPWSTR( wsFilter) ;
ofn.lpstrFile = LPWSTR( wsFileName) ;
ofn.nMaxFile = MAX_PATH ;
ofn.Flags = OFN_DONTADDTORECENT | OFN_PATHMUSTEXIST ;
// Visualizzo il dialogo
if ( bOpenVsSave) {
ofn.Flags |= OFN_FILEMUSTEXIST ;
ofn.Flags |= OFN_FILEMUSTEXIST | OFN_HIDEREADONLY ;
if ( GetOpenFileName( &ofn) != FALSE)
LuaSetParam( L, wstrztoA( wsFileName)) ;
else
@@ -1002,7 +1002,7 @@ CALLBACK DialogBoxProc( HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam
POINT ptLR{ rcLR.left, rcLR.top} ;
ScreenToClient( hwndDlg, &ptLR) ;
// centro e scalo il dialogo
int nNewH = rcLR.top + 2 * OFFS_CTRLS ;
int nNewH = rcLR.top - rcOwner.top + 2 * OFFS_CTRLS ; // non chiaro perchè va sottratto rcOwner.top ma funziona sempre
SetWindowPos( hwndDlg,
HWND_TOP,
( rcOwner.left + rcOwner.right - ( rcDlg.right - rcDlg.left)) / 2,