- 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, <roelmessiant AT gmail DOT com>:
- 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
This commit is contained in:
Gregor Schneider 2008-12-07 18:04:56 +00:00
parent be0e9fd9c7
commit 2c22befead

View file

@ -20,7 +20,7 @@ TCHAR MsgQuit[128];
TCHAR MsgAbout[128]; TCHAR MsgAbout[128];
TCHAR MsgWin[128]; TCHAR MsgWin[128];
TCHAR MsgDeal[128]; TCHAR MsgDeal[128];
DWORD dwOptions = 8; DWORD dwOptions = OPTION_THREE_CARDS;
CardWindow SolWnd; 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 // Force the window to process WM_GETMINMAXINFO again
GetWindowRect(hwndStatus, &rcStatus); GetWindowRect(hwndStatus, &rcStatus);
nStatusHeight = rcStatus.bottom - rcStatus.top; 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); SetWindowPos(hwnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOZORDER);
NewGame(); NewGame();
@ -497,8 +504,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
if (dwOptions & OPTION_SHOW_STATUS) if (dwOptions & OPTION_SHOW_STATUS)
{ {
MoveWindow(SolWnd, 0, 0, nWidth, nHeight - nStatusHeight, TRUE); MoveWindow(SolWnd, 0, 0, nWidth, nHeight - nStatusHeight, TRUE);
MoveWindow(hwndStatus, 0, nHeight - nStatusHeight, nWidth, nHeight, TRUE); MoveWindow(hwndStatus, 0, nHeight - nStatusHeight, nWidth, nStatusHeight, TRUE);
SendMessage(hwndStatus, WM_SIZE, wParam, lParam);
} }
else else
{ {