winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1233 discussions
Start a n
N
ew thread
Alexandre Julliard : user32: Move Get/ SetWindowLong16 implementation to wnd16.c.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 9727750c796538eb88726ad77d61381428de02e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9727750c796538eb88726ad77…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sun Dec 13 15:30:35 2009 +0100 user32: Move Get/SetWindowLong16 implementation to wnd16.c. --- dlls/user32/win.c | 82 --------------------------------------------------- dlls/user32/wnd16.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 82 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 46c2388..bb19a4e 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2307,55 +2307,6 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B /********************************************************************** - * GetWindowLong (USER.135) - */ -LONG WINAPI GetWindowLong16( HWND16 hwnd, INT16 offset ) -{ - WND *wndPtr; - LONG_PTR retvalue; - BOOL is_winproc = (offset == GWLP_WNDPROC); - - if (offset >= 0) - { - if (!(wndPtr = WIN_GetPtr( WIN_Handle32(hwnd) ))) - { - SetLastError( ERROR_INVALID_WINDOW_HANDLE ); - return 0; - } - if (wndPtr != WND_OTHER_PROCESS && wndPtr != WND_DESKTOP) - { - if (offset > (int)(wndPtr->cbWndExtra - sizeof(LONG))) - { - /* - * Some programs try to access last element from 16 bit - * code using illegal offset value. Hopefully this is - * what those programs really expect. - */ - if (wndPtr->cbWndExtra >= 4 && offset == wndPtr->cbWndExtra - sizeof(WORD)) - { - INT offset2 = wndPtr->cbWndExtra - sizeof(LONG); - ERR( "- replaced invalid offset %d with %d\n", offset, offset2 ); - offset = offset2; - } - else - { - WARN("Invalid offset %d\n", offset ); - WIN_ReleasePtr( wndPtr ); - SetLastError( ERROR_INVALID_INDEX ); - return 0; - } - } - is_winproc = ((offset == DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG)); - WIN_ReleasePtr( wndPtr ); - } - } - retvalue = GetWindowLongA( WIN_Handle32(hwnd), offset ); - if (is_winproc) retvalue = (LONG_PTR)WINPROC_GetProc16( (WNDPROC)retvalue, FALSE ); - return retvalue; -} - - -/********************************************************************** * GetWindowWord (USER32.@) */ WORD WINAPI GetWindowWord( HWND hwnd, INT offset ) @@ -2398,39 +2349,6 @@ LONG WINAPI GetWindowLongW( HWND hwnd, INT offset ) /********************************************************************** - * SetWindowLong (USER.136) - */ -LONG WINAPI SetWindowLong16( HWND16 hwnd, INT16 offset, LONG newval ) -{ - WND *wndPtr; - BOOL is_winproc = (offset == GWLP_WNDPROC); - - if (offset == DWLP_DLGPROC) - { - if (!(wndPtr = WIN_GetPtr( WIN_Handle32(hwnd) ))) - { - SetLastError( ERROR_INVALID_WINDOW_HANDLE ); - return 0; - } - if (wndPtr != WND_OTHER_PROCESS && wndPtr != WND_DESKTOP) - { - is_winproc = ((wndPtr->cbWndExtra - sizeof(LONG_PTR) >= DWLP_DLGPROC) && - (wndPtr->flags & WIN_ISDIALOG)); - WIN_ReleasePtr( wndPtr ); - } - } - - if (is_winproc) - { - WNDPROC new_proc = WINPROC_AllocProc16( (WNDPROC16)newval ); - WNDPROC old_proc = (WNDPROC)SetWindowLongPtrA( WIN_Handle32(hwnd), offset, (LONG_PTR)new_proc ); - return (LONG)WINPROC_GetProc16( old_proc, FALSE ); - } - else return SetWindowLongA( WIN_Handle32(hwnd), offset, newval ); -} - - -/********************************************************************** * SetWindowWord (USER32.@) */ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval ) diff --git a/dlls/user32/wnd16.c b/dlls/user32/wnd16.c index 1f7b0b0..f3f7e67 100644 --- a/dlls/user32/wnd16.c +++ b/dlls/user32/wnd16.c @@ -719,6 +719,85 @@ WORD WINAPI SetWindowWord16( HWND16 hwnd, INT16 offset, WORD newval ) } +/********************************************************************** + * GetWindowLong (USER.135) + */ +LONG WINAPI GetWindowLong16( HWND16 hwnd, INT16 offset ) +{ + WND *wndPtr; + LONG_PTR retvalue; + BOOL is_winproc = (offset == GWLP_WNDPROC); + + if (offset >= 0) + { + if (!(wndPtr = WIN_GetPtr( WIN_Handle32(hwnd) ))) + { + SetLastError( ERROR_INVALID_WINDOW_HANDLE ); + return 0; + } + if (wndPtr != WND_OTHER_PROCESS && wndPtr != WND_DESKTOP) + { + if (offset > (int)(wndPtr->cbWndExtra - sizeof(LONG))) + { + /* + * Some programs try to access last element from 16 bit + * code using illegal offset value. Hopefully this is + * what those programs really expect. + */ + if (wndPtr->cbWndExtra >= 4 && offset == wndPtr->cbWndExtra - sizeof(WORD)) + { + offset = wndPtr->cbWndExtra - sizeof(LONG); + } + else + { + WIN_ReleasePtr( wndPtr ); + SetLastError( ERROR_INVALID_INDEX ); + return 0; + } + } + is_winproc = ((offset == DWLP_DLGPROC) && (wndPtr->flags & WIN_ISDIALOG)); + WIN_ReleasePtr( wndPtr ); + } + } + retvalue = GetWindowLongA( WIN_Handle32(hwnd), offset ); + if (is_winproc) retvalue = (LONG_PTR)WINPROC_GetProc16( (WNDPROC)retvalue, FALSE ); + return retvalue; +} + + +/********************************************************************** + * SetWindowLong (USER.136) + */ +LONG WINAPI SetWindowLong16( HWND16 hwnd, INT16 offset, LONG newval ) +{ + WND *wndPtr; + BOOL is_winproc = (offset == GWLP_WNDPROC); + + if (offset == DWLP_DLGPROC) + { + if (!(wndPtr = WIN_GetPtr( WIN_Handle32(hwnd) ))) + { + SetLastError( ERROR_INVALID_WINDOW_HANDLE ); + return 0; + } + if (wndPtr != WND_OTHER_PROCESS && wndPtr != WND_DESKTOP) + { + is_winproc = ((wndPtr->cbWndExtra - sizeof(LONG_PTR) >= DWLP_DLGPROC) && + (wndPtr->flags & WIN_ISDIALOG)); + WIN_ReleasePtr( wndPtr ); + } + } + + if (is_winproc) + { + WNDPROC new_proc = WINPROC_AllocProc16( (WNDPROC16)newval ); + WNDPROC old_proc = (WNDPROC)SetWindowLongPtrA( WIN_Handle32(hwnd), offset, (LONG_PTR)new_proc ); + return (LONG)WINPROC_GetProc16( old_proc, FALSE ); + } + else return SetWindowLongA( WIN_Handle32(hwnd), offset, newval ); +} + + /************************************************************************** * OpenClipboard (USER.137) */
1
0
0
0
Alexandre Julliard : user32: Remove the no longer used WINPROC_CallDlgProc16 function.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 2f0bfbac36b36e5b0221b51c4b54ba235e8e3d23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f0bfbac36b36e5b0221b51c4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sun Dec 13 10:59:31 2009 +0100 user32: Remove the no longer used WINPROC_CallDlgProc16 function. --- dlls/user32/user_private.h | 1 - dlls/user32/winproc.c | 43 ------------------------------------------- 2 files changed, 0 insertions(+), 44 deletions(-) diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 67fdbb6..e5db691 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -250,7 +250,6 @@ extern LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd extern LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg ) DECLSPEC_HIDDEN; -extern INT_PTR WINPROC_CallDlgProc16( DLGPROC16 func, HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam ) DECLSPEC_HIDDEN; extern INT_PTR WINPROC_CallDlgProcA( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; extern INT_PTR WINPROC_CallDlgProcW( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN; extern BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 91eeeb7..d08a59f 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -593,14 +593,6 @@ static LRESULT call_window_proc_AtoW( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, arg, WMCHAR_MAP_CALLWINDOWPROC ); } -/* helper callback for 16->32W conversion */ -static LRESULT call_dialog_proc_AtoW( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, - LRESULT *result, void *arg ) -{ - return WINPROC_CallProcAtoW( call_dialog_proc, hwnd, msg, wp, lp, result, - arg, WMCHAR_MAP_CALLWINDOWPROC ); -} - /********************************************************************** * WINPROC_GetProc16 @@ -2330,41 +2322,6 @@ LRESULT WINAPI CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg, /********************************************************************** - * WINPROC_CallDlgProc16 - */ -INT_PTR WINPROC_CallDlgProc16( DLGPROC16 func, HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam ) -{ - WINDOWPROC *proc; - LRESULT result; - INT_PTR ret; - - if (!func) return 0; - - if (!(proc = handle16_to_proc( (WNDPROC16)func ))) - { - ret = call_dialog_proc16( hwnd, msg, wParam, lParam, &result, func ); - } - else if (proc->procA) - { - ret = WINPROC_CallProc16To32A( call_dialog_proc, hwnd, msg, wParam, lParam, - &result, proc->procA ); - SetWindowLongPtrW( WIN_Handle32(hwnd), DWLP_MSGRESULT, result ); - } - else if (proc->procW) - { - ret = WINPROC_CallProc16To32A( call_dialog_proc_AtoW, hwnd, msg, wParam, lParam, - &result, proc->procW ); - SetWindowLongPtrW( WIN_Handle32(hwnd), DWLP_MSGRESULT, result ); - } - else - { - ret = call_dialog_proc16( hwnd, msg, wParam, lParam, &result, proc->proc16 ); - } - return ret; -} - - -/********************************************************************** * WINPROC_CallDlgProcA */ INT_PTR WINPROC_CallDlgProcA( DLGPROC func, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
1
0
0
0
Alexandre Julliard : user32: Move SystemParametersInfo16 to user16.c.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 57e9244ab6695e7042da597f8895bbb6cef7f09b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=57e9244ab6695e7042da597f8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 20:59:04 2009 +0100 user32: Move SystemParametersInfo16 to user16.c. --- dlls/user32/sysparams.c | 146 +---------------------------------------------- dlls/user32/user16.c | 130 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+), 145 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=57e9244ab6695e7042da5…
1
0
0
0
Alexandre Julliard : user32: Split the handling of the 16-bit messages out of the static winproc.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: fb2022647562d96de4f57bf1174f4610c2643711 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb2022647562d96de4f57bf11…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 20:25:32 2009 +0100 user32: Split the handling of the 16-bit messages out of the static winproc. --- dlls/user32/static.c | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/dlls/user32/static.c b/dlls/user32/static.c index 6c61db2..80c502d 100644 --- a/dlls/user32/static.c +++ b/dlls/user32/static.c @@ -572,9 +572,6 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, case STM_GETIMAGE: return (LRESULT)STATIC_GetImage( hwnd, wParam, full_style ); - case STM_GETICON16: - return HICON_16(STATIC_GetImage( hwnd, IMAGE_ICON, full_style )); - case STM_GETICON: return (LRESULT)STATIC_GetImage( hwnd, IMAGE_ICON, full_style ); @@ -597,9 +594,6 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, STATIC_TryPaintFcn( hwnd, full_style ); break; - case STM_SETICON16: - wParam = (WPARAM)HICON_32( (HICON16)wParam ); - /* fall through */ case STM_SETICON: lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)wParam, full_style ); STATIC_TryPaintFcn( hwnd, full_style ); @@ -613,12 +607,29 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, } /*********************************************************************** + * StaticWndProc_wrapper16 + */ +static LRESULT StaticWndProc_wrapper16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode ) +{ + switch (msg) + { + case STM_SETICON16: + wParam = (WPARAM)HICON_32( (HICON16)wParam ); + return StaticWndProc_common( hwnd, STM_SETICON, wParam, lParam, FALSE ); + case STM_GETICON16: + return HICON_16( StaticWndProc_common( hwnd, STM_GETICON, wParam, lParam, FALSE )); + default: + return StaticWndProc_common( hwnd, msg, wParam, lParam, unicode ); + } +} + +/*********************************************************************** * StaticWndProcA */ static LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { if (!IsWindow( hWnd )) return 0; - return StaticWndProc_common(hWnd, uMsg, wParam, lParam, FALSE); + return StaticWndProc_wrapper16(hWnd, uMsg, wParam, lParam, FALSE); } /*********************************************************************** @@ -627,7 +638,7 @@ static LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA static LRESULT WINAPI StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { if (!IsWindow( hWnd )) return 0; - return StaticWndProc_common(hWnd, uMsg, wParam, lParam, TRUE); + return StaticWndProc_wrapper16(hWnd, uMsg, wParam, lParam, TRUE); } static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
1
0
0
0
Alexandre Julliard : user32: Split the handling of the 16-bit messages out of the scrollbar winproc.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 11ed5da3fdbdc62ffedc745acadb03938390c71e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11ed5da3fdbdc62ffedc745ac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 20:25:28 2009 +0100 user32: Split the handling of the 16-bit messages out of the scrollbar winproc. --- dlls/user32/scroll.c | 51 ++++++++++++++++++++++++++++++++----------------- 1 files changed, 33 insertions(+), 18 deletions(-) diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index 52c350c..6ab1e56 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -1519,19 +1519,12 @@ static LRESULT ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM } break; - case SBM_SETPOS16: case SBM_SETPOS: return SetScrollPos( hwnd, SB_CTL, wParam, (BOOL)lParam ); - case SBM_GETPOS16: case SBM_GETPOS: return SCROLL_GetScrollPos(hwnd, SB_CTL); - case SBM_SETRANGE16: - if (wParam) message = SBM_SETRANGEREDRAW; - wParam = LOWORD(lParam); - lParam = HIWORD(lParam); - /* fall through */ case SBM_SETRANGEREDRAW: case SBM_SETRANGE: { @@ -1543,18 +1536,9 @@ static LRESULT ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM } return 0; - case SBM_GETRANGE16: - { - INT min, max; - - SCROLL_GetScrollRange(hwnd, SB_CTL, &min, &max); - return MAKELRESULT(min, max); - } - case SBM_GETRANGE: return SCROLL_GetScrollRange(hwnd, SB_CTL, (LPINT)wParam, (LPINT)lParam); - case SBM_ENABLE_ARROWS16: case SBM_ENABLE_ARROWS: return EnableScrollBar( hwnd, SB_CTL, wParam ); @@ -1592,11 +1576,42 @@ static LRESULT ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM /*********************************************************************** + * ScrollBarWndProc_wrapper16 + */ +static LRESULT ScrollBarWndProc_wrapper16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode ) +{ + static const UINT msg16_offset = SBM_SETPOS16 - SBM_SETPOS; + + switch (msg) + { + case SBM_SETPOS16: + case SBM_GETPOS16: + case SBM_ENABLE_ARROWS16: + msg -= msg16_offset; + break; + case SBM_SETRANGE16: + msg = wParam ? SBM_SETRANGEREDRAW : SBM_SETRANGE; + wParam = LOWORD(lParam); + lParam = HIWORD(lParam); + break; + case SBM_GETRANGE16: + { + INT min, max; + ScrollBarWndProc( hwnd, SBM_GETRANGE, (WPARAM)&min, (LPARAM)&max, FALSE ); + return MAKELRESULT(min, max); + } + default: + return ScrollBarWndProc( hwnd, msg, wParam, lParam, unicode ); + } + return ScrollBarWndProc( hwnd, msg, wParam, lParam, FALSE ); +} + +/*********************************************************************** * ScrollBarWndProcA */ static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { - return ScrollBarWndProc( hwnd, message, wParam, lParam, FALSE ); + return ScrollBarWndProc_wrapper16( hwnd, message, wParam, lParam, FALSE ); } @@ -1605,7 +1620,7 @@ static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT message, WPARAM wParam, */ static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { - return ScrollBarWndProc( hwnd, message, wParam, lParam, TRUE ); + return ScrollBarWndProc_wrapper16( hwnd, message, wParam, lParam, TRUE ); }
1
0
0
0
Alexandre Julliard : user32: Split the handling of the 16-bit messages out of the listbox winproc.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 8b226ac4d69f8706cfeeed0a543df77a276ececc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b226ac4d69f8706cfeeed0a5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 20:25:23 2009 +0100 user32: Split the handling of the 16-bit messages out of the listbox winproc. --- dlls/user32/listbox.c | 234 ++++++++++++++++++++++++------------------------- 1 files changed, 116 insertions(+), 118 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8b226ac4d69f8706cfeee…
1
0
0
0
Alexandre Julliard : user32: Split the handling of the 16-bit messages out of the combo winproc.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 51770cdbbc7cc8efa59aa62f8d5f503616540e4f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51770cdbbc7cc8efa59aa62f8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 20:25:18 2009 +0100 user32: Split the handling of the 16-bit messages out of the combo winproc. --- dlls/user32/combo.c | 148 ++++++++++++++++++++++++++------------------------ 1 files changed, 77 insertions(+), 71 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=51770cdbbc7cc8efa59aa…
1
0
0
0
Alexandre Julliard : user32: Split the handling of the 16-bit messages out of the button winproc.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 68775d91340ac0fab18c8ac95242d226380ee5ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68775d91340ac0fab18c8ac95…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 15:51:34 2009 +0100 user32: Split the handling of the 16-bit messages out of the button winproc. --- dlls/user32/button.c | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index fbe4c82..9eb731c 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -461,7 +461,6 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, InvalidateRect( hWnd, NULL, FALSE ); break; - case BM_SETSTYLE16: case BM_SETSTYLE: if ((wParam & 0x0f) >= MAX_BTN_TYPE) break; btn_type = wParam & 0x0f; @@ -499,11 +498,9 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, case BM_GETIMAGE: return GetWindowLongPtrW( hWnd, HIMAGE_GWL_OFFSET ); - case BM_GETCHECK16: case BM_GETCHECK: return get_button_state( hWnd ) & 3; - case BM_SETCHECK16: case BM_SETCHECK: if (wParam > maxCheckState[btn_type]) wParam = maxCheckState[btn_type]; state = get_button_state( hWnd ); @@ -522,11 +519,9 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, BUTTON_CheckAutoRadioButton( hWnd ); break; - case BM_GETSTATE16: case BM_GETSTATE: return get_button_state( hWnd ); - case BM_SETSTATE16: case BM_SETSTATE: state = get_button_state( hWnd ); if (wParam) @@ -553,15 +548,32 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, } /*********************************************************************** + * ButtonWndProc_wrapper16 + */ +static LRESULT ButtonWndProc_wrapper16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode ) +{ + static const UINT msg16_offset = BM_GETCHECK16 - BM_GETCHECK; + + switch (msg) + { + case BM_GETCHECK16: + case BM_SETCHECK16: + case BM_GETSTATE16: + case BM_SETSTATE16: + case BM_SETSTYLE16: + return ButtonWndProc_common( hwnd, msg - msg16_offset, wParam, lParam, FALSE ); + default: + return ButtonWndProc_common( hwnd, msg, wParam, lParam, unicode ); + } +} + +/*********************************************************************** * ButtonWndProcW - * The button window procedure. This is just a wrapper which locks - * the passed HWND and calls the real window procedure (with a WND* - * pointer pointing to the locked windowstructure). */ static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { if (!IsWindow( hWnd )) return 0; - return ButtonWndProc_common( hWnd, uMsg, wParam, lParam, TRUE ); + return ButtonWndProc_wrapper16( hWnd, uMsg, wParam, lParam, TRUE ); } @@ -571,7 +583,7 @@ static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA static LRESULT WINAPI ButtonWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { if (!IsWindow( hWnd )) return 0; - return ButtonWndProc_common( hWnd, uMsg, wParam, lParam, FALSE ); + return ButtonWndProc_wrapper16( hWnd, uMsg, wParam, lParam, FALSE ); }
1
0
0
0
Alexandre Julliard : user32: Split the handling of the 16-bit messages out of the edit winproc.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 68656c0c3f117c399c5cef81f1304d9ecf04ea05 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68656c0c3f117c399c5cef81f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 15:51:34 2009 +0100 user32: Split the handling of the 16-bit messages out of the edit winproc. --- dlls/user32/edit.c | 300 ++++++++++++++++++++++++---------------------------- 1 files changed, 140 insertions(+), 160 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=68656c0c3f117c399c5ce…
1
0
0
0
Alexandre Julliard : user32: Store the 16-bit edit handle directly in the window extra bytes.
by Alexandre Julliard
14 Dec '09
14 Dec '09
Module: wine Branch: master Commit: 810e701a3f21ccebdff4684ac1685d57d98f98ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=810e701a3f21ccebdff4684ac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 11 18:13:03 2009 +0100 user32: Store the 16-bit edit handle directly in the window extra bytes. --- dlls/user32/edit.c | 56 ++++++++++++++++++++++++++++----------------------- 1 files changed, 31 insertions(+), 25 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 7f7520b..c91abc1 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -149,8 +149,6 @@ typedef struct LPINT tabs; LINEDEF *first_line_def; /* linked list of (soft) linebreaks */ HLOCAL hloc32W; /* our unicode local memory block */ - HLOCAL16 hloc16; /* alias for 16-bit control receiving EM_GETHANDLE16 - or EM_SETHANDLE16 */ HLOCAL hloc32A; /* alias for ANSI control receiving EM_GETHANDLE or EM_SETHANDLE */ /* @@ -1176,29 +1174,32 @@ static inline void text_buffer_changed(EDITSTATE *es) es->text_length = (UINT)-1; } +#define GWW_HANDLE16 sizeof(EDITSTATE*) + /********************************************************************* * EDIT_LockBuffer16 */ static void EDIT_LockBuffer16(EDITSTATE *es) { STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved)); + HLOCAL16 hloc16 = GetWindowWord( es->hwndSelf, GWW_HANDLE16 ); HANDLE16 oldDS; HLOCAL hloc32; UINT size; - if (!es->hloc16) return; + if (!hloc16) return; if (!(hloc32 = es->hloc32A)) return; oldDS = stack16->ds; stack16->ds = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE ); - size = LocalSize16(es->hloc16); + size = LocalSize16(hloc16); if (LocalReAlloc( hloc32, size, LMEM_MOVEABLE )) { - char *text = MapSL( LocalLock16( es->hloc16 )); + char *text = MapSL( LocalLock16( hloc16 )); char *dest = LocalLock( hloc32 ); memcpy( dest, text, size ); LocalUnlock( hloc32 ); - LocalUnlock16( es->hloc16 ); + LocalUnlock16( hloc16 ); } stack16->ds = oldDS; @@ -1211,23 +1212,24 @@ static void EDIT_LockBuffer16(EDITSTATE *es) static void EDIT_UnlockBuffer16(EDITSTATE *es) { STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved)); + HLOCAL16 hloc16 = GetWindowWord( es->hwndSelf, GWW_HANDLE16 ); HANDLE16 oldDS; HLOCAL hloc32; UINT size; - if (!es->hloc16) return; + if (!hloc16) return; if (!(hloc32 = es->hloc32A)) return; size = LocalSize( hloc32 ); oldDS = stack16->ds; stack16->ds = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE ); - if (LocalReAlloc16( es->hloc16, size, LMEM_MOVEABLE )) + if (LocalReAlloc16( hloc16, size, LMEM_MOVEABLE )) { char *text = LocalLock( hloc32 ); - char *dest = MapSL( LocalLock16( es->hloc16 )); + char *dest = MapSL( LocalLock16( hloc16 )); memcpy( dest, text, size ); LocalUnlock( hloc32 ); - LocalUnlock16( es->hloc16 ); + LocalUnlock16( hloc16 ); } stack16->ds = oldDS; } @@ -2472,8 +2474,9 @@ static HLOCAL16 EDIT_EM_GetHandle16(EDITSTATE *es) HLOCAL hloc; STACK16FRAME* stack16; HANDLE16 oldDS; + HLOCAL16 hloc16 = GetWindowWord( es->hwndSelf, GWW_HANDLE16 ); - if (es->hloc16) return es->hloc16; + if (hloc16) return hloc16; if (!(hloc = EDIT_EM_GetHandle(es))) return 0; alloc_size = LocalSize( hloc ); @@ -2492,26 +2495,27 @@ static HLOCAL16 EDIT_EM_GetHandle16(EDITSTATE *es) } TRACE("Allocating 16-bit ANSI alias buffer\n"); - if (!(es->hloc16 = LocalAlloc16(LMEM_MOVEABLE | LMEM_ZEROINIT, alloc_size))) { + if (!(hloc16 = LocalAlloc16(LMEM_MOVEABLE | LMEM_ZEROINIT, alloc_size))) { ERR("could not allocate new 16 bit buffer\n"); goto done; } - if (!(textA = MapSL(LocalLock16( es->hloc16)))) { + if (!(textA = MapSL(LocalLock16( hloc16)))) { ERR("could not lock new 16 bit buffer\n"); - LocalFree16(es->hloc16); - es->hloc16 = 0; + LocalFree16(hloc16); + hloc16 = 0; goto done; } memcpy( textA, LocalLock( hloc ), alloc_size ); LocalUnlock( hloc ); - LocalUnlock16(es->hloc16); + LocalUnlock16( hloc16 ); + SetWindowWord( es->hwndSelf, GWW_HANDLE16, hloc16 ); - TRACE("Returning %04X, LocalSize() = %d\n", es->hloc16, LocalSize16(es->hloc16)); + TRACE("Returning %04X, LocalSize() = %d\n", hloc16, alloc_size); done: stack16->ds = oldDS; - return es->hloc16; + return hloc16; } @@ -2893,7 +2897,7 @@ static void EDIT_EM_SetHandle16(EDITSTATE *es, HLOCAL16 hloc16) memcpy( LocalLock(hloc32), text, count ); LocalUnlock(hloc32); LocalUnlock16(hloc16); - es->hloc16 = hloc16; + SetWindowWord( es->hwndSelf, GWW_HANDLE16, hloc16 ); } stack16->ds = oldDS; @@ -4683,6 +4687,7 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name) static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es) { LINEDEF *pc, *pp; + HLOCAL16 hloc16 = GetWindowWord( es->hwndSelf, GWW_HANDLE16 ); if (es->hloc32W) { LocalFree(es->hloc32W); @@ -4690,14 +4695,15 @@ static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es) if (es->hloc32A) { LocalFree(es->hloc32A); } - if (es->hloc16) { + if (hloc16) { STACK16FRAME* stack16 = MapSL(PtrToUlong(NtCurrentTeb()->WOW32Reserved)); HANDLE16 oldDS = stack16->ds; stack16->ds = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE ); - while (LocalUnlock16(es->hloc16)) ; - LocalFree16(es->hloc16); + while (LocalUnlock16(hloc16)) ; + LocalFree16(hloc16); stack16->ds = oldDS; + SetWindowWord( es->hwndSelf, GWW_HANDLE16, 0 ); } pc = es->first_line_def; @@ -5411,10 +5417,10 @@ const struct builtin_class_descr EDIT_builtin_class = CS_DBLCLKS | CS_PARENTDC, /* style */ EditWndProcA, /* procA */ EditWndProcW, /* procW */ -#ifdef _WIN64 - sizeof(EDITSTATE *), /* extra */ +#ifdef __i386__ + sizeof(EDITSTATE *) + sizeof(HLOCAL16), /* extra */ #else - sizeof(EDITSTATE *) + sizeof(HANDLE16), /* extra */ + sizeof(EDITSTATE *), /* extra */ #endif IDC_IBEAM, /* cursor */ 0 /* brush */
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
72
...
124
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200