Use StretchBlt with fixed values for drawing the card backs in the Deck Options dialog.

This way the dialog looks normally, also with bigger cards like the Bavarian ones.

svn path=/trunk/; revision=29664
This commit is contained in:
Colin Finck 2007-10-18 22:04:50 +00:00
parent e82f596e25
commit cabbd02835
2 changed files with 19 additions and 15 deletions

View file

@ -323,15 +323,17 @@ CardImageWndProc(HWND hwnd,
rc.right, rc.right,
rc.bottom); rc.bottom);
BitBlt(hdc, StretchBlt(hdc,
2, 2,
2, 2,
__cardwidth, CARDBACK_OPTIONS_WIDTH,
__cardheight, CARDBACK_OPTIONS_HEIGHT,
__hdcCardBitmaps, __hdcCardBitmaps,
pCardBack->hdcNum * __cardwidth, pCardBack->hdcNum * __cardwidth,
0, 0,
SRCCOPY); __cardwidth,
__cardheight,
SRCCOPY);
SelectObject(hdc, hOldPen); SelectObject(hdc, hOldPen);
SelectObject(hdc, hOldBrush); SelectObject(hdc, hOldBrush);

View file

@ -5,12 +5,14 @@ extern CardWindow SolWnd;
extern TCHAR szAppName[]; extern TCHAR szAppName[];
extern bool fGameStarted; extern bool fGameStarted;
#define OPTION_SHOW_STATUS 4 #define OPTION_SHOW_STATUS 4
#define OPTION_THREE_CARDS 8 #define OPTION_THREE_CARDS 8
#define CARDBACK_START IDC_CARDBACK1 #define CARDBACK_START IDC_CARDBACK1
#define CARDBACK_END IDC_CARDBACK4 #define CARDBACK_END IDC_CARDBACK4
#define NUM_CARDBACKS (CARDBACK_END - CARDBACK_START + 1) #define NUM_CARDBACKS (CARDBACK_END - CARDBACK_START + 1)
#define CARDBACK_RES_START 53 #define CARDBACK_RES_START 53
#define CARDBACK_OPTIONS_WIDTH 72
#define CARDBACK_OPTIONS_HEIGHT 96
extern DWORD dwOptions; extern DWORD dwOptions;