User controls: GWL_ -> GWLP_.

This commit is contained in:
Robert Shearman 2004-08-17 22:29:29 +00:00 committed by Alexandre Julliard
parent 4a18630fef
commit 2e9436c038
7 changed files with 54 additions and 53 deletions

View File

@ -33,8 +33,8 @@
/* GetWindowLong offsets for window extra information */
#define STATE_GWL_OFFSET 0
#define HFONT_GWL_OFFSET (sizeof(LONG))
#define HIMAGE_GWL_OFFSET (2*sizeof(LONG))
#define NB_EXTRA_BYTES (3*sizeof(LONG))
#define HIMAGE_GWL_OFFSET (HFONT_GWL_OFFSET+sizeof(HFONT))
#define NB_EXTRA_BYTES (HIMAGE_GWL_OFFSET+sizeof(HANDLE))
/* Button state values */
#define BUTTON_UNCHECKED 0x00
@ -125,12 +125,12 @@ inline static void set_button_state( HWND hwnd, LONG state )
inline static HFONT get_button_font( HWND hwnd )
{
return (HFONT)GetWindowLongA( hwnd, HFONT_GWL_OFFSET );
return (HFONT)GetWindowLongPtrA( hwnd, HFONT_GWL_OFFSET );
}
inline static void set_button_font( HWND hwnd, HFONT font )
{
SetWindowLongA( hwnd, HFONT_GWL_OFFSET, (LONG)font );
SetWindowLongPtrA( hwnd, HFONT_GWL_OFFSET, (LONG_PTR)font );
}
inline static UINT get_button_type( LONG window_style )
@ -248,7 +248,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
btn_type == BS_OWNERDRAW)
{
SendMessageW( GetParent(hWnd), WM_COMMAND,
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_DOUBLECLICKED ),
MAKEWPARAM( GetWindowLongPtrA(hWnd,GWLP_ID), BN_DOUBLECLICKED ),
(LPARAM)hWnd);
break;
}
@ -294,7 +294,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
break;
}
SendMessageW( GetParent(hWnd), WM_COMMAND,
MAKEWPARAM( GetWindowLongA(hWnd,GWL_ID), BN_CLICKED ), (LPARAM)hWnd);
MAKEWPARAM( GetWindowLongPtrA(hWnd,GWLP_ID), BN_CLICKED ), (LPARAM)hWnd);
}
break;
@ -407,7 +407,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
return (LRESULT)oldHbitmap;
case BM_GETIMAGE:
return GetWindowLongA( hWnd, HIMAGE_GWL_OFFSET );
return GetWindowLongPtrA( hWnd, HIMAGE_GWL_OFFSET );
case BM_GETCHECK16:
case BM_GETCHECK:
@ -568,7 +568,7 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
break;
case BS_ICON:
if (!GetIconInfo((HICON)GetWindowLongA( hwnd, HIMAGE_GWL_OFFSET ), &iconInfo))
if (!GetIconInfo((HICON)GetWindowLongPtrA( hwnd, HIMAGE_GWL_OFFSET ), &iconInfo))
goto empty_rect;
GetObjectW (iconInfo.hbmColor, sizeof(BITMAP), &bm);
@ -581,7 +581,7 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
break;
case BS_BITMAP:
if (!GetObjectW( (HANDLE)GetWindowLongA( hwnd, HIMAGE_GWL_OFFSET ), sizeof(BITMAP), &bm))
if (!GetObjectW( (HANDLE)GetWindowLongPtrA( hwnd, HIMAGE_GWL_OFFSET ), sizeof(BITMAP), &bm))
goto empty_rect;
r.right = r.left + bm.bmWidth;
@ -686,12 +686,12 @@ static void BUTTON_DrawLabel(HWND hwnd, HDC hdc, UINT dtFlags, RECT *rc)
case BS_ICON:
flags |= DST_ICON;
lp = GetWindowLongA( hwnd, HIMAGE_GWL_OFFSET );
lp = GetWindowLongPtrA( hwnd, HIMAGE_GWL_OFFSET );
break;
case BS_BITMAP:
flags |= DST_BITMAP;
lp = GetWindowLongA( hwnd, HIMAGE_GWL_OFFSET );
lp = GetWindowLongPtrA( hwnd, HIMAGE_GWL_OFFSET );
break;
default:
@ -1033,7 +1033,7 @@ static void OB_Paint( HWND hwnd, HDC hDC, UINT action )
DRAWITEMSTRUCT dis;
HRGN clipRegion;
RECT clipRect;
UINT id = GetWindowLongA( hwnd, GWL_ID );
LONG_PTR id = GetWindowLongPtrA( hwnd, GWLP_ID );
HWND parent;
dis.CtlType = ODT_BUTTON;

