Patch level : 2.0 474

Files correlati     : relapp
Ricompilazione Demo : [ ]
Commento            :

Corretta ricerca del campo da associare al bottone di ricerca


git-svn-id: svn://10.65.10.50/trunk@11162 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-05-21 14:26:29 +00:00
parent ba6565323a
commit d8637fb717
4 changed files with 34 additions and 26 deletions

View File

@ -791,19 +791,19 @@ bool TMAPI_session::load_mapi()
return TRUE;
// Check if MAPI is installed on the system
BOOL MAPI_installed = GetProfileInt("Mail", "MAPI", 0);
BOOL MAPI_installed = ::GetProfileInt("Mail", "MAPI", 0);
if(!MAPI_installed)
return FALSE;
return error_box("MAPI non attivato nel file win.ini");
UINT fuError = SetErrorMode(SEM_NOOPENFILEERRORBOX);
_hlibMAPI = LoadLibrary(szMAPIDLL);
SetErrorMode(fuError);
DWORD* err = (DWORD*)_hlibMAPI;
if ((DWORD)err < 32)
if (_hlibMAPI < (HINSTANCE)HINSTANCE_ERROR)
{
DWORD err = *((DWORD*)_hlibMAPI) & 0xFFFF;
_hlibMAPI = NULL;
return FALSE;
return error_box("Errore di caricamento di %s: %lu", szMAPIDLL, err);
}
if (!(lpfnMAPILogon = (LPMAPILOGON)GetProcAddress (_hlibMAPI, "MAPILogon"))) return FALSE;

View File

@ -526,12 +526,12 @@ TEdit_field& TRelation_application::get_search_field() const
{
short id = _search_id;
if (id <= 0 || !_mask->field(id).active())
if (id <= 0 || !_mask->field(id).shown())
{
for (int i = _mask->fields()-1; i >= 0; i--)
{
const TMask_field& f = _mask->fld(i);
if (f.is_edit() && f.in_key(1) && f.active())
if (f.is_edit() && f.in_key(1) && f.shown())
{
id = f.dlg();
break;

View File

@ -1931,24 +1931,36 @@ bool TViswin::on_key(KEY key)
exec_link();
break;
case K_TAB:
if (!is_running())
{
update();
}
else
if (!_toplevel)
{
if (_curbut == (_button.items() - 1))
_curbut = 0;
else
_curbut++;
TMask& m = owner().mask();
const int pos = m.id2pos(owner().dlg());
for (int i = pos+1; i < m.fields(); i++)
{
const TMask_field& f = m.fld(i);
if (f.active())
{
m.set_focus_field(f.dlg());
break;
}
}
}
break;
case K_BTAB:
if (_curbut == 0)
_curbut = _button.items() - 1;
else
_curbut--;
case K_BTAB:
if (!_toplevel)
{
TMask& m = owner().mask();
const int pos = m.id2pos(owner().dlg());
for (int i = pos-1; i >= 0; i--)
{
const TMask_field& f = m.fld(i);
if (f.active())
{
m.set_focus_field(f.dlg());
break;
}
}
}
break;
case K_SPACE:
case K_CTRL_ENTER:
@ -2624,8 +2636,6 @@ TViswin::TViswin(const char *fname,
}
}
_curbut = 0;
if (_isopen && _showbuts)
_wtimer = xvt_timer_create(win(), 750L);

View File

@ -83,8 +83,6 @@ class TViswin : public TField_window
bool _wasneeded;
// @cmember:(INTERNAL) Array di bottoni attivi nella finestra
TArray _button;
// @cmember:(INTERNAL) Bottone che ha il focus
int _curbut;
// @cmember:(INTERNAL) Bottone Collega
TPushbutton_control* _link_button;