reactos/dll/win32/comctl32/comctl32_ros.diff
Amine Khaldi 527f2f9057 [SHELL/EXPERIMENTS]
* Create a branch for some evul shell experiments.

svn path=/branches/shell-experiments/; revision=61927
2014-02-02 19:37:27 +00:00

731 lines
25 KiB
Diff

diff -prudN e:\Wine\dlls\comctl32/comctl32.spec e:\reactos\dll\win32\comctl32/comctl32.spec
--- e:\Wine\dlls\comctl32/comctl32.spec 2011-09-16 23:22:35.964767000 +0100
+++ e:\reactos\dll\win32\comctl32/comctl32.spec 2012-06-04 11:26:55.545450700 +0100
@@ -15,7 +15,7 @@
11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
#12 stub Cctl1632_ThunkData32
13 stdcall MakeDragList(long)
- 14 stdcall LBItemFromPt(long int64 long)
+ 14 stdcall LBItemFromPt(long double long) #(long int64 long)
15 stdcall DrawInsert(long long long)
16 stdcall CreateUpDownControl(long long long long long long long long long long long long)
17 stdcall InitCommonControls()
@@ -30,8 +30,8 @@
155 stdcall -noname FindMRUStringA(long str ptr)
156 stdcall -noname DelMRUString(long long)
157 stdcall -noname CreateMRUListLazyA(ptr long long long)
-163 stub -noname CreatePage
-164 stub -noname CreateProxyPage
+163 stdcall -noname CreatePage(long ptr)
+164 stdcall -noname CreateProxyPage(long long)
167 stdcall -noname AddMRUData(long ptr long)
169 stdcall -noname FindMRUData(long ptr long ptr)
233 stdcall -noname Str_GetPtrA(str str long)
@@ -88,13 +88,13 @@
376 stdcall -noname IntlStrEqWorkerA(long str str long)
377 stdcall -noname IntlStrEqWorkerW(long wstr wstr long)
382 stdcall -noname SmoothScrollWindow(ptr)
-383 stub -noname DoReaderMode
+383 stdcall -noname DoReaderMode(ptr)
384 stdcall -noname SetPathWordBreakProc(ptr long)
385 stdcall -ordinal DPA_EnumCallback(long long long)
386 stdcall -ordinal DPA_DestroyCallback(ptr ptr long)
387 stdcall -ordinal DSA_EnumCallback(ptr ptr long)
388 stdcall -ordinal DSA_DestroyCallback(ptr ptr long)
-389 stub -noname SHGetProcessDword
+389 stdcall -noname SHGetProcessDword(long long)
390 stdcall -noname ImageList_SetColorTable(ptr long long ptr)
400 stdcall -ordinal CreateMRUListW(ptr)
401 stdcall -ordinal AddMRUStringW(long wstr)
@@ -188,6 +188,7 @@
@ stdcall PropertySheet(ptr) PropertySheetA
@ stdcall PropertySheetA(ptr)
@ stdcall PropertySheetW(ptr)
+@ stdcall RegisterClassNameW(wstr)
@ stdcall TaskDialogIndirect(ptr ptr ptr ptr)
@ stdcall UninitializeFlatSB(long)
@ stdcall _TrackMouseEvent(ptr)
diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commctrl.c
--- e:\Wine\dlls\comctl32/commctrl.c 2011-11-24 17:55:01.900415100 +0100
+++ e:\reactos\dll\win32\comctl32/commctrl.c 2013-01-25 14:12:39.829654200 +0100
@@ -52,25 +52,42 @@
* -- ICC_WIN95_CLASSES
*/
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
+//#include <string.h>
+//#include <stdlib.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "commctrl.h"
-#include "winerror.h"
-#include "winreg.h"
+#include <windef.h>
+#include <winbase.h>
+//#include "wingdi.h"
+//#include "winuser.h"
+#include <winnls.h>
+//#include "commctrl.h"
+//#include "winerror.h"
+#include <winreg.h>
#define NO_SHLWAPI_STREAM
-#include "shlwapi.h"
+#include <shlwapi.h>
#include "comctl32.h"
-#include "wine/debug.h"
+#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
+#define NAME L"microsoft.windows.common-controls"
+#define VERSION L"6.0.2600.2982"
+#define PUBLIC_KEY L"6595b64144ccf1df"
+
+#ifdef __i386__
+#define ARCH L"x86"
+#elif defined __x86_64__
+#define ARCH L"amd64"
+#else
+#define ARCH L"none"
+#endif
+
+static const WCHAR manifest_filename[] = ARCH L"_" NAME L"_" PUBLIC_KEY L"_" VERSION L"_none_deadbeef.manifest";
static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
@@ -92,6 +109,67 @@ static const WCHAR strCC32SubclassInfo[]
'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0
};
+static BOOL create_manifest(BOOL install)
+{
+ WCHAR *pwszBuf;
+ HRSRC hResInfo;
+ HGLOBAL hResData;
+ PVOID pManifest;
+ DWORD cchBuf, cbManifest, cbWritten;
+ HANDLE hFile;
+ BOOL bRet = FALSE;
+
+ hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFEST", RT_MANIFEST);
+ if (!hResInfo)
+ return FALSE;
+
+ cbManifest = SizeofResource(COMCTL32_hModule, hResInfo);
+ if (!cbManifest)
+ return FALSE;
+
+ hResData = LoadResource(COMCTL32_hModule, hResInfo);
+ if (!hResData)
+ return FALSE;
+
+ pManifest = LockResource(hResData);
+ if (!pManifest)
+ return FALSE;
+
+ cchBuf = GetWindowsDirectoryW(NULL, 0) * sizeof(WCHAR) + sizeof(L"\\winsxs\\manifests\\") + sizeof(manifest_filename);
+ pwszBuf = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, cchBuf * sizeof(WCHAR));
+ if (!pwszBuf)
+ return FALSE;
+
+ GetWindowsDirectoryW(pwszBuf, cchBuf);
+ lstrcatW(pwszBuf, L"\\winsxs");
+ CreateDirectoryW(pwszBuf, NULL);
+ lstrcatW(pwszBuf, L"\\manifests\\");
+ CreateDirectoryW(pwszBuf, NULL);
+ lstrcatW(pwszBuf, manifest_filename);
+ if (install)
+ {
+ hFile = CreateFileW(pwszBuf, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ if (WriteFile(hFile, pManifest, cbManifest, &cbWritten, NULL) && cbWritten == cbManifest)
+ bRet = TRUE;
+
+ CloseHandle(hFile);
+
+ if (!bRet)
+ DeleteFileW(pwszBuf);
+ else
+ TRACE("created %s\n", debugstr_w(pwszBuf));
+ }
+ }
+ else
+ bRet = DeleteFileW(pwszBuf);
+
+ HeapFree(GetProcessHeap(), 0, pwszBuf);
+
+ return bRet;
+}
+
/***********************************************************************
* DllMain [Internal]
@@ -930,6 +1008,12 @@ HRESULT WINAPI DllGetVersion (DLLVERSION
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
{
TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
+ if (!create_manifest(bInstall))
+ {
+ ERR("create_manifest failed!\n");
+ return HRESULT_FROM_WIN32(GetLastError());
+ }
+
return S_OK;
}
@@ -1593,12 +1677,114 @@ LRESULT WINAPI SetPathWordBreakProc(HWND
*
* Draw text with shadow.
*/
-int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD dwFlags,
+int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags,
COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
{
- FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags,
- crText, crShadow, ixOffset, iyOffset);
- return DrawTextW(hdc, pszText, cch, rect, DT_LEFT);
+ COLORREF crOldText;
+ RECT rcText;
+ INT iRet, x, y, x2, y2;
+ BYTE *pBits;
+ HBITMAP hbm, hbmOld;
+ BITMAPINFO bi;
+ HDC hdcMem;
+ HFONT hOldFont;
+ BLENDFUNCTION bf;
+
+ /* Create 32 bit DIB section for the shadow */
+ ZeroMemory(&bi, sizeof(bi));
+ bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
+ bi.bmiHeader.biWidth = prc->right - prc->left + 4;
+ bi.bmiHeader.biHeight = prc->bottom - prc->top + 5; // bottom-up DIB
+ bi.bmiHeader.biPlanes = 1;
+ bi.bmiHeader.biBitCount = 32;
+ bi.bmiHeader.biCompression = BI_RGB;
+ hbm = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (PVOID*)&pBits, NULL, 0);
+ if(!hbm)
+ {
+ ERR("CreateDIBSection failed\n");
+ return 0;
+ }
+
+ /* Create memory device context for new DIB section and select it */
+ hdcMem = CreateCompatibleDC(hdc);
+ if(!hdcMem)
+ {
+ ERR("CreateCompatibleDC failed\n");
+ DeleteObject(hbm);
+ return 0;
+ }
+
+ hbmOld = (HBITMAP)SelectObject(hdcMem, hbm);
+
+ /* Draw text on our helper bitmap */
+ hOldFont = (HFONT)SelectObject(hdcMem, GetCurrentObject(hdc, OBJ_FONT));
+ SetTextColor(hdcMem, RGB(16, 16, 16));
+ SetBkColor(hdcMem, RGB(0, 0, 0));
+ SetBkMode(hdcMem, TRANSPARENT);
+ SetRect(&rcText, 0, 0, prc->right - prc->left, prc->bottom - prc->top);
+ DrawTextW(hdcMem, pszText, cch, &rcText, dwFlags);
+ SelectObject(hdcMem, hOldFont);
+
+ /* Flush GDI so data pointed by pBits is valid */
+ GdiFlush();
+
+ /* Set alpha of pixels (forget about colors for now. They will be changed in next loop).
+ We copy text image 4*5 times and each time alpha is added */
+ for (x = 0; x < bi.bmiHeader.biWidth; ++x)
+ for (y = 0; y < bi.bmiHeader.biHeight; ++y)
+ {
+ BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
+ UINT Alpha = 0;
+
+ for (x2 = x - 4 + 1; x2 <= x; ++x2)
+ for (y2 = y; y2 < y + 5; ++y2)
+ {
+ if (x2 >= 0 && x2 < bi.bmiHeader.biWidth && y2 >= 0 && y2 < bi.bmiHeader.biHeight)
+ {
+ BYTE *pSrc = &pBits[(y2 * bi.bmiHeader.biWidth + x2) * 4];
+ Alpha += pSrc[0];
+ }
+ }
+
+ if (Alpha > 255)
+ Alpha = 255;
+ pDest[3] = Alpha;
+ }
+
+ /* Now set the color of each pixel to shadow color * alpha (see GdiAlphaBlend) */
+ for (x = 0; x < bi.bmiHeader.biWidth; ++x)
+ for (y = 0; y < bi.bmiHeader.biHeight; ++y)
+ {
+ BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
+ pDest[0] = GetBValue(crShadow) * pDest[3] / 255;
+ pDest[1] = GetGValue(crShadow) * pDest[3] / 255;
+ pDest[2] = GetRValue(crShadow) * pDest[3] / 255;
+ }
+
+ /* Fix ixOffset of the shadow (tested on Win) */
+ ixOffset -= 3;
+ iyOffset -= 3;
+
+ /* Alpha blend helper image to destination DC */
+ bf.BlendOp = AC_SRC_OVER;
+ bf.BlendFlags = 0;
+ bf.SourceConstantAlpha = 255;
+ bf.AlphaFormat = AC_SRC_ALPHA;
+ if (!GdiAlphaBlend(hdc, prc->left + ixOffset, prc->top + iyOffset, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, hdcMem, 0, 0, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, bf))
+ ERR("GdiAlphaBlend failed: %lu\n", GetLastError());
+
+ /* Delete the helper bitmap */
+ SelectObject(hdcMem, hbmOld);
+ DeleteObject(hbm);
+ DeleteDC(hdcMem);
+
+ /* Finally draw the text over shadow */
+ crOldText = SetTextColor(hdc, crText);
+ SetBkMode(hdc, TRANSPARENT);
+ iRet = DrawTextW(hdc, pszText, cch, prc, dwFlags);
+ SetTextColor(hdc, crOldText);
+
+ return iRet;
}
/***********************************************************************
@@ -1639,3 +1825,15 @@ HRESULT WINAPI TaskDialogIndirect(const
if (pfVerificationFlagChecked) *pfVerificationFlagChecked = TRUE;
return S_OK;
}
+
+/***********************************************************************
+ * RegisterClassNameW [COMCTL32.@]
+ *
+ * Register window class again while using as SxS module.
+ */
+BOOLEAN WINAPI RegisterClassNameW(LPCWSTR className)
+{
+ /* FIXME: actually register redirected user32 class,
+ comctl32 classes are registered by this module anyway */
+ return TRUE;
+}
diff -prudN e:\Wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listview.c
--- e:\Wine\dlls\comctl32/listview.c 2013-03-16 11:54:52.374454400 +0100
+++ e:\reactos\dll\win32\comctl32/listview.c 2013-03-17 19:12:46.522399200 +0100
@@ -314,6 +314,7 @@ typedef struct tagLISTVIEW_INFO
COLORREF clrBk;
COLORREF clrText;
COLORREF clrTextBk;
+ BOOL bDefaultBkColor;
/* font */
HFONT hDefaultFont;
@@ -1700,8 +1701,19 @@ static inline BOOL LISTVIEW_GetItemW(con
/* used to handle collapse main item column case */
static inline BOOL LISTVIEW_DrawFocusRect(const LISTVIEW_INFO *infoPtr, HDC hdc)
{
- return (infoPtr->rcFocus.left < infoPtr->rcFocus.right) ?
- DrawFocusRect(hdc, &infoPtr->rcFocus) : FALSE;
+ BOOL Ret = FALSE;
+
+ if (infoPtr->rcFocus.left < infoPtr->rcFocus.right)
+ {
+ DWORD dwOldBkColor, dwOldTextColor;
+
+ dwOldBkColor = SetBkColor(hdc, RGB(255, 255, 255));
+ dwOldTextColor = SetBkColor(hdc, RGB(0, 0, 0));
+ Ret = DrawFocusRect(hdc, &infoPtr->rcFocus);
+ SetBkColor(hdc, dwOldBkColor);
+ SetBkColor(hdc, dwOldTextColor);
+ }
+ return Ret;
}
/* Listview invalidation functions: use _only_ these functions to invalidate */
@@ -4734,7 +4746,10 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_I
if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES)
rcLabel.bottom--;
- DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);
+ if ((!(lvItem.state & LVIS_SELECTED) || !infoPtr->bFocus) && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT))
+ DrawShadowText(hdc, lvItem.pszText, -1, &rcLabel, uFormat, RGB(255, 255, 255), RGB(0, 0, 0), 2, 2);
+ else
+ DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);
postpaint:
if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT)
@@ -5143,7 +5158,11 @@ enddraw:
/* Draw marquee rectangle if appropriate */
if (infoPtr->bMarqueeSelect)
+ {
+ SetBkColor(hdc, RGB(255, 255, 255));
+ SetTextColor(hdc, RGB(0, 0, 0));
DrawFocusRect(hdc, &infoPtr->marqueeDrawRect);
+ }
if (cdmode & CDRF_NOTIFYPOSTPAINT)
notify_postpaint(infoPtr, &nmlvcd);
@@ -7952,6 +7971,7 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW
{
TRACE("(color=%x)\n", color);
+ infoPtr->bDefaultBkColor = FALSE;
if(infoPtr->clrBk != color) {
if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
infoPtr->clrBk = color;
@@ -9362,6 +9382,7 @@ static LRESULT LISTVIEW_NCCreate(HWND hw
infoPtr->clrText = CLR_DEFAULT;
infoPtr->clrTextBk = CLR_DEFAULT;
LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
+ infoPtr->bDefaultBkColor = TRUE;
/* set default values */
infoPtr->nFocusedItem = -1;
@@ -11644,6 +11665,12 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
+ if (infoPtr->bDefaultBkColor)
+ {
+ LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
+ infoPtr->bDefaultBkColor = TRUE;
+ LISTVIEW_InvalidateList(infoPtr);
+ }
return 0;
/* case WM_TIMER: */
diff -prudN e:\Wine\dlls\comctl32/propsheet.c e:\reactos\dll\win32\comctl32/propsheet.c
--- e:\Wine\dlls\comctl32/propsheet.c 2013-03-02 14:17:59.122793000 +0100
+++ e:\reactos\dll\win32\comctl32/propsheet.c 2013-03-16 12:21:47.383897000 +0100
@@ -2430,6 +2430,9 @@ static void PROPSHEET_SetWizButtons(HWND
HWND hwndBack = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
+ HWND hwndCancel = GetDlgItem(hwndDlg, IDCANCEL);
+ INT iDefItem = 0;
+ HWND hwndFocus;
TRACE("%d\n", dwFlags);
@@ -2437,17 +2440,6 @@ static void PROPSHEET_SetWizButtons(HWND
EnableWindow(hwndNext, FALSE);
EnableWindow(hwndFinish, FALSE);
- /* set the default pushbutton to an enabled button */
- if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
- else if (dwFlags & PSWIZB_NEXT)
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
- else if (dwFlags & PSWIZB_BACK)
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
- else
- SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
-
-
if (dwFlags & PSWIZB_BACK)
EnableWindow(hwndBack, TRUE);
@@ -2477,6 +2469,22 @@ static void PROPSHEET_SetWizButtons(HWND
}
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
EnableWindow(hwndFinish, TRUE);
+
+ /* set the default pushbutton to an enabled button */
+ if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
+ iDefItem = IDC_FINISH_BUTTON;
+ else if (dwFlags & PSWIZB_NEXT)
+ iDefItem = IDC_NEXT_BUTTON;
+ else if (dwFlags & PSWIZB_BACK)
+ iDefItem = IDC_BACK_BUTTON;
+ else
+ iDefItem = IDCANCEL;
+ SendMessageW(hwndDlg, DM_SETDEFID, iDefItem, 0);
+
+ /* Set focus if no control has it */
+ hwndFocus = GetFocus();
+ if (!hwndFocus || hwndFocus == hwndCancel)
+ SetFocus(GetDlgItem(hwndDlg, iDefItem));
}
/******************************************************************************
diff -prudN e:\Wine\dlls\comctl32/rebar.c e:\reactos\dll\win32\comctl32/rebar.c
--- e:\Wine\dlls\comctl32/rebar.c 2013-03-02 14:17:59.125795000 +0100
+++ e:\reactos\dll\win32\comctl32/rebar.c 2013-09-02 13:40:15.983276500 +0100
@@ -51,7 +51,6 @@
* - WM_QUERYNEWPALETTE
* - WM_RBUTTONDOWN
* - WM_RBUTTONUP
- * - WM_SYSCOLORCHANGE
* - WM_VKEYTOITEM
* - WM_WININICHANGE
* Notifications:
@@ -2544,10 +2543,8 @@ REBAR_InsertBandT(REBAR_INFO *infoPtr, I
/* initialize band */
memset(lpBand, 0, sizeof(*lpBand));
- lpBand->clrFore = infoPtr->clrText == CLR_NONE ? infoPtr->clrBtnText :
- infoPtr->clrText;
- lpBand->clrBack = infoPtr->clrBk == CLR_NONE ? infoPtr->clrBtnFace :
- infoPtr->clrBk;
+ lpBand->clrFore = infoPtr->clrText;
+ lpBand->clrBack = infoPtr->clrBk;
lpBand->iImage = -1;
REBAR_CommonSetupBand(infoPtr->hwndSelf, lprbbi, lpBand);
@@ -2927,12 +2924,20 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT
static LRESULT
-REBAR_SizeToRect (REBAR_INFO *infoPtr, const RECT *lpRect)
+REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM flags, RECT *lpRect)
{
if (!lpRect) return FALSE;
TRACE("[%s]\n", wine_dbgstr_rect(lpRect));
REBAR_SizeToHeight(infoPtr, get_rect_cy(infoPtr, lpRect));
+
+ /* Note that this undocumented flag is available on comctl32 v6 or later */
+ if ((flags & RBSTR_CHANGERECT) != 0)
+ {
+ RECT rcRebar;
+ GetClientRect(infoPtr->hwndSelf, &rcRebar);
+ lpRect->bottom = lpRect->top + (rcRebar.bottom - rcRebar.top);
+ }
return TRUE;
}
@@ -3713,7 +3718,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg,
return REBAR_ShowBand (infoPtr, wParam, lParam);
case RB_SIZETORECT:
- return REBAR_SizeToRect (infoPtr, (LPCRECT)lParam);
+ return REBAR_SizeToRect (infoPtr, wParam, (LPRECT)lParam);
/* Messages passed to parent */
@@ -3797,6 +3802,8 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg,
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
+ infoPtr->clrBtnText = comctl32_color.clrBtnText;
+ infoPtr->clrBtnFace = comctl32_color.clrBtnFace;
return 0;
/* case WM_VKEYTOITEM: supported according to ControlSpy */
--- e:\Wine\dlls\comctl32/tests/v6util.h 2011-09-16 23:22:36.002769200 +0100
+++ e:\reactos\dll\win32\comctl32/tests/v6util.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,142 +0,0 @@
-/*
- * Utility routines for comctl32 v6 tests
- *
- * Copyright 2006 Mike McCormack for CodeWeavers
- * Copyright 2007 George Gov
- * Copyright 2009 Owen Rudge for CodeWeavers
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
-
-#ifdef __i386__
-#define ARCH "x86"
-#elif defined __x86_64__
-#define ARCH "amd64"
-#else
-#define ARCH "none"
-#endif
-
-static const CHAR manifest_name[] = "cc6.manifest";
-
-static const CHAR manifest[] =
- "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
- "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n"
- " <assemblyIdentity\n"
- " type=\"win32\"\n"
- " name=\"Wine.ComCtl32.Tests\"\n"
- " version=\"1.0.0.0\"\n"
- " processorArchitecture=\"" ARCH "\"\n"
- " />\n"
- "<description>Wine comctl32 test suite</description>\n"
- "<dependency>\n"
- " <dependentAssembly>\n"
- " <assemblyIdentity\n"
- " type=\"win32\"\n"
- " name=\"microsoft.windows.common-controls\"\n"
- " version=\"6.0.0.0\"\n"
- " processorArchitecture=\"" ARCH "\"\n"
- " publicKeyToken=\"6595b64144ccf1df\"\n"
- " language=\"*\"\n"
- " />\n"
- "</dependentAssembly>\n"
- "</dependency>\n"
- "</assembly>\n";
-
-static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
-{
- HANDLE hKernel32;
- BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR);
- VOID (WINAPI *pReleaseActCtx)(HANDLE);
-
- hKernel32 = GetModuleHandleA("kernel32.dll");
- pDeactivateActCtx = (void*)GetProcAddress(hKernel32, "DeactivateActCtx");
- pReleaseActCtx = (void*)GetProcAddress(hKernel32, "ReleaseActCtx");
- if (!pDeactivateActCtx || !pReleaseActCtx)
- {
- win_skip("Activation contexts unsupported\n");
- return;
- }
-
- pDeactivateActCtx(0, cookie);
- pReleaseActCtx(hCtx);
-
- DeleteFileA(manifest_name);
-}
-
-static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
-{
- HANDLE hKernel32;
- HANDLE (WINAPI *pCreateActCtxA)(ACTCTXA*);
- BOOL (WINAPI *pActivateActCtx)(HANDLE, ULONG_PTR*);
-
- ACTCTXA ctx;
- BOOL ret;
- HANDLE file;
- DWORD written;
-
- hKernel32 = GetModuleHandleA("kernel32.dll");
- pCreateActCtxA = (void*)GetProcAddress(hKernel32, "CreateActCtxA");
- pActivateActCtx = (void*)GetProcAddress(hKernel32, "ActivateActCtx");
- if (!(pCreateActCtxA && pActivateActCtx))
- {
- win_skip("Activation contexts unsupported. No version 6 tests possible.\n");
- return FALSE;
- }
-
- /* create manifest */
- file = CreateFileA( manifest_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL );
- if (file != INVALID_HANDLE_VALUE)
- {
- ret = (WriteFile( file, manifest, sizeof(manifest)-1, &written, NULL ) &&
- written == sizeof(manifest)-1);
- CloseHandle( file );
- if (!ret)
- {
- DeleteFileA( manifest_name );
- skip("Failed to fill manifest file. Skipping comctl32 V6 tests.\n");
- return FALSE;
- }
- else
- trace("created %s\n", manifest_name);
- }
- else
- {
- skip("Failed to create manifest file. Skipping comctl32 V6 tests.\n");
- return FALSE;
- }
-
- memset(&ctx, 0, sizeof(ctx));
- ctx.cbSize = sizeof(ctx);
- ctx.lpSource = manifest_name;
-
- *hCtx = pCreateActCtxA(&ctx);
- ok(*hCtx != 0, "Expected context handle\n");
-
- ret = pActivateActCtx(*hCtx, pcookie);
- expect(TRUE, ret);
-
- if (!ret)
- {
- win_skip("A problem during context activation occurred.\n");
- DeleteFileA(manifest_name);
- }
-
- return ret;
-}
-
-#undef expect
-#undef ARCH
diff -prudN e:\Wine\dlls\comctl32/tooltips.c e:\reactos\dll\win32\comctl32/tooltips.c
--- e:\Wine\dlls\comctl32/tooltips.c 2013-03-02 14:17:59.178196600 +0100
+++ e:\reactos\dll\win32\comctl32/tooltips.c 2013-03-16 12:24:45.122483600 +0100
@@ -2002,7 +2002,32 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO
static LRESULT
TOOLTIPS_NotifyFormat (TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
- FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", infoPtr->hwndSelf, wParam, lParam);
+ TTTOOL_INFO *toolPtr = infoPtr->tools;
+ LRESULT nResult;
+
+ TRACE("infoPtr=%p wParam=%lx lParam=%p\n", infoPtr, wParam, (PVOID)lParam);
+
+ if (lParam == NF_QUERY) {
+ if (toolPtr->bNotifyUnicode) {
+ return NFR_UNICODE;
+ } else {
+ return NFR_ANSI;
+ }
+ }
+ else if (lParam == NF_REQUERY) {
+ nResult = SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
+ (WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY);
+ if (nResult == NFR_ANSI) {
+ toolPtr->bNotifyUnicode = FALSE;
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
+ } else if (nResult == NFR_UNICODE) {
+ toolPtr->bNotifyUnicode = TRUE;
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
+ } else {
+ TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
+ }
+ return nResult;
+ }
return 0;
}
diff -prudN e:\Wine\dlls\comctl32/treeview.c e:\reactos\dll\win32\comctl32/treeview.c
--- e:\Wine\dlls\comctl32/treeview.c 2013-03-02 14:17:59.181198600 +0100
+++ e:\reactos\dll\win32\comctl32/treeview.c 2013-03-16 12:26:03.285023200 +0100
@@ -2921,7 +2921,12 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr,
}
}
- TREEVIEW_UpdateScrollBars(infoPtr);
+ //
+ // This is correct, but is causes and infinite loop of WM_PAINT messages, resulting
+ // in continuous painting of the scroll bar in reactos. Comment out until the real
+ // bug is found
+ //
+ //TREEVIEW_UpdateScrollBars(infoPtr);
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
infoPtr->cdmode =