From 1daa4973f6629dde1e862aea4067a830d5b0bb72 Mon Sep 17 00:00:00 2001 From: oes Date: Fri, 4 Apr 2003 12:48:51 +0000 Subject: [PATCH] Fixed bug #711865: - Made tray menu correctly reflect initial window visibility state - Hopefully fixed problem where log window contents wasn't visible until vertical scroll bar was clicked. Thanks to Guy for the fix! --- w32log.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/w32log.c b/w32log.c index c06f78e1..ea0836e1 100644 --- a/w32log.c +++ b/w32log.c @@ -1,4 +1,4 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.3 2002/11/20 14:39:05 oes Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.4 2003/03/11 11:53:59 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/Attic/w32log.c,v $ @@ -32,6 +32,9 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.3 2002/11/20 14:39:05 oes Exp * * Revisions : * $Log: w32log.c,v $ + * Revision 1.25.2.4 2003/03/11 11:53:59 oes + * Cosmetic: Renamed cryptic variable + * * Revision 1.25.2.3 2002/11/20 14:39:05 oes * Fixed compiler warning * @@ -765,10 +768,17 @@ void LogClipBuffer(void) SendMessage(g_hwndLogBox, EM_REPLACESEL, FALSE, (LPARAM) ""); SendMessage(g_hwndLogBox, EM_SETOPTIONS, ECOOP_XOR, ECO_AUTOVSCROLL); - /* Restore old selection */ + /* reposition (back to) the end of the log content */ + range.cpMin = SendMessage (g_hwndLogBox, WM_GETTEXTLENGTH, 0, 0); + range.cpMax = -1; + SendMessage(g_hwndLogBox, EM_EXSETSEL, 0, (LPARAM) &range); + + /* restore vertical ScrollBar stuff (messed up by AUTOVSCROLL) */ + SendMessage (g_hwndLogBox, EM_SCROLL, SB_LINEDOWN, 0); + } -} +} /********************************************************************* @@ -897,12 +907,14 @@ HWND CreateLogWindow(HINSTANCE hInstance, int nCmdShow) nCmdShow == SW_MINIMIZE || nCmdShow == SW_SHOWMINNOACTIVE)) { + g_bShowLogWindow = FALSE; nCmdShow = SW_HIDE; } ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd); + GetClientRect(g_hwndLogFrame, &rcClient); SetWindowPos(g_hwndLogBox, NULL, rcClient.left, rcClient.top, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, SWP_NOZORDER); -- 2.49.0