EgtExecutor :

- altre migliorie a DialogBox per lua.
This commit is contained in:
Dario Sassi
2026-07-07 14:56:18 +02:00
parent 99ffa2a5e7
commit 45135b4529
+14 -11
View File
@@ -190,21 +190,24 @@ CALLBACK UpdateDialogSelection( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
if ( hwndDlg == nullptr)
return FALSE ;
// recupero il testo dell'EDIT corretto
string sIds ;
string sSel ;
AtoWEX<128> wsEdit( "") ;
if ( GetDlgItemText( hwndDlg, nEditId, LPWSTR( wsEdit), 128) > 0)
sIds = wstrztoA( wsEdit) ;
sSel = wstrztoA( wsEdit) ;
// deseleziono tutto
ExeDeselectAll() ;
// seleziono gli ID contenuti
if ( ! sIds.empty()) {
STRVECTOR vsIds;
Tokenize( sIds, ",", vsIds) ;
for ( const string& s : vsIds) {
int nId = GDB_ID_NULL ;
if ( FromString( s, nId) && nId != GDB_ID_NULL)
ExeSelectObj( nId) ;
// seleziono gli Id contenuti
if ( ! sSel.empty()) {
INTVECTOR vIds ;
FromString( sSel, vIds) ;
string sOkSel = "" ;
for ( int nId : vIds) {
if ( ExeSelectObj( nId))
sOkSel += ToString( nId) + "," ;
}
if ( ! sOkSel.empty())
sOkSel.pop_back() ;
SetDlgItemText( hwndDlg, nEditId, stringtoW( sOkSel)) ;
}
// aggiorno la grafica ed esco
ExeDraw() ;
@@ -562,7 +565,7 @@ CALLBACK DialogBoxProc( HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam
break ;
case CTRL_BUTTON :
if ( GetDlgItemText( hwndDlg, IDC_EDIT1 + i, LPWSTR( wsEdit), 128) > 0)
s_sEdit[i] = wstrztoA( wsEdit) ;
s_sEdit[i] = ValidateSelection( wstrztoA( wsEdit)) ;
break ;
}
}