EgtExecutor (ModelessDialog) :
- Aggiunta gestione dialoghi non modali.
This commit is contained in:
+6
-5
@@ -22,7 +22,7 @@
|
||||
|
||||
using namespace std ;
|
||||
|
||||
#pragma comment( lib, "Comctl32.lib")
|
||||
#pragma comment( lib, "Comctl32.lib") // per funzioni LRESULT CALLBACK
|
||||
|
||||
HWND phDlgModeless = nullptr ;
|
||||
int nDlgModelessItem = -1 ;
|
||||
@@ -53,7 +53,8 @@ UpdateIdsModelessDialog( HWND phDlgModeless, int nDlgModelessItem)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
LRESULT CALLBACK UpdateSelectionModelessDialog( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
|
||||
LRESULT
|
||||
CALLBACK UpdateSelectionModelessDialog( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
|
||||
{
|
||||
if ( msg == WM_GETDLGCODE)
|
||||
return DLGC_WANTALLKEYS ;
|
||||
@@ -61,7 +62,7 @@ LRESULT CALLBACK UpdateSelectionModelessDialog( HWND hwnd, UINT msg, WPARAM wPar
|
||||
if ( msg == WM_KEYDOWN && wParam == VK_RETURN) {
|
||||
// dwRefData contiene l'ID dell'EDIT
|
||||
int nEditId = int( dwRefData) ;
|
||||
HWND hwndDlg = GetParent(hwnd);
|
||||
HWND hwndDlg = GetParent(hwnd) ;
|
||||
if ( hwndDlg == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il testo dell'EDIT corretto
|
||||
@@ -75,7 +76,7 @@ LRESULT CALLBACK UpdateSelectionModelessDialog( HWND hwnd, UINT msg, WPARAM wPar
|
||||
if ( ! sIds.empty()) {
|
||||
STRVECTOR vsIds;
|
||||
Tokenize( sIds, ",", vsIds) ;
|
||||
for ( auto& s : vsIds) {
|
||||
for ( const string& s : vsIds) {
|
||||
int nId = GDB_ID_NULL ;
|
||||
if ( FromString( s, nId) && nId != GDB_ID_NULL)
|
||||
ExeSelectObj( nId) ;
|
||||
@@ -86,5 +87,5 @@ LRESULT CALLBACK UpdateSelectionModelessDialog( HWND hwnd, UINT msg, WPARAM wPar
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
return ( DefSubclassProc(hwnd, msg, wParam, lParam)) ;
|
||||
return ( DefSubclassProc( hwnd, msg, wParam, lParam)) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user