- set 'modified' flag when editing numeric value with updown control

This commit is contained in:
Volker Ruppert 2011-02-10 22:59:34 +00:00
parent d7e9cec933
commit dcd02695bb

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// $Id: win32paramdlg.cc,v 1.19 2011-01-18 19:15:37 vruppert Exp $ // $Id: win32paramdlg.cc,v 1.20 2011-02-10 22:59:34 vruppert Exp $
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2009 Volker Ruppert // Copyright (C) 2009 Volker Ruppert
@ -734,11 +734,11 @@ static INT_PTR CALLBACK ParamDlgProc(HWND Window, UINT AMessage, WPARAM wParam,
bx_param_string_c *sparam; bx_param_string_c *sparam;
bx_list_c *tmplist; bx_list_c *tmplist;
int cid; int cid;
UINT_PTR code; UINT_PTR code, id;
UINT i, j, k; UINT i, j, k;
RECT r, r2; RECT r, r2;
SIZE size; SIZE size;
NMHDR tcinfo; NMHDR nmhdr;
char fname[BX_PATHNAME_LEN]; char fname[BX_PATHNAME_LEN];
switch (AMessage) { switch (AMessage) {
@ -806,18 +806,23 @@ static INT_PTR CALLBACK ParamDlgProc(HWND Window, UINT AMessage, WPARAM wParam,
} }
break; break;
case WM_NOTIFY: case WM_NOTIFY:
tcinfo = *(LPNMHDR)lParam; nmhdr = *(LPNMHDR)lParam;
if (tcinfo.code == (UINT)TCN_SELCHANGE) { code = nmhdr.code;
code = tcinfo.idFrom; id = nmhdr.idFrom;
j = (UINT)(code - ID_PARAM); if (code == (UINT)TCN_SELCHANGE) {
j = (UINT)(id - ID_PARAM);
tmplist = (bx_list_c *)findParamFromDlgID(j); tmplist = (bx_list_c *)findParamFromDlgID(j);
if (tmplist != NULL) { if (tmplist != NULL) {
k = (UINT)TabCtrl_GetCurSel(GetDlgItem(Window, code)); k = (UINT)TabCtrl_GetCurSel(GetDlgItem(Window, id));
cid = findDlgListBaseID(tmplist); cid = findDlgListBaseID(tmplist);
for (i = 0; i < (UINT)tmplist->get_size(); i++) { for (i = 0; i < (UINT)tmplist->get_size(); i++) {
ShowParamList(Window, cid + i, (i == k), (bx_list_c*)tmplist->get(i)); ShowParamList(Window, cid + i, (i == k), (bx_list_c*)tmplist->get(i));
} }
} }
} else if (code == (UINT)UDN_DELTAPOS) {
if (id >= ID_UPDOWN) {
PostMessage(GetDlgItem(Window, ID_PARAM + (id - ID_UPDOWN)), EM_SETMODIFY, TRUE, 0);
}
} }
break; break;
case WM_CTLCOLOREDIT: case WM_CTLCOLOREDIT: