-#include <windows.h>
-#include <commctrl.h>
-#include <tchar.h>
-#include <stdlib.h>
-
-#include "resource.h"
-#include "cardlib/cardlib.h"
#include "solitaire.h"
TCHAR MsgQuit[128];
TCHAR MsgAbout[128];
TCHAR MsgWin[128];
-DWORD dwOptions = 8;
+TCHAR MsgDeal[128];
+DWORD dwOptions = OPTION_THREE_CARDS;
CardWindow SolWnd;
LoadString(hInst, IDS_SOL_ABOUT, MsgAbout, sizeof(MsgAbout) / sizeof(MsgAbout[0]));
LoadString(hInst, IDS_SOL_QUIT, MsgQuit, sizeof(MsgQuit) / sizeof(MsgQuit[0]));
LoadString(hInst, IDS_SOL_WIN, MsgWin, sizeof(MsgWin) / sizeof(MsgWin[0]));
+ LoadString(hInst, IDS_SOL_DEAL, MsgDeal, sizeof(MsgDeal) / sizeof(MsgDeal[0]));
//Window class for the main application parent window
wndclass.style = 0;//CS_HREDRAW | CS_VREDRAW;
}
-BOOL CALLBACK OptionsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
}
-BOOL CALLBACK CardBackDlgProc(HWND hDlg,
+INT_PTR CALLBACK CardBackDlgProc(HWND hDlg,
UINT uMsg,
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();
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
{
}
+