#include <stdio.h>
#include <stdlib.h>
#include <shlobj.h> /* [AS] Requires NT 4.0 or Win95 */
+#include <ctype.h>
#include "common.h"
#include "winboard.h"
extern HWND hCommPort; /* currently open comm port */
extern DCB dcb;
extern BOOLEAN chessProgram;
-extern startedFromPositionFile; /* [HGM] loadPos */
+extern int startedFromPositionFile; /* [HGM] loadPos */
/* types */
VOID SetLoadOptionEnables(HWND hDlg);
VOID SetSaveOptionEnables(HWND hDlg);
VOID SetTimeControlEnables(HWND hDlg);
+void NewSettingEvent(int option, char *command, int value);
/*---------------------------------------------------------------------------*\
*
HBRUSH brushSquareOutline;
HBRUSH brushPiece;
HBRUSH brushPieceDetail;
- HBRUSH oldBrushPiece;
+ HBRUSH oldBrushPiece = NULL;
HBRUSH oldBrushSquare;
HBITMAP oldBitmapMem;
HBITMAP oldBitmapTemp;
break;
case SizeTitanic:
CheckDlgButton(hDlg, OPT_SizeTitanic, TRUE);
+ default: ; // should not happen, but suppresses warning on pedantic compilers
}
if (appData.monoMode)
LRESULT CALLBACK
NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
- static Boolean mono;
static VariantClass v;
- static COLORREF lsc, dsc, wpc, bpc, hsc, phc;
- static HBITMAP pieces[3];
static int n1_ok, n2_ok, n3_ok;
switch (message) {
case VariantNoCastle:
CheckDlgButton(hDlg, OPT_VariantNocastle, TRUE);
break;
+// case VariantGreat: // Note to self: must still make this button (and GiveAway too).
+// CheckDlgButton(hDlg, OPT_VariantGreat, TRUE);
+// break;
+ default: ;
}
SetDlgItemInt( hDlg, IDC_Files, -1, TRUE );
err = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) scd->label);
if (err != cnt++) {
sprintf(buf, "InitSoundCombo(): err '%d', cnt '%d'\n",
- err, cnt);
+ (int)err, (int)cnt);
MessageBox(NULL, buf, NULL, MB_OK);
}
scd++;
tmp.data = NULL;
MyLoadSound(&tmp);
MyPlaySound(&tmp);
- if (tmp.data != NULL) free(tmp.data);
+ if (tmp.data != NULL) FreeResource(tmp.data); // technically obsolete fn, but tmp.data is NOT malloc'd mem
if (tmp.name != NULL) free(tmp.name);
return TRUE;
flow = cdFlow[FLOW_NONE].label;
}
fprintf(f, "/%s=%d,%d,%s,%s,%s\n", name,
- dcb->BaudRate, dcb->ByteSize, parity, stopBits, flow);
+ (int)dcb->BaudRate, dcb->ByteSize, parity, stopBits, flow);
}
hwndCombo = GetDlgItem(hDlg, OPT_DataRate);
InitCombo(hwndCombo, cdDataRate);
- sprintf(buf, "%u", dcb.BaudRate);
+ sprintf(buf, "%u", (int)dcb.BaudRate);
if (SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) buf) == CB_ERR) {
SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) -1, (LPARAM) 0);
SendMessage(hwndCombo, WM_SETTEXT, (WPARAM) 0, (LPARAM) buf);