*\r
\*---------------------------------------------------------------------------*/\r
\r
+int\r
+LoadOptionsWhichRadio(HWND hDlg)\r
+{\r
+ return (IsDlgButtonChecked(hDlg, OPT_Exact) ? 1 :\r
+ (IsDlgButtonChecked(hDlg, OPT_Subset) ? 2 :\r
+ (IsDlgButtonChecked(hDlg, OPT_Struct) ? 3 :\r
+ (IsDlgButtonChecked(hDlg, OPT_Material) ? 4 : -1))));\r
+}\r
+\r
VOID\r
SetLoadOptionEnables(HWND hDlg)\r
{\r
{\r
char buf[MSG_SIZ];\r
float fnumber;\r
+ int ok;\r
\r
switch (message) {\r
case WM_INITDIALOG: /* message: initialize dialog box */\r
CheckDlgButton(hDlg, OPT_Autostep, FALSE);\r
}\r
SetLoadOptionEnables(hDlg);\r
+ SetDlgItemInt(hDlg, OPT_elo1, appData.eloThreshold1, FALSE);\r
+ SetDlgItemInt(hDlg, OPT_elo2, appData.eloThreshold2, FALSE);\r
+ SetDlgItemInt(hDlg, OPT_date, appData.dateThreshold, FALSE);\r
+ switch (appData.searchMode) {\r
+ case 1:\r
+ CheckDlgButton(hDlg, OPT_Exact, TRUE);\r
+ break;\r
+ case 2:\r
+ CheckDlgButton(hDlg, OPT_Subset, TRUE);\r
+ break;\r
+ case 3:\r
+ CheckDlgButton(hDlg, OPT_Struct, TRUE);\r
+ break;\r
+ case 4:\r
+ CheckDlgButton(hDlg, OPT_Material, TRUE);\r
+ break;\r
+ }\r
return TRUE;\r
\r
case WM_COMMAND: /* message: received a command */\r
} else {\r
appData.timeDelay = (float) -1.0;\r
}\r
+ appData.eloThreshold1 = GetDlgItemInt(hDlg, OPT_elo1, &ok, FALSE);\r
+ appData.eloThreshold2 = GetDlgItemInt(hDlg, OPT_elo2, &ok, FALSE);\r
+ appData.dateThreshold = GetDlgItemInt(hDlg, OPT_date, &ok, FALSE);\r
+ appData.searchMode = LoadOptionsWhichRadio(hDlg);\r
EndDialog(hDlg, TRUE);\r
return TRUE;\r
\r