From 9ee62d95780e76fa6cfc8abc7986e9f3c28868fd Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 27 Jun 2009 17:06:26 -0700 Subject: [PATCH] changed font in engine output window The engine-output window now uses the same font as the move-history window (which was selectable in the "Options -> Fonts..." menu, while the other wasn't). --- winboard/wengineo.c | 6 ++++++ winboard/winboard.rc | 2 +- winboard/woptions.c | 13 ++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/winboard/wengineo.c b/winboard/wengineo.c index ff7b3b1..d10f3d9 100644 --- a/winboard/wengineo.c +++ b/winboard/wengineo.c @@ -78,6 +78,8 @@ extern HWND hwndMain; extern WindowPlacement wpEngineOutput; +extern BoardSize boardSize; + /* Module variables */ #define H_MARGIN 2 #define V_MARGIN 2 @@ -339,6 +341,10 @@ LRESULT CALLBACK EngineOutputProc( HWND hDlg, UINT message, WPARAM wParam, LPARA ResizeWindowControls( hDlg, windowMode ); + /* Set font */ + SendDlgItemMessage( engineOutputDialog, IDC_EngineMemo1, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 )); + SendDlgItemMessage( engineOutputDialog, IDC_EngineMemo2, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 )); + SetEngineState( 0, STATE_IDLE, "" ); SetEngineState( 1, STATE_IDLE, "" ); } diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 09e27ba..1d61fd2 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -727,7 +727,7 @@ BEGIN GROUPBOX "All Board Sizes",IDC_STATIC,3,87,259,109 CONTROL "",OPT_SampleMoveHistoryFont,"RICHEDIT",ES_READONLY | WS_DISABLED | WS_BORDER,67,170,140,20 - LTEXT "Move History",OPT_MessageFont6,13,175,50,10,NOT + LTEXT "Move History, Engine Output",OPT_MessageFont6,13,171,50,20,NOT WS_GROUP END diff --git a/winboard/woptions.c b/winboard/woptions.c index 1e79b6d..578c318 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -63,6 +63,7 @@ extern HWND hwndConsole; extern char *defaultTextAttribs[]; extern HWND commentDialog; extern HWND moveHistoryDialog; +extern HWND engineOutputDialog; extern char installDir[]; extern HWND hCommPort; /* currently open comm port */ extern DCB dcb; @@ -1634,7 +1635,17 @@ FontOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) SendDlgItemMessage(moveHistoryDialog, IDC_MoveHistory, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0)); - InvalidateRect(editTagsDialog, NULL, TRUE); + SendMessage( moveHistoryDialog, WM_INITDIALOG, 0, 0 ); +// InvalidateRect(editTagsDialog, NULL, TRUE); // [HGM] this ws improperly cloned? + } + + if( engineOutputDialog != NULL ) { + SendDlgItemMessage(engineOutputDialog, IDC_EngineMemo1, + WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, + MAKELPARAM(TRUE, 0)); + SendDlgItemMessage(engineOutputDialog, IDC_EngineMemo2, + WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, + MAKELPARAM(TRUE, 0)); } if (hwndConsole) { -- 1.7.0.4