Author: jimtabor
Date: Fri Mar 5 00:25:30 2010
New Revision: 45847
URL:
http://svn.reactos.org/svn/reactos?rev=45847&view=rev
Log:
- [User32] Sync controls to wine 1.1.39.
Modified:
trunk/reactos/dll/win32/user32/controls/button.c
trunk/reactos/dll/win32/user32/controls/combo.c
trunk/reactos/dll/win32/user32/controls/icontitle.c
trunk/reactos/dll/win32/user32/controls/listbox.c
trunk/reactos/dll/win32/user32/controls/scrollbar.c
trunk/reactos/dll/win32/user32/controls/static.c
trunk/reactos/include/psdk/winuser.h
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/user32/controls/button.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/button.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/button.c [iso-8859-1] Fri Mar 5 00:25:30
2010
@@ -102,8 +102,6 @@
static void UB_Paint( HWND hwnd, HDC hDC, UINT action );
static void OB_Paint( HWND hwnd, HDC hDC, UINT action );
static void BUTTON_CheckAutoRadioButton( HWND hwnd );
-//static LRESULT WINAPI ButtonWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
lParam );
-//static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
lParam );
#define MAX_BTN_TYPE 12
@@ -291,6 +289,13 @@
}
if (btn_type >= MAX_BTN_TYPE)
return -1; /* abort */
+
+ /* XP turns a BS_USERBUTTON into BS_PUSHBUTTON */
+ if (btn_type == BS_USERBUTTON )
+ {
+ style = (style & ~0x0f) | BS_PUSHBUTTON;
+ SetWindowLongPtrW( hWnd, GWL_STYLE, style );
+ }
set_button_state( hWnd, BUTTON_UNCHECKED );
button_update_uistate( hWnd, unicode );
return 0;
@@ -474,9 +479,6 @@
InvalidateRect( hWnd, NULL, FALSE );
break;
-#ifndef __REACTOS__
- case BM_SETSTYLE16:
-#endif
case BM_SETSTYLE:
if ((wParam & 0x0f) >= MAX_BTN_TYPE) break;
btn_type = wParam & 0x0f;
@@ -485,7 +487,7 @@
/* Only redraw if lParam flag is set.*/
if (lParam)
- paint_button( hWnd, btn_type, ODA_DRAWENTIRE );
+ InvalidateRect( hWnd, NULL, TRUE );
break;
@@ -514,15 +516,9 @@
case BM_GETIMAGE:
return GetWindowLongPtrW( hWnd, HIMAGE_GWL_OFFSET );
-#ifndef __REACTOS__
- case BM_GETCHECK16:
-#endif
case BM_GETCHECK:
return get_button_state( hWnd ) & 3;
-#ifndef __REACTOS__
- case BM_SETCHECK16:
-#endif
case BM_SETCHECK:
if (wParam > maxCheckState[btn_type]) wParam = maxCheckState[btn_type];
state = get_button_state( hWnd );
@@ -541,15 +537,9 @@
BUTTON_CheckAutoRadioButton( hWnd );
break;
-#ifndef __REACTOS__
- case BM_GETSTATE16:
-#endif
case BM_GETSTATE:
return get_button_state( hWnd );
-#ifndef __REACTOS__
- case BM_SETSTATE16:
-#endif
case BM_SETSTATE:
state = get_button_state( hWnd );
if (wParam)
@@ -871,9 +861,15 @@
if (get_button_type(style) == BS_DEFPUSHBUTTON)
{
- Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
+ if (action != ODA_FOCUS)
+ Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
InflateRect( &rc, -1, -1 );
}
+
+ focus_rect = rc;
+
+ /* completely skip the drawing if only focus has changed */
+ if (action == ODA_FOCUS) goto draw_focus;
uState = DFCS_BUTTONPUSH | DFCS_ADJUSTRECT;
@@ -892,8 +888,6 @@
DrawFrameControl( hDC, &rc, DFC_BUTTON, uState );
- focus_rect = rc;
-
/* draw button label */
r = rc;
dtFlags = BUTTON_CalcLabelRect(hwnd, hDC, &r);
@@ -912,7 +906,9 @@
SetTextColor( hDC, oldTxtColor );
- if (state & BUTTON_HASFOCUS)
+draw_focus:
+ if ((action == ODA_FOCUS) ||
+ ((action == ODA_DRAWENTIRE) && (state & BUTTON_HASFOCUS)))
{
if (!(get_ui_state(hwnd) & UISF_HIDEFOCUS))
{
@@ -1165,6 +1161,8 @@
if (!(get_ui_state(hwnd) & UISF_HIDEFOCUS))
DrawFocusRect( hDC, &rc );
}
+
+ BUTTON_NOTIFY_PARENT( hwnd, BN_PAINT );
}
Modified: trunk/reactos/dll/win32/user32/controls/combo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/combo.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/combo.c [iso-8859-1] Fri Mar 5 00:25:30 2010
@@ -73,9 +73,6 @@
#define COMBO_YBORDERSIZE() 2
#define COMBO_EDITBUTTONSPACE() 0
#define EDIT_CONTROL_PADDING() 1
-
-//static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
);
-//static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
);
/*********************************************************************
* combo class descriptor
Modified: trunk/reactos/dll/win32/user32/controls/icontitle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/icontitle.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/icontitle.c [iso-8859-1] Fri Mar 5 00:25:30
2010
@@ -29,8 +29,6 @@
static BOOL bMultiLineTitle;
static HFONT hIconTitleFont;
-
-//static LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
lParam );
/*********************************************************************
* icon title class descriptor
Modified: trunk/reactos/dll/win32/user32/controls/listbox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] Fri Mar 5 00:25:30
2010
@@ -39,13 +39,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(listbox);
/* Start of hack section -------------------------------- */
-
-typedef short *LPINT16;
-
-BOOL is_old_app(HWND hwnd)
-{
- return FALSE;
-}
#define WM_LBTRACKPOINT 0x0131
#define WS_EX_DRAGDETECT 0x00000002L
@@ -105,7 +98,7 @@
HFONT font; /* Current font */
LCID locale; /* Current locale for string comparisons */
LPHEADCOMBO lphc; /* ComboLBox */
- LONG UIState;
+ LONG UIState; // REACTOS
} LB_DESCR;
@@ -137,9 +130,6 @@
} TIMER_DIRECTION;
static TIMER_DIRECTION LISTBOX_Timer = LB_TIMER_NONE;
-
-//static LRESULT WINAPI ListBoxWndProcA( HWND hwnd, UINT msg, WPARAM wParam,LPARAM lParam
);
-//static LRESULT WINAPI ListBoxWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
lParam );
static LRESULT LISTBOX_GetItemRect( const LB_DESCR *descr, INT index, RECT *rect );
@@ -173,14 +163,6 @@
IDC_ARROW, /* cursor */
0 /* brush */
};
-
-#ifndef __REACTOS__
-/* check whether app is a Win 3.1 app */
-static inline BOOL is_old_app( LB_DESCR *descr )
-{
- return (GetExpWinVer16( GetWindowLongPtrW(descr->self, GWLP_HINSTANCE) ) &
0xFF00 ) == 0x0300;
-}
-#endif
/***********************************************************************
@@ -409,16 +391,6 @@
remaining = 0;
if ((descr->height > descr->item_height) && remaining)
{
-#ifndef __REACTOS__
- if (is_old_app(descr))
- { /* give a margin for error to 16 bits programs - if we need
- less than the height of the nonclient area, round to the
- *next* number of items */
- int ncheight = rect.bottom - rect.top - descr->height;
- if ((descr->item_height - remaining) <= ncheight)
- remaining = remaining - descr->item_height;
- }
-#endif
TRACE("[%p]: changing height %d -> %d\n",
descr->self, descr->height, descr->height - remaining );
SetWindowPos( descr->self, 0, 0, 0, rect.right - rect.left,
@@ -565,10 +537,10 @@
if (!item)
{
if (action == ODA_FOCUS)
- {
- if (!(descr->UIState & UISF_HIDEFOCUS))
- DrawFocusRect( hdc, rect );
- }
+ { // REACTOS
+ if (!(descr->UIState & UISF_HIDEFOCUS))
+ DrawFocusRect( hdc, rect );
+ } //
else
ERR("called with an out of bounds index %d(%d) in owner draw, Not
good.\n",index,descr->nb_items);
return;
@@ -608,7 +580,7 @@
if (action == ODA_FOCUS)
{
- if (!(descr->UIState & UISF_HIDEFOCUS))
+ if (!(descr->UIState & UISF_HIDEFOCUS)) // REACTOS
DrawFocusRect( hdc, rect );
return;
}
@@ -771,7 +743,7 @@
/***********************************************************************
* LISTBOX_SetTabStops
*/
-static BOOL LISTBOX_SetTabStops( LB_DESCR *descr, INT count, LPINT tabs, BOOL short_ints
)
+static BOOL LISTBOX_SetTabStops( LB_DESCR *descr, INT count, LPINT tabs )
{
INT i;
@@ -790,23 +762,7 @@
if (!(descr->tabs = HeapAlloc( GetProcessHeap(), 0,
descr->nb_tabs * sizeof(INT) )))
return FALSE;
-#ifndef __REACTOS__
- if (short_ints)
- {
- INT i;
- LPINT16 p = (LPINT16)tabs;
-
- TRACE("[%p]: settabstops ", descr->self );
- for (i = 0; i < descr->nb_tabs; i++) {
- descr->tabs[i] = *p++<<1; /* FIXME */
- TRACE("%hd ", descr->tabs[i]);
- }
- TRACE("\n");
- }
- else memcpy( descr->tabs, tabs, descr->nb_tabs * sizeof(INT) );
-#else
- memcpy( descr->tabs, tabs, descr->nb_tabs * sizeof(INT) );
-#endif
+ memcpy( descr->tabs, tabs, descr->nb_tabs * sizeof(INT) );
/* convert into "dialog units"*/
for (i = 0; i < descr->nb_tabs; i++)
@@ -1049,23 +1005,6 @@
}
-#ifndef __REACTOS__
-/***********************************************************************
- * LISTBOX_GetSelItems16
- */
-static LRESULT LISTBOX_GetSelItems16( const LB_DESCR *descr, INT16 max, LPINT16 array )
-{
- INT i, count;
- const LB_ITEMDATA *item = descr->items;
-
- if (!(descr->style & LBS_MULTIPLESEL)) return LB_ERR;
- for (i = count = 0; (i < descr->nb_items) && (count < max); i++,
item++)
- if (item->selected) array[count++] = (INT16)i;
- return count;
-}
-#endif
-
-
/***********************************************************************
* LISTBOX_GetSelItems
*/
@@ -1595,15 +1534,8 @@
/* We need to grow the array */
max_items += LB_ARRAY_GRANULARITY;
if (descr->items)
- {
item = HeapReAlloc( GetProcessHeap(), 0, descr->items,
max_items * sizeof(LB_ITEMDATA) );
- if (!item)
- {
- SEND_NOTIFICATION( descr, LBN_ERRSPACE );
- return LB_ERRSPACE;
- }
- }
else
item = HeapAlloc( GetProcessHeap(), 0,
max_items * sizeof(LB_ITEMDATA) );
@@ -2166,7 +2098,7 @@
}
if (!descr->lphc)
- {
+ { // See rev 40864 use Ptr for 64 bit.
if (GetWindowLongPtrW( descr->self, GWL_EXSTYLE ) & WS_EX_DRAGDETECT)
{
POINT pt;
@@ -2539,7 +2471,7 @@
return 0;
}
-/* Retrieve the UI state for the control */
+/* ReactOS Retrieve the UI state for the control */
static BOOL LISTBOX_update_uistate(LB_DESCR *descr)
{
LONG prev_flags;
@@ -2589,18 +2521,6 @@
descr->locale = GetUserDefaultLCID();
descr->lphc = lphc;
-#ifndef __REACTOS__
- if (is_old_app(descr) && ( descr->style & ( WS_VSCROLL | WS_HSCROLL )
) )
- {
- /* Win95 document "List Box Differences" from MSDN:
- If a list box in a version 3.x application has either the
- WS_HSCROLL or WS_VSCROLL style, the list box receives both
- horizontal and vertical scroll bars.
- */
- descr->style |= WS_VSCROLL | WS_HSCROLL;
- }
-#endif
-
if( lphc )
{
TRACE("[%p]: resetting owner %p -> %p\n", descr->self,
descr->owner, lphc->self );
@@ -2609,7 +2529,7 @@
SetWindowLongPtrW( descr->self, 0, (LONG_PTR)descr );
- LISTBOX_update_uistate(descr);
+ LISTBOX_update_uistate(descr); // ReactOS
/* if (wnd->dwExStyle & WS_EX_NOPARENTNOTIFY) descr->style &=
~LBS_NOTIFY;
*/
@@ -2689,20 +2609,12 @@
switch(msg)
{
-#ifndef __REACTOS__
- case LB_RESETCONTENT16:
-#endif
case LB_RESETCONTENT:
LISTBOX_ResetContent( descr );
LISTBOX_UpdateScroll( descr );
InvalidateRect( descr->self, NULL, TRUE );
return 0;
-#ifndef __REACTOS__
- case LB_ADDSTRING16:
- if (HAS_STRINGS(descr)) lParam = (LPARAM)MapSL(lParam);
- /* fall through */
-#endif
case LB_ADDSTRING:
case LB_ADDSTRING_LOWER:
case LB_ADDSTRING_UPPER:
@@ -2733,12 +2645,6 @@
return ret;
}
-#ifndef __REACTOS__
- case LB_INSERTSTRING16:
- if (HAS_STRINGS(descr)) lParam = (LPARAM)MapSL(lParam);
- wParam = (INT)(INT16)wParam;
- /* fall through */
-#endif
case LB_INSERTSTRING:
case LB_INSERTSTRING_UPPER:
case LB_INSERTSTRING_LOWER:
@@ -2768,11 +2674,6 @@
return ret;
}
-#ifndef __REACTOS__
- case LB_ADDFILE16:
- if (HAS_STRINGS(descr)) lParam = (LPARAM)MapSL(lParam);
- /* fall through */
-#endif
case LB_ADDFILE:
{
INT ret;
@@ -2795,9 +2696,6 @@
return ret;
}
-#ifndef __REACTOS__
- case LB_DELETESTRING16:
-#endif
case LB_DELETESTRING:
if (LISTBOX_RemoveItem( descr, wParam) != LB_ERR)
return descr->nb_items;
@@ -2807,9 +2705,6 @@
return LB_ERR;
}
-#ifndef __REACTOS__
- case LB_GETITEMDATA16:
-#endif
case LB_GETITEMDATA:
if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items))
{
@@ -2818,9 +2713,6 @@
}
return descr->items[wParam].data;
-#ifndef __REACTOS__
- case LB_SETITEMDATA16:
-#endif
case LB_SETITEMDATA:
if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items))
{
@@ -2831,24 +2723,12 @@
/* undocumented: returns TRUE, not LB_OKAY (0) */
return TRUE;
-#ifndef __REACTOS__
- case LB_GETCOUNT16:
-#endif
case LB_GETCOUNT:
return descr->nb_items;
-#ifndef __REACTOS__
- case LB_GETTEXT16:
- lParam = (LPARAM)MapSL(lParam);
- /* fall through */
-#endif
case LB_GETTEXT:
return LISTBOX_GetText( descr, wParam, (LPWSTR)lParam, unicode );
-#ifndef __REACTOS__
- case LB_GETTEXTLEN16:
- /* fall through */
-#endif
case LB_GETTEXTLEN:
if ((INT)wParam >= descr->nb_items || (INT)wParam < 0)
{
@@ -2860,9 +2740,6 @@
return WideCharToMultiByte( CP_ACP, 0, descr->items[wParam].str,
strlenW(descr->items[wParam].str), NULL, 0, NULL,
NULL );
-#ifndef __REACTOS__
- case LB_GETCURSEL16:
-#endif
case LB_GETCURSEL:
if (descr->nb_items == 0)
return LB_ERR;
@@ -2873,23 +2750,12 @@
return descr->focus_item;
/* otherwise, if the user tries to move the selection with the */
/* arrow keys, we will give the application something to choke on */
-#ifndef __REACTOS__
- case LB_GETTOPINDEX16:
-#endif
case LB_GETTOPINDEX:
return descr->top_item;
-#ifndef __REACTOS__
- case LB_GETITEMHEIGHT16:
-#endif
case LB_GETITEMHEIGHT:
return LISTBOX_GetItemHeight( descr, wParam );
-#ifndef __REACTOS__
- case LB_SETITEMHEIGHT16:
- lParam = LOWORD(lParam);
- /* fall through */
-#endif
case LB_SETITEMHEIGHT:
return LISTBOX_SetItemHeight( descr, wParam, lParam, TRUE );
@@ -2931,9 +2797,6 @@
return MAKELONG(index, hit ? 0 : 1);
}
-#ifndef __REACTOS__
- case LB_SETCARETINDEX16:
-#endif
case LB_SETCARETINDEX:
if ((!IS_MULTISELECT(descr)) && (descr->selected_item != -1)) return
LB_ERR;
if (LISTBOX_SetCaretIndex( descr, wParam, !lParam ) == LB_ERR)
@@ -2943,47 +2806,18 @@
else
return LB_OKAY;
-#ifndef __REACTOS__
- case LB_GETCARETINDEX16:
-#endif
case LB_GETCARETINDEX:
return descr->focus_item;
-#ifndef __REACTOS__
- case LB_SETTOPINDEX16:
-#endif
case LB_SETTOPINDEX:
return LISTBOX_SetTopItem( descr, wParam, TRUE );
-#ifndef __REACTOS__
- case LB_SETCOLUMNWIDTH16:
-#endif
case LB_SETCOLUMNWIDTH:
return LISTBOX_SetColumnWidth( descr, wParam );
-#ifndef __REACTOS__
- case LB_GETITEMRECT16:
- {
- RECT rect;
- RECT16 *r16 = MapSL(lParam);
- ret = LISTBOX_GetItemRect( descr, (INT16)wParam, &rect );
- r16->left = rect.left;
- r16->top = rect.top;
- r16->right = rect.right;
- r16->bottom = rect.bottom;
- }
- return ret;
-#endif
-
case LB_GETITEMRECT:
return LISTBOX_GetItemRect( descr, wParam, (RECT *)lParam );
-#ifndef __REACTOS__
- case LB_FINDSTRING16:
- wParam = (INT)(INT16)wParam;
- if (HAS_STRINGS(descr)) lParam = (LPARAM)MapSL(lParam);
- /* fall through */
-#endif
case LB_FINDSTRING:
{
INT ret;
@@ -3003,12 +2837,6 @@
return ret;
}
-#ifndef __REACTOS__
- case LB_FINDSTRINGEXACT16:
- wParam = (INT)(INT16)wParam;
- if (HAS_STRINGS(descr)) lParam = (LPARAM)MapSL(lParam);
- /* fall through */
-#endif
case LB_FINDSTRINGEXACT:
{
INT ret;
@@ -3028,12 +2856,6 @@
return ret;
}
-#ifndef __REACTOS__
- case LB_SELECTSTRING16:
- wParam = (INT)(INT16)wParam;
- if (HAS_STRINGS(descr)) lParam = (LPARAM)MapSL(lParam);
- /* fall through */
-#endif
case LB_SELECTSTRING:
{
INT index;
@@ -3062,29 +2884,14 @@
return index;
}
-#ifndef __REACTOS__
- case LB_GETSEL16:
- wParam = (INT)(INT16)wParam;
- /* fall through */
-#endif
case LB_GETSEL:
if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items))
return LB_ERR;
return descr->items[wParam].selected;
-#ifndef __REACTOS__
- case LB_SETSEL16:
- lParam = (INT)(INT16)lParam;
- /* fall through */
-#endif
case LB_SETSEL:
return LISTBOX_SetSelection( descr, lParam, wParam, FALSE );
-#ifndef __REACTOS__
- case LB_SETCURSEL16:
- wParam = (INT)(INT16)wParam;
- /* fall through */
-#endif
case LB_SETCURSEL:
if (IS_MULTISELECT(descr)) return LB_ERR;
LISTBOX_SetCaretIndex( descr, wParam, FALSE );
@@ -3092,23 +2899,12 @@
if (ret != LB_ERR) ret = descr->selected_item;
return ret;
-#ifndef __REACTOS__
- case LB_GETSELCOUNT16:
-#endif
case LB_GETSELCOUNT:
return LISTBOX_GetSelCount( descr );
-#ifndef __REACTOS__
- case LB_GETSELITEMS16:
- return LISTBOX_GetSelItems16( descr, wParam, (LPINT16)MapSL(lParam) );
-#endif
-
case LB_GETSELITEMS:
return LISTBOX_GetSelItems( descr, wParam, (LPINT)lParam );
-#ifndef __REACTOS__
- case LB_SELITEMRANGE16:
-#endif
case LB_SELITEMRANGE:
if (LOWORD(lParam) <= HIWORD(lParam))
return LISTBOX_SelectItemRange( descr, LOWORD(lParam),
@@ -3117,38 +2913,21 @@
return LISTBOX_SelectItemRange( descr, HIWORD(lParam),
LOWORD(lParam), wParam );
-#ifndef __REACTOS__
- case LB_SELITEMRANGEEX16:
-#endif
case LB_SELITEMRANGEEX:
if ((INT)lParam >= (INT)wParam)
return LISTBOX_SelectItemRange( descr, wParam, lParam, TRUE );
else
return LISTBOX_SelectItemRange( descr, lParam, wParam, FALSE);
-#ifndef __REACTOS__
- case LB_GETHORIZONTALEXTENT16:
-#endif
case LB_GETHORIZONTALEXTENT:
return descr->horz_extent;
-#ifndef __REACTOS__
- case LB_SETHORIZONTALEXTENT16:
-#endif
case LB_SETHORIZONTALEXTENT:
return LISTBOX_SetHorizontalExtent( descr, wParam );
-#ifndef __REACTOS__
- case LB_GETANCHORINDEX16:
-#endif
case LB_GETANCHORINDEX:
return descr->anchor_item;
-#ifndef __REACTOS__
- case LB_SETANCHORINDEX16:
- wParam = (INT)(INT16)wParam;
- /* fall through */
-#endif
case LB_SETANCHORINDEX:
if (((INT)wParam < -1) || ((INT)wParam >= descr->nb_items))
{
@@ -3158,14 +2937,6 @@
descr->anchor_item = (INT)wParam;
return LB_OKAY;
-#ifndef __REACTOS__
- case LB_DIR16:
- /* according to Win16 docs, DDL_DRIVES should make DDL_EXCLUSIVE
- * be set automatically (this is different in Win32) */
- if (wParam & DDL_DRIVES) wParam |= DDL_EXCLUSIVE;
- lParam = (LPARAM)MapSL(lParam);
- /* fall through */
-#endif
case LB_DIR:
{
INT ret;
@@ -3204,17 +2975,9 @@
case LB_SETCOUNT:
return LISTBOX_SetCount( descr, (INT)wParam );
-#ifndef __REACTOS__
- case LB_SETTABSTOPS16:
- return LISTBOX_SetTabStops( descr, (INT)(INT16)wParam, MapSL(lParam), TRUE );
-#endif
-
case LB_SETTABSTOPS:
- return LISTBOX_SetTabStops( descr, wParam, (LPINT)lParam, FALSE );
-
-#ifndef __REACTOS__
- case LB_CARETON16:
-#endif
+ return LISTBOX_SetTabStops( descr, wParam, (LPINT)lParam );
+
case LB_CARETON:
if (descr->caret_on)
return LB_OKAY;
@@ -3223,9 +2986,6 @@
LISTBOX_RepaintItem( descr, descr->focus_item, ODA_FOCUS );
return LB_OKAY;
-#ifndef __REACTOS__
- case LB_CARETOFF16:
-#endif
case LB_CARETOFF:
if (!descr->caret_on)
return LB_OKAY;
@@ -3418,7 +3178,7 @@
case WM_NCACTIVATE:
if (lphc) return 0;
break;
-
+// ReactOS
case WM_UPDATEUISTATE:
if (unicode)
DefWindowProcW(descr->self, msg, wParam, lParam);
@@ -3432,7 +3192,7 @@
LISTBOX_DrawFocusRect( descr, descr->in_focus );
}
break;
-
+//
default:
if ((msg >= WM_USER) && (msg < 0xc000))
WARN("[%p]: unknown msg %04x wp %08lx lp %08lx\n",
Modified: trunk/reactos/dll/win32/user32/controls/scrollbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] Fri Mar 5 00:25:30
2010
@@ -67,9 +67,6 @@
static BOOL ScrollTrackVertical;
HBRUSH DefWndControlColor(HDC hDC, UINT ctlType);
-
-//static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
lParam );
-//static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
lParam );
UINT WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
BOOL WINAPI KillSystemTimer(HWND,UINT_PTR);
@@ -712,6 +709,22 @@
DrawFrameControl(Dc, &Rect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
}
+/***********************************************************************
+ * SCROLL_RefreshScrollBar
+ *
+ * Repaint the scroll bar interior after a SetScrollRange() or
+ * SetScrollPos() call.
+ */
+static void SCROLL_RefreshScrollBar( HWND hwnd, INT nBar,
+ BOOL arrows, BOOL interior )
+{
+ HDC hdc = GetDCEx( hwnd, 0,
+ DCX_CACHE | ((nBar == SB_CTL) ? 0 : DCX_WINDOW) );
+ if (!hdc) return;
+
+ IntDrawScrollBar( hwnd, hdc, nBar);//, arrows, interior );
+ ReleaseDC( hwnd, hdc );
+}
/***********************************************************************
@@ -1399,14 +1412,14 @@
case SBM_GETPOS:
return IntScrollGetScrollPos(Wnd, SB_CTL);
+ case SBM_SETRANGEREDRAW:
case SBM_SETRANGE:
{
INT OldPos = IntScrollGetScrollPos(Wnd, SB_CTL);
SetScrollRange(Wnd, SB_CTL, wParam, lParam, FALSE);
- if (OldPos != IntScrollGetScrollPos(Wnd, SB_CTL))
- {
- return OldPos;
- }
+ if (Msg == SBM_SETRANGEREDRAW)
+ SCROLL_RefreshScrollBar( Wnd, SB_CTL, TRUE, TRUE );
+ if (OldPos != IntScrollGetScrollPos(Wnd, SB_CTL)) return OldPos;
}
return 0;
@@ -1416,27 +1429,19 @@
case SBM_ENABLE_ARROWS:
return EnableScrollBar(Wnd, SB_CTL, wParam);
- case SBM_SETRANGEREDRAW:
- {
- INT OldPos = IntScrollGetScrollPos(Wnd, SB_CTL);
- SetScrollRange(Wnd, SB_CTL, wParam, lParam, TRUE);
- if (OldPos != IntScrollGetScrollPos(Wnd, SB_CTL))
- {
- return OldPos;
- }
- }
- return 0;
-
case SBM_SETSCROLLINFO:
return NtUserSetScrollInfo(Wnd, SB_CTL, (SCROLLINFO *) lParam, wParam);
case SBM_GETSCROLLINFO:
return NtUserSBGetParms(Wnd, SB_CTL, NULL, (SCROLLINFO *) lParam);
+
+ case SBM_GETSCROLLBARINFO:
+ ((PSCROLLBARINFO)lParam)->cbSize = sizeof(SCROLLBARINFO);
+ return NtUserGetScrollBarInfo(Wnd, OBJID_CLIENT, (PSCROLLBARINFO)lParam);
case 0x00e5:
case 0x00e7:
case 0x00e8:
- case 0x00eb:
case 0x00ec:
case 0x00ed:
case 0x00ee:
@@ -1505,8 +1510,8 @@
PWND pWnd;
PSBDATA pSBData = NULL;
- if (SB_CTL == SBType)
- {
+ if (SB_CTL == SBType)
+ {
return SendMessageW(Wnd, SBM_GETSCROLLINFO, 0, (LPARAM) Info);
}
Modified: trunk/reactos/dll/win32/user32/controls/static.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] Fri Mar 5 00:25:30
2010
@@ -296,23 +296,25 @@
*
* Load the icon for an SS_ICON control.
*/
-static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name, DWORD style )
-{
- HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
- if ((style & SS_REALSIZEIMAGE) != 0)
- {
- return LoadImageA(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED);
- }
- else
- {
- HICON hicon = LoadIconA( hInstance, name );
- if (!hicon) hicon = LoadCursorA( hInstance, name );
- if (!hicon) hicon = LoadIconA( 0, name );
- /* Windows doesn't try to load a standard cursor,
- probably because most IDs for standard cursors conflict
- with the IDs for standard icons anyway */
- return hicon;
- }
+static HICON STATIC_LoadIconA( HINSTANCE hInstance, LPCSTR name, DWORD style )
+{
+ HICON hicon = 0;
+
+ if (hInstance && ((ULONG_PTR)hInstance >> 16))
+ {
+ if ((style & SS_REALSIZEIMAGE) != 0)
+ hicon = LoadImageA(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED);
+ else
+ {
+ hicon = LoadIconA( hInstance, name );
+ if (!hicon) hicon = LoadCursorA( hInstance, name );
+ }
+ }
+ if (!hicon) hicon = LoadIconA( 0, name );
+ /* Windows doesn't try to load a standard cursor,
+ probably because most IDs for standard cursors conflict
+ with the IDs for standard icons anyway */
+ return hicon;
}
/***********************************************************************
@@ -320,48 +322,27 @@
*
* Load the icon for an SS_ICON control.
*/
-static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name, DWORD style )
-{
- HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
- if ((style & SS_REALSIZEIMAGE) != 0)
- {
- return LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED);
- }
- else
- {
- HICON hicon = LoadIconW( hInstance, name );
- if (!hicon) hicon = LoadCursorW( hInstance, name );
- if (!hicon) hicon = LoadIconW( 0, name );
- /* Windows doesn't try to load a standard cursor,
- probably because most IDs for standard cursors conflict
- with the IDs for standard icons anyway */
- return hicon;
- }
-}
-
-/***********************************************************************
- * STATIC_LoadBitmapA
- *
- * Load the bitmap for an SS_BITMAP control.
- */
-static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name )
-{
- HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
- /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */
- return LoadBitmapA( hInstance, name );
-}
-
-/***********************************************************************
- * STATIC_LoadBitmapW
- *
- * Load the bitmap for an SS_BITMAP control.
- */
-static HBITMAP STATIC_LoadBitmapW( HWND hwnd, LPCWSTR name )
-{
- HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
- /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */
- return LoadBitmapW( hInstance, name );
-}
+static HICON STATIC_LoadIconW( HINSTANCE hInstance, LPCWSTR name, DWORD style )
+{
+ HICON hicon = 0;
+
+ if (hInstance && ((ULONG_PTR)hInstance >> 16))
+ {
+ if ((style & SS_REALSIZEIMAGE) != 0)
+ hicon = LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED);
+ else
+ {
+ hicon = LoadIconW( hInstance, name );
+ if (!hicon) hicon = LoadCursorW( hInstance, name );
+ }
+ }
+ if (!hicon) hicon = LoadIconW( 0, name );
+ /* Windows doesn't try to load a standard cursor,
+ probably because most IDs for standard cursors conflict
+ with the IDs for standard icons anyway */
+ return hicon;
+}
+
/***********************************************************************
* STATIC_TryPaintFcn
@@ -513,6 +494,7 @@
{
LPCSTR textA;
LPCWSTR textW;
+ HINSTANCE hInstance;
if (full_style & SS_SUNKEN)
SetWindowLongPtrW( hwnd, GWL_EXSTYLE,
@@ -527,26 +509,30 @@
{
textA = ((LPCREATESTRUCTA)lParam)->lpszName;
textW = NULL;
+
}
+
+ hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
switch (style) {
case SS_ICON:
{
HICON hIcon;
- if(unicode)
- hIcon = STATIC_LoadIconW(hwnd, textW, full_style);
+ if(unicode )
+ hIcon = STATIC_LoadIconW(hInstance, textW, full_style);
else
- hIcon = STATIC_LoadIconA(hwnd, textA, full_style);
+ hIcon = STATIC_LoadIconA(hInstance, textA, full_style);
STATIC_SetIcon(hwnd, hIcon, full_style);
}
break;
case SS_BITMAP:
+ if ((ULONG_PTR)hInstance >> 16)
{
HBITMAP hBitmap;
if(unicode)
- hBitmap = STATIC_LoadBitmapW(hwnd, textW);
+ hBitmap = LoadBitmapW(hInstance, textW);
else
- hBitmap = STATIC_LoadBitmapA(hwnd, textA);
+ hBitmap = LoadBitmapA(hInstance, textA);
STATIC_SetBitmap(hwnd, hBitmap, full_style);
}
break;
@@ -575,8 +561,8 @@
if (hasTextStyle( full_style ))
{
SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
- if (LOWORD(lParam))
- RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW |
RDW_ALLCHILDREN );
+ if (LOWORD(lParam))
+ RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW |
RDW_ALLCHILDREN );
}
break;
@@ -608,9 +594,7 @@
case STM_GETIMAGE:
return (LRESULT)STATIC_GetImage( hwnd, wParam, full_style );
-#ifndef __REACTOS__
- case STM_GETICON16:
-#endif
+
case STM_GETICON:
return (LRESULT)STATIC_GetImage( hwnd, IMAGE_ICON, full_style );
@@ -636,9 +620,6 @@
STATIC_TryPaintFcn( hwnd, full_style );
break;
-#ifndef __REACTOS__
- case STM_SETICON16:
-#endif
case STM_SETICON:
lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)wParam, full_style );
STATIC_TryPaintFcn( hwnd, full_style );
Modified: trunk/reactos/include/psdk/winuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winuser.h [iso-8859-1] Fri Mar 5 00:25:30 2010
@@ -1993,11 +1993,16 @@
#define SBM_ENABLE_ARROWS 228
#define SBM_GETPOS 225
#define SBM_GETRANGE 227
-#define SBM_GETSCROLLINFO 234
#define SBM_SETPOS 224
#define SBM_SETRANGE 226
#define SBM_SETRANGEREDRAW 230
+#if (_WIN32_WINNT >= 0x0400)
+#define SBM_GETSCROLLINFO 234
#define SBM_SETSCROLLINFO 233
+#endif
+#if (_WIN32_WINNT >= 0x0501)
+#define SBM_GETSCROLLBARINFO 235
+#endif
#define STM_GETICON 369
#define STM_GETIMAGE 371
#define STM_SETICON 368
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Mar 5 00:25:30 2010
@@ -230,13 +230,13 @@
reactos/dll/win32/snmpapi/main.c # Synced at 20090222
User32 -
- reactos/dll/win32/user32/controls/button.c # Synced to Wine-1_1_22
- reactos/dll/win32/user32/controls/combo.c # Synced to Wine-1_1_22
- reactos/dll/win32/user32/controls/edit.c # Synced to Wine-1_1_29
- reactos/dll/win32/user32/controls/icontitle.c # Synced to Wine-1_1_13
- reactos/dll/win32/user32/controls/listbox.c # Synced to Wine-1_1_22
+ reactos/dll/win32/user32/controls/button.c # Synced to Wine-1_1_39
+ reactos/dll/win32/user32/controls/combo.c # Synced to Wine-1_1_39
+ reactos/dll/win32/user32/controls/edit.c # Synced to Wine-1_1_39
+ reactos/dll/win32/user32/controls/icontitle.c # Synced to Wine-1_1_39
+ reactos/dll/win32/user32/controls/listbox.c # Synced to Wine-1_1_39
reactos/dll/win32/user32/controls/scrollbar.c # Forked
- reactos/dll/win32/user32/controls/static.c # Synced to Wine-1_1_22
+ reactos/dll/win32/user32/controls/static.c # Synced to Wine-1_1_39
reactos/dll/win32/user32/include/dde_private.h # Synced to wine 1.1.24