Go back to use of SetWindowLongW instead of GetWindowLongPtrW for GWL_STYLE to reduce diff to wine code.

svn path=/trunk/; revision=50953
This commit is contained in:
Timo Kreuzer 2011-03-02 11:05:51 +00:00
parent 8b1f0d1966
commit 92654a7e4e

View file

@ -2771,13 +2771,13 @@ static void EDIT_EM_SetPasswordChar(EDITSTATE *es, WCHAR c)
if (es->password_char == c) if (es->password_char == c)
return; return;
style = GetWindowLongPtrW( es->hwndSelf, GWL_STYLE ); style = GetWindowLongW( es->hwndSelf, GWL_STYLE );
es->password_char = c; es->password_char = c;
if (c) { if (c) {
SetWindowLongPtrW( es->hwndSelf, GWL_STYLE, style | ES_PASSWORD ); SetWindowLongW( es->hwndSelf, GWL_STYLE, style | ES_PASSWORD );
es->style |= ES_PASSWORD; es->style |= ES_PASSWORD;
} else { } else {
SetWindowLongPtrW( es->hwndSelf, GWL_STYLE, style & ~ES_PASSWORD ); SetWindowLongW( es->hwndSelf, GWL_STYLE, style & ~ES_PASSWORD );
es->style &= ~ES_PASSWORD; es->style &= ~ES_PASSWORD;
} }
EDIT_UpdateText(es, NULL, TRUE); EDIT_UpdateText(es, NULL, TRUE);
@ -3930,7 +3930,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
case SB_THUMBPOSITION: case SB_THUMBPOSITION:
TRACE("SB_THUMBPOSITION %d\n", pos); TRACE("SB_THUMBPOSITION %d\n", pos);
es->flags &= ~EF_HSCROLL_TRACK; es->flags &= ~EF_HSCROLL_TRACK;
if(GetWindowLongPtrW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL) if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL)
dx = pos - es->x_offset; dx = pos - es->x_offset;
else else
{ {
@ -3960,7 +3960,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
case EM_GETTHUMB: /* this one is used by NT notepad */ case EM_GETTHUMB: /* this one is used by NT notepad */
{ {
LRESULT ret; LRESULT ret;
if(GetWindowLongPtrW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL) if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_HSCROLL)
ret = GetScrollPos(es->hwndSelf, SB_HORZ); ret = GetScrollPos(es->hwndSelf, SB_HORZ);
else else
{ {
@ -4083,7 +4083,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
case EM_GETTHUMB: /* this one is used by NT notepad */ case EM_GETTHUMB: /* this one is used by NT notepad */
{ {
LRESULT ret; LRESULT ret;
if(GetWindowLongPtrW( es->hwndSelf, GWL_STYLE ) & WS_VSCROLL) if(GetWindowLongW( es->hwndSelf, GWL_STYLE ) & WS_VSCROLL)
ret = GetScrollPos(es->hwndSelf, SB_VERT); ret = GetScrollPos(es->hwndSelf, SB_VERT);
else else
{ {
@ -4362,7 +4362,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
if (lpcs->dwExStyle & WS_EX_CLIENTEDGE) if (lpcs->dwExStyle & WS_EX_CLIENTEDGE)
es->style &= ~WS_BORDER; es->style &= ~WS_BORDER;
else if (es->style & WS_BORDER) else if (es->style & WS_BORDER)
SetWindowLongPtrW(hwnd, GWL_STYLE, es->style & ~WS_BORDER); SetWindowLongW(hwnd, GWL_STYLE, es->style & ~WS_BORDER);
return TRUE; return TRUE;
@ -4666,12 +4666,12 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
DWORD old_style = es->style; DWORD old_style = es->style;
if (wParam) { if (wParam) {
SetWindowLongPtrW( hwnd, GWL_STYLE, SetWindowLongW( hwnd, GWL_STYLE,
GetWindowLongPtrW( hwnd, GWL_STYLE ) | ES_READONLY ); GetWindowLongW( hwnd, GWL_STYLE ) | ES_READONLY );
es->style |= ES_READONLY; es->style |= ES_READONLY;
} else { } else {
SetWindowLongPtrW( hwnd, GWL_STYLE, SetWindowLongW( hwnd, GWL_STYLE,
GetWindowLongPtrW( hwnd, GWL_STYLE ) & ~ES_READONLY ); GetWindowLongW( hwnd, GWL_STYLE ) & ~ES_READONLY );
es->style &= ~ES_READONLY; es->style &= ~ES_READONLY;
} }