EgtExecutor 2.4f2 :
- migliorie a funzioni lua EgtFileDialog e EgtDialogBox.
This commit is contained in:
Binary file not shown.
+3
-3
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user