View File

@ -49,7 +49,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(combo);
#define CB_NOTIFY( lphc, code ) \
(SendMessageW((lphc)->owner, WM_COMMAND, \
MAKEWPARAM(GetWindowLongA((lphc)->self,GWL_ID), (code)), (LPARAM)(lphc)->self))
MAKEWPARAM(GetWindowLongPtrA((lphc)->self,GWLP_ID), (code)), (LPARAM)(lphc)->self))
#define CB_DISABLED( lphc ) (!IsWindowEnabled((lphc)->self))
#define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
@ -243,7 +243,7 @@ static INT CBGetTextAreaHeight(
MEASUREITEMSTRUCT measureItem;
RECT clientRect;
INT originalItemHeight = iTextItemHeight;
UINT id = GetWindowLongA( lphc->self, GWL_ID );
UINT id = (UINT)GetWindowLongPtrA( lphc->self, GWLP_ID );
/*
* We use the client rect for the width of the item.
@ -586,7 +586,7 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
lphc->droppedRect.right - lphc->droppedRect.left,
lphc->droppedRect.bottom - lphc->droppedRect.top,
hwnd, (HMENU)ID_CB_LISTBOX,
(HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), lphc );
(HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), lphc );
else
lphc->hWndLBox = CreateWindowExA(lbeExStyle, "ComboLBox", NULL, lbeStyle,
lphc->droppedRect.left,
@ -594,7 +594,7 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
lphc->droppedRect.right - lphc->droppedRect.left,
lphc->droppedRect.bottom - lphc->droppedRect.top,
hwnd, (HMENU)ID_CB_LISTBOX,
(HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), lphc );
(HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), lphc );
if( lphc->hWndLBox )
{
@ -620,14 +620,14 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
lphc->textRect.right - lphc->textRect.left,
lphc->textRect.bottom - lphc->textRect.top,
hwnd, (HMENU)ID_CB_EDIT,
(HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), NULL );
(HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), NULL );
else
lphc->hWndEdit = CreateWindowExA(0, "Edit", NULL, lbeStyle,
lphc->textRect.left, lphc->textRect.top,
lphc->textRect.right - lphc->textRect.left,
lphc->textRect.bottom - lphc->textRect.top,
hwnd, (HMENU)ID_CB_EDIT,
(HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), NULL );
(HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), NULL );
if( !lphc->hWndEdit )
bEdit = FALSE;
@ -739,7 +739,7 @@ static void CBPaintText(
{
DRAWITEMSTRUCT dis;
HRGN clipRegion;
UINT ctlid = GetWindowLongA( lphc->self, GWL_ID );
UINT ctlid = (UINT)GetWindowLongPtrA( lphc->self, GWLP_ID );
/* setup state for DRAWITEM message. Owner will highlight */
if ( (lphc->wState & CBF_FOCUSED) &&
@ -1402,7 +1402,7 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
static LRESULT COMBO_ItemOp( LPHEADCOMBO lphc, UINT msg, LPARAM lParam )
{
HWND hWnd = lphc->self;
UINT id = GetWindowLongA( hWnd, GWL_ID );
UINT id = (UINT)GetWindowLongPtrA( hWnd, GWLP_ID );
TRACE("[%p]: ownerdraw op %04x\n", lphc->self, msg );

View File

@ -159,7 +159,7 @@ typedef struct
{ /* Notify parent which has created this edit control */ \
TRACE("notification " str " sent to hwnd=%p\n", es->hwndParent); \
SendMessageW(es->hwndParent, WM_COMMAND, \
MAKEWPARAM(GetWindowLongW((es->hwndSelf),GWL_ID), wNotifyCode), \
MAKEWPARAM(GetWindowLongPtrW((es->hwndSelf),GWLP_ID), wNotifyCode), \
(LPARAM)(es->hwndSelf)); \
} while(0)
@ -1535,7 +1535,7 @@ static LPWSTR EDIT_GetPasswordPointer_SL(EDITSTATE *es)
*/
static void EDIT_LockBuffer(EDITSTATE *es)
{
HINSTANCE16 hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE );
HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE );
if (!es->text) {
CHAR *textA = NULL;
UINT countA = 0;
@ -2202,7 +2202,7 @@ static void EDIT_SetRectNP(EDITSTATE *es, LPRECT rc)
*/
static void EDIT_UnlockBuffer(EDITSTATE *es, BOOL force)
{
HINSTANCE16 hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE );
HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE );
/* Edit window might be already destroyed */
if(!IsWindow(es->hwndSelf))
@ -2512,7 +2512,7 @@ static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
*/
static HLOCAL16 EDIT_EM_GetHandle16(EDITSTATE *es)
{
HINSTANCE16 hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE );
HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE );
CHAR *textA;
UINT countA, alloc_size;
@ -3152,7 +3152,7 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es)
*/
static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
{
HINSTANCE16 hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE );
HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE );
if (!(es->style & ES_MULTILINE))
return;
@ -3232,7 +3232,7 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
*/
static void EDIT_EM_SetHandle16(EDITSTATE *es, HLOCAL16 hloc)
{
HINSTANCE16 hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE );
HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE );
INT countW, countA;
HLOCAL hloc32W_new;
WCHAR *textW;
@ -3823,7 +3823,7 @@ static LRESULT EDIT_WM_Destroy(EDITSTATE *es)
LocalFree(es->hloc32A);
}
if (es->hloc16) {
HINSTANCE16 hInstance = GetWindowWord( es->hwndSelf, GWL_HINSTANCE );
HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE );
while (LOCAL_Unlock(hInstance, es->hloc16)) ;
LOCAL_Free(hInstance, es->hloc16);
}

