Audit the static control code
Dimitrie O. Paun
dpaun at rogers.com
Mon Oct 4 22:10:44 CDT 2004
ChangeLog
Audit the static control code.
Change [GS]etWindowLong{,Ptr}A to [GS]etWindowLong{,Ptr}W.
Index: dlls/user/static.c
===================================================================
RCS file: /var/cvs/wine/dlls/user/static.c,v
retrieving revision 1.1
diff -u -r1.1 static.c
--- dlls/user/static.c 31 Aug 2004 01:10:08 -0000 1.1
+++ dlls/user/static.c 5 Oct 2004 03:08:33 -0000
@@ -16,6 +16,35 @@
* 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
+ *
+ * NOTES
+ *
+ * This code was audited for completeness against the documented features
+ * of Comctl32.dll version 6.0 on Oct. 4, 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
+ * - SS_CENTERIMAGE
+ * - SS_EDITCONTROL
+ * - SS_ENDELLIPSIS
+ * - SS_ENHMETAFILE
+ * - SS_PATHELLIPSIS
+ * - SS_REALSIZECONTROL
+ * - SS_REALSIZEIMAGE
+ * - SS_RIGHTJUST
+ * - SS_WORDELLIPSIS
+ *
+ * Notifications
+ * - STN_DISABLE
+ * - STN_ENABLE
+ *
+ * Messages
+ * - STM_SETIMAGE: IMAGE_CURSOR, IMAGE_ENHMETAFILE
*/
#include <stdarg.h>
@@ -68,7 +97,7 @@
STATIC_PaintOwnerDrawfn, /* SS_OWNERDRAW */
STATIC_PaintBitmapfn, /* SS_BITMAP */
NULL, /* SS_ENHMETAFILE */
- STATIC_PaintEtchedfn, /* SS_ETCHEDHORIZ */
+ STATIC_PaintEtchedfn, /* SS_ETCHEDHORZ */
STATIC_PaintEtchedfn, /* SS_ETCHEDVERT */
STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */
};
@@ -128,7 +157,7 @@
ERR("huh? hBitmap!=0, but not bitmap\n");
return 0;
}
- hOldBitmap = (HBITMAP)SetWindowLongPtrA( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
+ hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
if (hBitmap)
{
BITMAP bm;
@@ -220,7 +249,7 @@
LPARAM lParam, BOOL unicode )
{
LRESULT lResult = 0;
- LONG full_style = GetWindowLongA( hwnd, GWL_STYLE );
+ LONG full_style = GetWindowLongW( hwnd, GWL_STYLE );
LONG style = full_style & SS_TYPEMASK;
switch (uMsg)
@@ -275,8 +304,8 @@
case WM_NCCREATE:
if (full_style & SS_SUNKEN)
- SetWindowLongA( hwnd, GWL_EXSTYLE,
- GetWindowLongA( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE );
+ SetWindowLongW( hwnd, GWL_EXSTYLE,
+ GetWindowLongW( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE );
if(unicode)
lParam = (LPARAM)(((LPCREATESTRUCTW)lParam)->lpszName);
@@ -379,6 +408,12 @@
case IMAGE_BITMAP:
lResult = (LRESULT)STATIC_SetBitmap( hwnd, (HBITMAP)lParam, style );
break;
+ case IMAGE_CURSOR:
+ FIXME("STM_SETIMAGE: Unhandled type IMAGE_CURSOR\n");
+ break;
+ case IMAGE_ENHMETAFILE:
+ FIXME("STM_SETIMAGE: Unhandled type IMAGE_ENHMETAFILE\n");
+ break;
case IMAGE_ICON:
lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)lParam, style );
break;
More information about the wine-patches
mailing list