Author: cwittich
Date: Sat Jun 6 12:50:05 2009
New Revision: 41296
URL:
http://svn.reactos.org/svn/reactos?rev=41296&view=rev
Log:
sync user32 button and static to wine 1.1.22
Modified:
trunk/reactos/dll/win32/user32/controls/button.c
trunk/reactos/dll/win32/user32/controls/static.c
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] Sat Jun 6 12:50:05
2009
@@ -330,6 +330,7 @@
{
SendMessageW( hWnd, BM_SETSTATE, TRUE, 0 );
set_button_state( hWnd, get_button_state( hWnd ) | BUTTON_BTNPRESSED );
+ SetCapture( hWnd );
}
break;
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] Sat Jun 6 12:50:05
2009
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* NOTES
*
@@ -68,7 +68,7 @@
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
-static pfPaint staticPaintFunc[SS_TYPEMASK+1] =
+static const pfPaint staticPaintFunc[SS_TYPEMASK+1] =
{
STATIC_PaintTextfn, /* SS_LEFT */
STATIC_PaintTextfn, /* SS_CENTER */
@@ -95,9 +95,10 @@
/*********************************************************************
* static class descriptor
*/
+static const WCHAR staticW[] =
{'S','t','a','t','i','c',0};
const struct builtin_class_descr STATIC_builtin_class =
{
- L"Static", /* name */
+ staticW, /* name */
CS_DBLCLKS | CS_PARENTDC, /* style */
StaticWndProcA, /* procA */
StaticWndProcW, /* procW */
@@ -106,6 +107,7 @@
0 /* brush */
};
+/* REACTOS ONLY */
static __inline void set_ui_state( HWND hwnd, LONG flags )
{
SetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET, flags );
@@ -115,6 +117,29 @@
{
return GetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET );
}
+
+/* Retrieve the UI state for the control */
+static BOOL STATIC_update_uistate(HWND hwnd, BOOL unicode)
+{
+ LONG flags, prevflags;
+
+ if (unicode)
+ flags = DefWindowProcW(hwnd, WM_QUERYUISTATE, 0, 0);
+ else
+ flags = DefWindowProcA(hwnd, WM_QUERYUISTATE, 0, 0);
+
+ prevflags = get_ui_state(hwnd);
+
+ if (prevflags != flags)
+ {
+ set_ui_state(hwnd, flags);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* END REACTOS ONLY */
static void setup_clipping(HWND hwnd, HDC hdc, HRGN *orig)
{
@@ -144,27 +169,6 @@
DeleteObject(hrgn);
}
-/* Retrieve the UI state for the control */
-static BOOL STATIC_update_uistate(HWND hwnd, BOOL unicode)
-{
- LONG flags, prevflags;
-
- if (unicode)
- flags = DefWindowProcW(hwnd, WM_QUERYUISTATE, 0, 0);
- else
- flags = DefWindowProcA(hwnd, WM_QUERYUISTATE, 0, 0);
-
- prevflags = get_ui_state(hwnd);
-
- if (prevflags != flags)
- {
- set_ui_state(hwnd, flags);
- return TRUE;
- }
-
- return FALSE;
-}
-
/***********************************************************************
* STATIC_SetIcon
*
@@ -241,6 +245,7 @@
SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
}
+
}
return hOldBitmap;
}
@@ -306,7 +311,7 @@
/* 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;
+ return hicon;
}
}
@@ -387,14 +392,14 @@
HBRUSH hBrush;
HWND parent = GetParent(hwnd);
- if(!parent) parent = hwnd;
- hBrush = (HBRUSH) SendMessageW( GetParent(hwnd),
+ if (!parent) parent = hwnd;
+ hBrush = (HBRUSH) SendMessageW( parent,
WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
if (!hBrush) /* did the app forget to call DefWindowProc ? */
{
/* FIXME: DefWindowProc should return different colors if a
manifest is present */
- hBrush = (HBRUSH)DefWindowProcW(GetParent(hwnd), WM_CTLCOLORSTATIC,
+ hBrush = (HBRUSH)DefWindowProcW( parent, WM_CTLCOLORSTATIC,
(WPARAM)hdc, (LPARAM)hwnd);
}
return hBrush;
@@ -622,7 +627,7 @@
lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)lParam, full_style );
break;
default:
- FIXME("STM_SETIMAGE: Unhandled type %x\n", wParam);
+ FIXME("STM_SETIMAGE: Unhandled type %lx\n", wParam);
break;
}
STATIC_TryPaintFcn( hwnd, full_style );
@@ -701,7 +706,7 @@
RECT rc;
HBRUSH hBrush;
HFONT hFont, hOldFont = NULL;
- DWORD wFormat;
+ WORD wFormat;
INT len, buf_size;
WCHAR *text;
@@ -732,6 +737,9 @@
default:
return;
}
+
+ if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_RIGHT)
+ wFormat = DT_RIGHT | (wFormat & ~(DT_LEFT | DT_CENTER));
if (style & SS_NOPREFIX)
wFormat |= DT_NOPREFIX;
@@ -753,7 +761,7 @@
}
if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET )))
- hOldFont = (HFONT)SelectObject( hdc, hFont );
+ hOldFont = SelectObject( hdc, hFont );
/* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned
brush is not used */
@@ -899,7 +907,7 @@
if (brush.lbStyle == BS_SOLID)
SetBkColor(hdc, brush.lbColor);
}
- GetClientRect(hwnd, &rcClient);
+ GetClientRect(hwnd, &rcClient);
if (style & SS_CENTERIMAGE)
{
INT x, y;
@@ -917,12 +925,6 @@
}
SelectObject(hMemDC, oldbitmap);
DeleteDC(hMemDC);
- }
- else
- {
- RECT rcClient;
- GetClientRect( hwnd, &rcClient );
- FillRect( hdc, &rcClient, hbrush );
}
}
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] Sat Jun 6 12:50:05 2009
@@ -221,13 +221,13 @@
reactos/dll/win32/snmpapi/main.c # Synced at 20090222
User32 -
- reactos/dll/win32/user32/controls/button.c # Synced to Wine-1_1_13
+ 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_13
reactos/dll/win32/user32/controls/edit.c # Synced to Wine-1_1_13
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_13
reactos/dll/win32/user32/controls/scrollbar.c # Forked
- reactos/dll/win32/user32/controls/static.c # Synced at 20071024
+ reactos/dll/win32/user32/controls/static.c # Synced to Wine-1_1_22
reactos/dll/win32/user32/misc/dde.c # Synced to wine 1.1.17 (dde_misc.c)
reactos/dll/win32/user32/misc/ddeclient.c # Synced to wine 1.1.17