* that generates the actual dialog box from it.\r
*/\r
\r
-//#include "config.h"\r
#include "config.h"\r
\r
+#include <windows.h>\r
#include <stdio.h>\r
#include <string.h>\r
#include "common.h"\r
+#include "frontend.h"\r
#include "backend.h"\r
+#include "winboard.h"\r
#include "backendz.h"\r
\r
+#define _(s) T_(s)\r
+\r
int layoutList[2*MAX_OPTIONS];\r
int checkList[2*MAX_OPTIONS];\r
int comboList[2*MAX_OPTIONS];\r
break;\r
}\r
}\r
- SetDlgItemText( hDlg, IDOK, "OK" );\r
- SetDlgItemText( hDlg, IDCANCEL, "Cancel" );\r
- sprintf(title, "%s Engine Settings (%s)", cps->which, cps->tidy); \r
+ SetDlgItemText( hDlg, IDOK, _("OK") );\r
+ SetDlgItemText( hDlg, IDCANCEL, _("Cancel") );\r
+ sprintf(title, _("%s Engine Settings (%s)"), T_(cps->which), cps->tidy); \r
title[0] &= ~32; // capitalize\r
SetWindowText( hDlg, title);\r
for(i=0; i<groups; i+=2) { \r
success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ - strlen(cps->option[j].name) - 9 );\r
if(!success) break;\r
changed = strcmp(cps->option[j].textValue, newText) != 0;\r
- strcpy(cps->option[j].textValue, newText);\r
+ safeStrCpy(cps->option[j].textValue, newText, sizeof(cps->option[j].textValue)/sizeof(cps->option[j].textValue[0]) );\r
break;\r
case CheckBox:\r
new = IsDlgButtonChecked( hDlg, 2000+2*i );\r
*/\r
OPENFILENAME ofn;\r
\r
- strcpy( buf, "" );\r
+ safeStrCpy( buf, "" , sizeof( buf)/sizeof( buf[0]) );\r
\r
ZeroMemory( &ofn, sizeof(ofn) );\r
\r
ofn.lpstrFilter = filter;\r
ofn.lpstrFile = buf;\r
ofn.nMaxFile = sizeof(buf);\r
- ofn.lpstrTitle = "Choose Book";\r
+ ofn.lpstrTitle = _("Choose Book");\r
ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_HIDEREADONLY;\r
\r
if( GetOpenFileName( &ofn ) ) {\r