IS_ATOM(lpszClass) ? lpszClass : 0,
lpwcx);
- //HACKHACK: This is ROS-specific and should go away
- lpwcx->cbSize = sizeof(*lpwcx);
+ if (!lpwcx)
+ {
+ SetLastError( ERROR_NOACCESS );
+ return FALSE;
+ }
if (hInstance == User32Instance)
{
IS_ATOM(lpszClass) ? lpszClass : 0,
lpwcx);
- //HACKHACK: This is ROS-specific and should go away
- lpwcx->cbSize = sizeof(*lpwcx);
+ /* From wine, for speed only, ReactOS supports the correct return in
+ * Win32k. cbSize is ignored.
+ */
+ if (!lpwcx)
+ {
+ SetLastError( ERROR_NOACCESS );
+ return FALSE;
+ }
if (hInstance == User32Instance)
{
}
return Ret;
}
- // Wine Class tests:
+ // Wine Class tests:
/* Edit controls are special - they return a wndproc handle when
GetWindowLongPtr is called with a different A/W.
On the other hand there is no W->A->W conversion so this control
int SmallIconWidth;
int SmallIconHeight;
BITMAP StdBitmapInfo;
- HDC hInfoDc = NULL;
HDC hSourceDc = NULL;
HDC hDestDc = NULL;
ICONINFO SmallInfo;
return StdIcon;
}
- /* Get a handle to a info DC and handles to DCs which can be used to
- select a bitmap into. This is done to avoid triggering a switch to
- graphics mode (if we're currently in text/blue screen mode) */
- hInfoDc = CreateICW(NULL, NULL, NULL, NULL);
- if (NULL == hInfoDc)
- {
- ERR("Failed to create info DC\n");
- goto cleanup;
- }
hSourceDc = CreateCompatibleDC(NULL);
if (NULL == hSourceDc)
{
ERR("Failed to select source color bitmap\n");
goto cleanup;
}
- SmallInfo.hbmColor = CreateCompatibleBitmap(hInfoDc, SmallIconWidth,
+ SmallInfo.hbmColor = CreateCompatibleBitmap(hSourceDc, SmallIconWidth,
SmallIconHeight);
if (NULL == SmallInfo.hbmColor)
{
ERR("Failed to select source mask bitmap\n");
goto cleanup;
}
- SmallInfo.hbmMask = CreateBitmap(SmallIconWidth, SmallIconHeight, 1, 1,
- NULL);
+ SmallInfo.hbmMask = CreateCompatibleBitmap(hSourceDc, SmallIconWidth, SmallIconHeight);
if (NULL == SmallInfo.hbmMask)
{
ERR("Failed to create mask bitmap\n");
{
DeleteDC(hSourceDc);
}
- if (NULL != hInfoDc)
- {
- DeleteDC(hInfoDc);
- }
return SmallIcon;
}
clsMenuName.pszClientAnsiMenuName = AnsiMenuName.Buffer;
clsMenuName.pwszClientUnicodeMenuName = MenuName.Buffer;
clsMenuName.pusMenuName = &MenuName;
-
+
Atom = NtUserRegisterClassExWOW( &WndClass,
- &ClassName,
+ &ClassName,
NULL, //PUNICODE_STRING ClsNVersion,
&clsMenuName,
fnID,