From 7db0c750dc01e588a91a8749bdd4f67142e012d0 Mon Sep 17 00:00:00 2001 From: DarioS Date: Sun, 3 Jul 2022 18:58:04 +0200 Subject: [PATCH] EgtExecutor 2.4f2 : - migliorie a funzioni lua EgtFileDialog e EgtDialogBox. --- EgtExecutor.rc | Bin 18890 -> 18890 bytes LUA_General.cpp | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 0ca4a04ee9025157e1efc9ed82404397819d5171..b3451d785ce88d2e8d9763a14f40857cd37c0d3c 100644 GIT binary patch delta 199 zcmX>#neo(Q#trM3wOtwV7}6PX7%~}(88R3Y7&I6{fg+gNwN_Hi+UP>tdnc~Xqt-0xV-$P2RF6Kr1&LnX+z W$sd@rHqUU@VaAX;xOtkp2@?QDW;ROz delta 202 zcmX>#neo(Q#trM3)jb*V7}6PX7*ZLEfmne-gCUrqgdq`#Gl9HNpll|Hz4<1yA~U1m z=HF~@*}>Ftrp+4!rC5RN(_#pr2E{k>#2PvICbRV94{pmQ^EoV<{L4u|FduBaC)oNN YptXrW6|I}+IO{NDm6G24!R;0k0B}$_6aWAK diff --git a/LUA_General.cpp b/LUA_General.cpp index 50e00dc..154706f 100644 --- a/LUA_General.cpp +++ b/LUA_General.cpp @@ -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,