Mike McCormack : wineconsole: Store the font as a DWORD_PTR.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed May 31 05:31:35 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 61a0799b88e38d48c257dc10386916fefcc54842
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=61a0799b88e38d48c257dc10386916fefcc54842
Author: Mike McCormack <mike at codeweavers.com>
Date: Wed May 31 16:28:16 2006 +0900
wineconsole: Store the font as a DWORD_PTR.
---
programs/wineconsole/dialog.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c
index 169f4e1..73a0987 100644
--- a/programs/wineconsole/dialog.c
+++ b/programs/wineconsole/dialog.c
@@ -150,12 +150,12 @@ static LRESULT WINAPI WCUSER_FontPreview
switch (msg)
{
case WM_CREATE:
- SetWindowLong(hWnd, 0, 0);
+ SetWindowLongPtr(hWnd, 0, 0);
break;
case WM_GETFONT:
- return GetWindowLong(hWnd, 0);
+ return GetWindowLongPtr(hWnd, 0);
case WM_SETFONT:
- SetWindowLong(hWnd, 0, wParam);
+ SetWindowLongPtr(hWnd, 0, wParam);
if (LOWORD(lParam))
{
InvalidateRect(hWnd, NULL, TRUE);
@@ -164,7 +164,7 @@ static LRESULT WINAPI WCUSER_FontPreview
break;
case WM_DESTROY:
{
- HFONT hFont = (HFONT)GetWindowLong(hWnd, 0L);
+ HFONT hFont = (HFONT)GetWindowLongPtr(hWnd, 0L);
if (hFont) DeleteObject(hFont);
}
break;
@@ -182,7 +182,7 @@ static LRESULT WINAPI WCUSER_FontPreview
font_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L);
size_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_SIZE, LB_GETCURSEL, 0L, 0L);
- hFont = (HFONT)GetWindowLong(hWnd, 0L);
+ hFont = (HFONT)GetWindowLongPtr(hWnd, 0L);
if (hFont)
{
WCHAR buf1[256];
@@ -440,7 +440,7 @@ static BOOL select_font(struct dialog_i
config.cell_height, di->font[size_idx].height);
hOldFont = (HFONT)SendDlgItemMessage(di->hDlg, IDC_FNT_PREVIEW, WM_GETFONT, 0L, 0L);
- SendDlgItemMessage(di->hDlg, IDC_FNT_PREVIEW, WM_SETFONT, (DWORD)hFont, TRUE);
+ SendDlgItemMessage(di->hDlg, IDC_FNT_PREVIEW, WM_SETFONT, (WPARAM)hFont, TRUE);
if (hOldFont) DeleteObject(hOldFont);
LoadString(GetModuleHandle(NULL), IDS_FNT_DISPLAY, fmt, sizeof(fmt) / sizeof(WCHAR));
@@ -764,7 +764,7 @@ BOOL WCUSER_GetProperties(struct inner_d
wndclass.style = 0;
wndclass.lpfnWndProc = WCUSER_FontPreviewProc;
wndclass.cbClsExtra = 0;
- wndclass.cbWndExtra = 4; /* for hFont */
+ wndclass.cbWndExtra = sizeof (DWORD_PTR); /* for hFont */
wndclass.hInstance = GetModuleHandle(NULL);
wndclass.hIcon = 0;
wndclass.hCursor = LoadCursor(0, IDC_ARROW);
More information about the wine-cvs
mailing list