hi,
once i got this crash. i have ve filled a bug report:
http://bugs.winehq.com/show_bug.cgi?id=1503
now, inspired with a notice made by Andreas Mohr..:
Ah, WAIT!! Watcom has: ./h/nt/winuser.h:#define SBM_GETRANGE 0x00E3 /*not in win3.1 */
.i decided to dig into some details. and i've stopped at one unclear state. wine has a patch in cvs:
http://www.winehq.org/hypermail/wine-patches/2003/03/0052.html
which says:
As discussed with Alexandre, this patch makes the GetScroll* API functions send a message to the Window in the case of SB_CTL scroll bars.
- if (!(infoPtr = SCROLL_GetScrollInfo( hwnd, nBar ))) - { - if (lpMin) lpMin = 0; - if (lpMax) lpMax = 0; - return FALSE; - } - if (lpMin) *lpMin = infoPtr->minVal; - if (lpMax) *lpMax = infoPtr->maxVal; - return TRUE; + /* Refer SB_CTL requests to the window */ + if (nBar == SB_CTL) + return SendMessageA(hwnd, SBM_GETRANGE, (WPARAM)lpMin, (LPARAM)lpMax); + else + return SCROLL_GetScrollRange(hwnd, nBar, lpMin, lpMax);
may now i ask someone for a help or explanation? the question is: if the win16 doesn't handle SBM_GETRANGE message, should wine send it in a case of win16 app? if no, then i'd like to start writing an additional check ;-).
and one more question. msdn states:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla...
If the nBar parameter is SB_CTL and the window specified by the hWnd parameter is not a system scroll bar control, the system sends the SBM_GETRANGE message to the window to obtain scroll bar information. This allows GetScrollRange to operate on a custom control that mimics a scroll bar.
aren't we missing one more check here? maybe we need to check class-name of control targeted by hwnd?
additional greps led me to:
[s2@katleriai wine-cvs]$ grep -A10 Scrollbar.messages wine/include/wine/winuser16.h /* Scrollbar messages */ #define SBM_SETPOS16 (WM_USER+0) #define SBM_GETPOS16 (WM_USER+1) #define SBM_SETRANGE16 (WM_USER+2) #define SBM_GETRANGE16 (WM_USER+3) #define SBM_ENABLE_ARROWS16 (WM_USER+4) #define SBM_SETRANGEREDRAW16 WM_NULL /* Not in Win16 */ #define SBM_SETSCROLLINFO16 WM_NULL /* Not in Win16 */ #define SBM_GETSCROLLINFO16 WM_NULL /* Not in Win16 */
/* CBT hook structures */
any ideas about where these constants came from? googling with "-wine" keyword gave me NULL :-/.