View File

@ -62,7 +62,7 @@ const struct builtin_class_descr ICONTITLE_builtin_class =
HWND ICONTITLE_Create( HWND owner )
{
HWND hWnd;
HINSTANCE instance = (HINSTANCE)GetWindowLongA( owner, GWL_HINSTANCE );
HINSTANCE instance = (HINSTANCE)GetWindowLongPtrA( owner, GWLP_HINSTANCE );
LONG style = WS_CLIPSIBLINGS;
if (!IsWindowEnabled(owner)) style |= WS_DISABLED;

View File

@ -110,7 +110,7 @@ typedef struct
#define SEND_NOTIFICATION(hwnd,descr,code) \
(SendMessageW( (descr)->owner, WM_COMMAND, \
MAKEWPARAM( GetWindowLongA((hwnd),GWL_ID), (code)), (LPARAM)(hwnd) ))
MAKEWPARAM( GetWindowLongPtrW((hwnd),GWLP_ID), (code)), (LPARAM)(hwnd) ))
#define ISWIN31 (LOWORD(GetVersion()) == 0x0a03)
@ -166,7 +166,7 @@ const struct builtin_class_descr COMBOLBOX_builtin_class =
/* check whether app is a Win 3.1 app */
inline static BOOL is_old_app( HWND hwnd )
{
return (GetExpWinVer16( GetWindowLongA(hwnd,GWL_HINSTANCE) ) & 0xFF00 ) == 0x0300;
return (GetExpWinVer16( GetWindowLongPtrW(hwnd,GWLP_HINSTANCE) ) & 0xFF00 ) == 0x0300;
}
@ -557,7 +557,7 @@ static void LISTBOX_PaintItem( HWND hwnd, LB_DESCR *descr, HDC hdc,
DRAWITEMSTRUCT dis;
RECT r;
HRGN hrgn;
UINT id = GetWindowLongA( hwnd, GWL_ID );
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
if (!item)
{
@ -823,7 +823,7 @@ static INT LISTBOX_FindStringPos( HWND hwnd, LB_DESCR *descr, LPCWSTR str,
else
{
COMPAREITEMSTRUCT cis;
UINT id = GetWindowLongA( hwnd, GWL_ID );
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
cis.CtlType = ODT_LISTBOX;
cis.CtlID = id;
@ -1528,7 +1528,7 @@ static LRESULT LISTBOX_InsertItem( HWND hwnd, LB_DESCR *descr, INT index,
if (descr->style & LBS_OWNERDRAWVARIABLE)
{
MEASUREITEMSTRUCT mis;
UINT id = GetWindowLongA( hwnd, GWL_ID );
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
mis.CtlType = ODT_LISTBOX;
mis.CtlID = id;
@ -1619,7 +1619,7 @@ static void LISTBOX_DeleteItem( HWND hwnd, LB_DESCR *descr, INT index )
if (IS_OWNERDRAW(descr) || descr->items[index].data)
{
DELETEITEMSTRUCT dis;
UINT id = GetWindowLongA( hwnd, GWL_ID );
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
dis.CtlType = ODT_LISTBOX;
dis.CtlID = id;
@ -2475,7 +2475,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
}
else
{
UINT id = GetWindowLongA( hwnd, GWL_ID );
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
mis.CtlType = ODT_LISTBOX;
mis.CtlID = id;
mis.itemID = -1;

View File

@ -1505,7 +1505,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
/* NOTE: In Windows, top menu popup is not owned. */
menu->hWnd = CreateWindowExW( 0, POPUPMENU_CLASS_ATOMW, NULL,
WS_POPUP, x, y, width, height,
hwndOwner, 0, (HINSTANCE)GetWindowLongW(hwndOwner, GWL_HINSTANCE),
hwndOwner, 0, (HINSTANCE)GetWindowLongPtrW(hwndOwner, GWLP_HINSTANCE),
(LPVOID)hmenu );
if( !menu->hWnd ) return FALSE;
if (!top_popup) top_popup = menu->hWnd;
@ -2562,6 +2562,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
fEndMenu = FALSE;
if (!(menu = MENU_GetMenu( hmenu )))
{
WARN("Invalid menu handle %p\n", hmenu);
SetLastError(ERROR_INVALID_MENU_HANDLE);
return FALSE;
}
@ -3648,7 +3649,7 @@ BOOL WINAPI SetSystemMenu( HWND hwnd, HMENU hMenu )
*/
HMENU WINAPI GetMenu( HWND hWnd )
{
HMENU retvalue = (HMENU)GetWindowLongW( hWnd, GWL_ID );
HMENU retvalue = (HMENU)GetWindowLongPtrW( hWnd, GWLP_ID );
TRACE("for %p returning %p\n", hWnd, retvalue);
return retvalue;
}
@ -3683,7 +3684,7 @@ BOOL MENU_SetMenu( HWND hWnd, HMENU hMenu )
lpmenu->hWnd = hWnd;
lpmenu->Height = 0; /* Make sure we recalculate the size */
}
SetWindowLongW( hWnd, GWL_ID, (LONG_PTR)hMenu );
SetWindowLongPtrW( hWnd, GWLP_ID, (LONG_PTR)hMenu );
return TRUE;
}

View File

@ -104,7 +104,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
ERR("huh? hicon!=0, but info=0???\n");
return 0;
}
prevIcon = (HICON)SetWindowLongA( hwnd, HICON_GWL_OFFSET, (LONG)hicon );
prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon );
if (hicon)
{
SetWindowPos( hwnd, 0, 0, 0, info->nWidth, info->nHeight,
@ -128,7 +128,7 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
ERR("huh? hBitmap!=0, but not bitmap\n");
return 0;
}
hOldBitmap = (HBITMAP)SetWindowLongA( hwnd, HICON_GWL_OFFSET, (LONG)hBitmap );
hOldBitmap = (HBITMAP)SetWindowLongPtrA( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
if (hBitmap)
{
BITMAP bm;
@ -146,7 +146,7 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
*/
static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name )
{
HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE );
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
HICON hicon = LoadIconA( hInstance, name );
if (!hicon) hicon = LoadIconA( 0, name );
return hicon;
@ -159,7 +159,7 @@ static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name )
*/
static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name )
{
HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE );
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
HICON hicon = LoadIconW( hInstance, name );
if (!hicon) hicon = LoadIconW( 0, name );
return hicon;
@ -172,7 +172,7 @@ static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name )
*/
static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name )
{
HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE );
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
HBITMAP hbitmap = LoadBitmapA( hInstance, name );
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */
hbitmap = LoadBitmapA( 0, name );
@ -186,7 +186,7 @@ static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name )
*/
static HBITMAP STATIC_LoadBitmapW( HWND hwnd, LPCWSTR name )
{
HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE );
HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
HBITMAP hbitmap = LoadBitmapW( hInstance, name );
if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */
hbitmap = LoadBitmapW( 0, name );
@ -338,13 +338,13 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
case WM_SETFONT:
if ((style == SS_ICON) || (style == SS_BITMAP)) return 0;
SetWindowLongA( hwnd, HFONT_GWL_OFFSET, wParam );
SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
if (LOWORD(lParam))
InvalidateRect( hwnd, NULL, TRUE );
break;
case WM_GETFONT:
return GetWindowLongA( hwnd, HFONT_GWL_OFFSET );
return GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
case WM_NCHITTEST:
if (full_style & SS_NOTIFY)
@ -359,20 +359,20 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
case WM_NCLBUTTONDOWN:
if (full_style & SS_NOTIFY)
SendMessageW( GetParent(hwnd), WM_COMMAND,
MAKEWPARAM( GetWindowLongW(hwnd,GWL_ID), STN_CLICKED ), (LPARAM)hwnd);
MAKEWPARAM( GetWindowLongPtrW(hwnd,GWLP_ID), STN_CLICKED ), (LPARAM)hwnd);
return 0;
case WM_LBUTTONDBLCLK:
case WM_NCLBUTTONDBLCLK:
if (full_style & SS_NOTIFY)
SendMessageW( GetParent(hwnd), WM_COMMAND,
MAKEWPARAM( GetWindowLongW(hwnd,GWL_ID), STN_DBLCLK ), (LPARAM)hwnd);
MAKEWPARAM( GetWindowLongPtrW(hwnd,GWLP_ID), STN_DBLCLK ), (LPARAM)hwnd);
return 0;
case STM_GETIMAGE:
case STM_GETICON16:
case STM_GETICON:
return GetWindowLongA( hwnd, HICON_GWL_OFFSET );
return GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
case STM_SETIMAGE:
switch(wParam) {
@ -423,7 +423,7 @@ static LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
{
DRAWITEMSTRUCT dis;
LONG id = GetWindowLongA( hwnd, GWL_ID );
UINT id = (UINT)GetWindowLongPtrW( hwnd, GWLP_ID );
dis.CtlType = ODT_STATIC;
dis.CtlID = id;
@ -479,7 +479,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
if (style & SS_NOPREFIX)
wFormat |= DT_NOPREFIX;
if ((hFont = (HFONT)GetWindowLongA( hwnd, HFONT_GWL_OFFSET ))) SelectObject( hdc, hFont );
if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET ))) SelectObject( hdc, hFont );
if ((style & SS_NOPREFIX) || ((style & SS_TYPEMASK) != SS_SIMPLE))
{
@ -549,7 +549,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
hbrush = (HBRUSH)SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC,
(WPARAM)hdc, (LPARAM)hwnd );
FillRect( hdc, &rc, hbrush );
if ((hIcon = (HICON)GetWindowLongA( hwnd, HICON_GWL_OFFSET )))
if ((hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )))
DrawIcon( hdc, rc.left, rc.top, hIcon );
}
@ -562,7 +562,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC,
(WPARAM)hdc, (LPARAM)hwnd );
if ((hBitmap = (HBITMAP)GetWindowLongA( hwnd, HICON_GWL_OFFSET )))
if ((hBitmap = (HBITMAP)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )))
{
BITMAP bm;