From 2c22befeadb627133efc62913a47fdc977252134 Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Sun, 7 Dec 2008 18:04:56 +0000 Subject: [PATCH] - Fix drawing the status bar over the play cards, happened if no status bar was specified on sol startup (Win and ROS behavior); the bar has to be created to get the coords right - so we'll just hide it if we don't need it (like it's done when toggling status bar visibility in options) - Additional cleanup by Roel Messiant, : - Replace the default options magic value by the proper constant - Status bar height was being set wrong, but the system's constraint was fixing this behind the screens - See bugs #3336 and #3820 for more info svn path=/trunk/; revision=37913 --- .../base/applications/games/solitaire/solitaire.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/reactos/base/applications/games/solitaire/solitaire.cpp b/reactos/base/applications/games/solitaire/solitaire.cpp index 3c3ecf22feb..7afd16f01e2 100644 --- a/reactos/base/applications/games/solitaire/solitaire.cpp +++ b/reactos/base/applications/games/solitaire/solitaire.cpp @@ -20,7 +20,7 @@ TCHAR MsgQuit[128]; TCHAR MsgAbout[128]; TCHAR MsgWin[128]; TCHAR MsgDeal[128]; -DWORD dwOptions = 8; +DWORD dwOptions = OPTION_THREE_CARDS; CardWindow SolWnd; @@ -477,6 +477,13 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) // Force the window to process WM_GETMINMAXINFO again GetWindowRect(hwndStatus, &rcStatus); nStatusHeight = rcStatus.bottom - rcStatus.top; + + // Hide status bar if options say so + if (!(dwOptions & OPTION_SHOW_STATUS)) + { + ShowWindow(hwndStatus, SW_HIDE); + } + SetWindowPos(hwnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOZORDER); NewGame(); @@ -497,8 +504,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) if (dwOptions & OPTION_SHOW_STATUS) { MoveWindow(SolWnd, 0, 0, nWidth, nHeight - nStatusHeight, TRUE); - MoveWindow(hwndStatus, 0, nHeight - nStatusHeight, nWidth, nHeight, TRUE); - SendMessage(hwndStatus, WM_SIZE, wParam, lParam); + MoveWindow(hwndStatus, 0, nHeight - nStatusHeight, nWidth, nStatusHeight, TRUE); } else {