mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[WIN32K]
- remove a comment which is not true anymore [USER32] - Create a bitmap which is compatible with the bitmap'we are copying in CreateSmallIcon Icons are back in taskbar svn path=/branches/reactos-yarotows/; revision=47143
This commit is contained in:
parent
c3f13756b2
commit
38a2853dc1
2 changed files with 5 additions and 33 deletions
|
@ -289,7 +289,7 @@ IntGetWndProc(PWND pWnd, BOOL Ansi)
|
|||
}
|
||||
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
|
||||
|
@ -809,7 +809,6 @@ CreateSmallIcon(HICON StdIcon)
|
|||
int SmallIconWidth;
|
||||
int SmallIconHeight;
|
||||
BITMAP StdBitmapInfo;
|
||||
HDC hInfoDc = NULL;
|
||||
HDC hSourceDc = NULL;
|
||||
HDC hDestDc = NULL;
|
||||
ICONINFO SmallInfo;
|
||||
|
@ -845,15 +844,6 @@ CreateSmallIcon(HICON StdIcon)
|
|||
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)
|
||||
{
|
||||
|
@ -873,7 +863,7 @@ CreateSmallIcon(HICON StdIcon)
|
|||
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)
|
||||
{
|
||||
|
@ -899,8 +889,7 @@ CreateSmallIcon(HICON StdIcon)
|
|||
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");
|
||||
|
@ -954,10 +943,6 @@ cleanup:
|
|||
{
|
||||
DeleteDC(hSourceDc);
|
||||
}
|
||||
if (NULL != hInfoDc)
|
||||
{
|
||||
DeleteDC(hInfoDc);
|
||||
}
|
||||
|
||||
return SmallIcon;
|
||||
}
|
||||
|
@ -1048,9 +1033,9 @@ RegisterClassExWOWW(WNDCLASSEXW *lpwcx,
|
|||
clsMenuName.pszClientAnsiMenuName = AnsiMenuName.Buffer;
|
||||
clsMenuName.pwszClientUnicodeMenuName = MenuName.Buffer;
|
||||
clsMenuName.pusMenuName = &MenuName;
|
||||
|
||||
|
||||
Atom = NtUserRegisterClassExWOW( &WndClass,
|
||||
&ClassName,
|
||||
&ClassName,
|
||||
NULL, //PUNICODE_STRING ClsNVersion,
|
||||
&clsMenuName,
|
||||
fnID,
|
||||
|
|
|
@ -166,19 +166,6 @@ IntCreateCompatibleBitmap(
|
|||
{
|
||||
if (Count == sizeof(BITMAP))
|
||||
{
|
||||
/* We have a bitmap bug!!! W/O the HACK, we have white icons.
|
||||
|
||||
MSDN Note: When a memory device context is created, it initially
|
||||
has a 1-by-1 monochrome bitmap selected into it. If this memory
|
||||
device context is used in CreateCompatibleBitmap, the bitmap that
|
||||
is created is a monochrome bitmap. To create a color bitmap, use
|
||||
the hDC that was used to create the memory device context, as
|
||||
shown in the following code:
|
||||
|
||||
HDC memDC = CreateCompatibleDC(hDC);
|
||||
HBITMAP memBM = CreateCompatibleBitmap(hDC, nWidth, nHeight);
|
||||
SelectObject(memDC, memBM);
|
||||
*/
|
||||
Bmp = IntGdiCreateBitmap(abs(Width),
|
||||
abs(Height),
|
||||
dibs.dsBm.bmPlanes,
|
||||
|
|
Loading…
Reference in a new issue