if(!cps && okFunc) ((ButtonCallback*) okFunc)(0);\r
}\r
\r
+char *defaultExt[] = { NULL, "pgn", "fen", "exe", "trn", "bin", "log", "ini" };\r
+\r
LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
char buf[MSG_SIZ];\r
- int i, j;\r
+ int i, j, ext;\r
\r
switch( message )\r
{\r
ofn.hwndOwner = hDlg;\r
ofn.hInstance = hInst;\r
ofn.lpstrFilter = filter;\r
- ofn.nFilterIndex = 1L + (activeCps ? 0 : activeList[layoutList[(i-2000)/2+1]].max);\r
+ ofn.nFilterIndex = 1L + (ext = activeCps ? 0 : activeList[layoutList[(i-2000)/2+1]].max);\r
+ ofn.lpstrDefExt = defaultExt[ext];\r
ofn.lpstrFile = buf;\r
ofn.nMaxFile = sizeof(buf);\r
ofn.lpstrTitle = _("Choose File");\r