Author: fireball
Date: Wed Jun 21 18:16:50 2006
New Revision: 22459
URL:
http://svn.reactos.ru/svn/reactos?rev=22459&view=rev
Log:
- Sync user32/buttons.c with Wine
- Update wine-syncs doc
Modified:
trunk/reactos/dll/win32/user32/controls/button.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/user32/controls/button.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/user32/controls/b…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/button.c (original)
+++ trunk/reactos/dll/win32/user32/controls/button.c Wed Jun 21 18:16:50 2006
@@ -16,16 +16,61 @@
*
* 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
+ *
+ * This code was audited for completeness against the documented features
+ * of Comctl32.dll version 6.0 on Oct. 3, 2004, by Dimitrie O. Paun.
+ *
+ * Unless otherwise noted, we believe this code to be complete, as per
+ * the specification mentioned above.
+ * If you discover missing features, or bugs, please note them below.
+ *
+ * TODO
+ * Styles
+ * - BS_NOTIFY: is it complete?
+ * - BS_RIGHTBUTTON: same as BS_LEFTTEXT
+ * - BS_TYPEMASK
+ *
+ * Messages
+ * - WM_CHAR: Checks a (manual or automatic) check box on '+' or '=',
clears it on '-' key.
+ * - WM_SETFOCUS: For (manual or automatic) radio buttons, send the parent window
BN_CLICKED
+ * - WM_NCCREATE: Turns any BS_OWNERDRAW button into a BS_PUSHBUTTON button.
+ * - WM_SYSKEYUP
+ * - BCM_GETIDEALSIZE
+ * - BCM_GETIMAGELIST
+ * - BCM_GETTEXTMARGIN
+ * - BCM_SETIMAGELIST
+ * - BCM_SETTEXTMARGIN
+ *
+ * Notifications
+ * - BCN_HOTITEMCHANGE
+ * - BN_DISABLE
+ * - BN_PUSHED/BN_HILITE
+ * + BN_KILLFOCUS: is it OK?
+ * - BN_PAINT
+ * + BN_SETFOCUS: is it OK?
+ * - BN_UNPUSHED/BN_UNHILITE
+ * - NM_CUSTOMDRAW
+ *
+ * Structures/Macros/Definitions
+ * - BUTTON_IMAGELIST
+ * - NMBCHOTITEM
+ * - Button_GetIdealSize
+ * - Button_GetImageList
+ * - Button_GetTextMargin
+ * - Button_SetImageList
+ * - Button_SetTextMargin
+ */
+#define NDEBUG // turn off TRACEs
#include <user32.h>
/* GetWindowLong offsets for window extra information */
#define STATE_GWL_OFFSET 0
#define HFONT_GWL_OFFSET (sizeof(LONG))
-#define HIMAGE_GWL_OFFSET (HFONT_GWL_OFFSET*sizeof(LONG))
-#define NB_EXTRA_BYTES (HIMAGE_GWL_OFFSET*sizeof(LONG))
+#define HIMAGE_GWL_OFFSET (HFONT_GWL_OFFSET+sizeof(HFONT))
+#define NB_EXTRA_BYTES (HIMAGE_GWL_OFFSET+sizeof(HANDLE))
/* Button state values */
#define BUTTON_UNCHECKED 0x00
@@ -139,7 +184,7 @@
__inline static void set_button_font( HWND hwnd, HFONT font )
{
- SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, (LONG)font );
+ SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, (LONG_PTR)font );
}
__inline static UINT get_button_type( LONG window_style )
@@ -308,6 +353,7 @@
break;
case WM_CAPTURECHANGED:
+ TRACE("WM_CAPTURECHANGED %p\n", hWnd);
state = get_button_state( hWnd );
if (state & BUTTON_BTNPRESSED)
{
@@ -367,6 +413,7 @@
return (LRESULT)get_button_font( hWnd );
case WM_SETFOCUS:
+ TRACE("WM_SETFOCUS %p\n",hWnd);
set_button_state( hWnd, get_button_state(hWnd) | BUTTON_HASFOCUS );
paint_button( hWnd, btn_type, ODA_FOCUS );
if (style & BS_NOTIFY)
@@ -374,6 +421,7 @@
break;
case WM_KILLFOCUS:
+ TRACE("WM_KILLFOCUS %p\n",hWnd);
state = get_button_state( hWnd );
set_button_state( hWnd, state & ~BUTTON_HASFOCUS );
paint_button( hWnd, btn_type, ODA_FOCUS );
@@ -818,7 +866,6 @@
SelectObject( hDC, hOldBrush );
SetBkMode(hDC, oldBkMode);
}
-
/**********************************************************************
* Check Box & Radio Button Functions
@@ -1053,6 +1100,7 @@
DrawFocusRect( hDC, &rc );
}
+
/**********************************************************************
* Ownerdrawn Button Functions
*/
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=2…
==============================================================================
--- trunk/reactos/media/doc/README.WINE (original)
+++ trunk/reactos/media/doc/README.WINE Wed Jun 21 18:16:50 2006
@@ -114,7 +114,7 @@
reactos/dll/win32/msvcrt/wine/*.c # Out of sync
User32 -
- reactos/dll/win32/user32/controls/button.c # Out of sync
+ reactos/dll/win32/user32/controls/button.c # Synced at 20060621
reactos/dll/win32/user32/controls/edit.c # Out of sync
reactos/dll/win32/user32/controls/static.c # Out of sync
reactos/dll/win32/user32/misc/wsprintf.c # Out of sync