mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:15:58 +00:00
[COMCTL32]
* Sync with Wine 1.7.17. CORE-8080 svn path=/trunk/; revision=62879
This commit is contained in:
parent
908e5a4898
commit
9bf892c309
19 changed files with 361 additions and 418 deletions
|
@ -986,7 +986,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, CREATESTRUCTA const *cs)
|
|||
}
|
||||
|
||||
/* Native version of ComboEx creates the ComboBox with DROPDOWNLIST */
|
||||
/* specified. It then creates it's own version of the EDIT control */
|
||||
/* specified. It then creates its own version of the EDIT control */
|
||||
/* and makes the ComboBox the parent. This is because a normal */
|
||||
/* DROPDOWNLIST does not have an EDIT control, but we need one. */
|
||||
/* We also need to place the edit control at the proper location */
|
||||
|
@ -1580,7 +1580,7 @@ static LRESULT COMBOEX_NotifyFormat (COMBOEX_INFO *infoPtr, LPARAM lParam)
|
|||
if (lParam == NF_REQUERY) {
|
||||
INT i = SendMessageW(infoPtr->hwndNotify,
|
||||
WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
|
||||
infoPtr->NtfUnicode = (i == NFR_UNICODE) ? 1 : 0;
|
||||
infoPtr->NtfUnicode = (i == NFR_UNICODE);
|
||||
}
|
||||
return infoPtr->NtfUnicode ? NFR_UNICODE : NFR_ANSI;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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
|
||||
--- e:\Wine\dlls\comctl32/comctl32.spec 2014-04-04 14:12:39.665980800 +0100
|
||||
+++ e:\reactos\dll\win32\comctl32/comctl32.spec 2014-03-27 14:27:25.808903400 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
|
||||
#12 stub Cctl1632_ThunkData32
|
||||
|
@ -21,9 +21,9 @@ diff -prudN e:\Wine\dlls\comctl32/comctl32.spec e:\reactos\dll\win32\comctl32/co
|
|||
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)
|
||||
@@ -89,13 +89,13 @@
|
||||
376 stdcall -noname -private IntlStrEqWorkerA(long str str long)
|
||||
377 stdcall -noname -private IntlStrEqWorkerW(long wstr wstr long)
|
||||
382 stdcall -noname SmoothScrollWindow(ptr)
|
||||
-383 stub -noname DoReaderMode
|
||||
+383 stdcall -noname DoReaderMode(ptr)
|
||||
|
@ -37,31 +37,25 @@ diff -prudN e:\Wine\dlls\comctl32/comctl32.spec e:\reactos\dll\win32\comctl32/co
|
|||
390 stdcall -noname ImageList_SetColorTable(ptr long long ptr)
|
||||
400 stdcall -ordinal CreateMRUListW(ptr)
|
||||
401 stdcall -ordinal AddMRUStringW(long wstr)
|
||||
@@ -188,6 +188,7 @@
|
||||
@@ -189,5 +189,6 @@
|
||||
@ 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 @@
|
||||
--- e:\Wine\dlls\comctl32/commctrl.c 2014-04-04 14:12:39.666981500 +0100
|
||||
+++ e:\reactos\dll\win32\comctl32/commctrl.c 2014-04-06 12:07:15.451048000 +0100
|
||||
@@ -52,25 +52,26 @@
|
||||
* -- ICC_WIN95_CLASSES
|
||||
*/
|
||||
|
||||
+#define WIN32_NO_STATUS
|
||||
+#define _INC_WINDOWS
|
||||
+#define COM_NO_WINDOWS_H
|
||||
+
|
||||
#include <stdarg.h>
|
||||
-#include <stdarg.h>
|
||||
-#include <string.h>
|
||||
-#include <stdlib.h>
|
||||
+//#include <string.h>
|
||||
+//#include <stdlib.h>
|
||||
+#include "comctl32.h"
|
||||
|
||||
-#include "windef.h"
|
||||
-#include "winbase.h"
|
||||
|
@ -71,20 +65,11 @@ diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commc
|
|||
-#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 "comctl32.h"
|
||||
-#include "wine/debug.h"
|
||||
+#include <wine/debug.h>
|
||||
+#include <shlwapi.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||
|
||||
|
@ -104,7 +89,7 @@ diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commc
|
|||
|
||||
static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
@@ -92,6 +109,67 @@ static const WCHAR strCC32SubclassInfo[]
|
||||
@@ -92,6 +93,67 @@ static const WCHAR strCC32SubclassInfo[]
|
||||
'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0
|
||||
};
|
||||
|
||||
|
@ -118,7 +103,7 @@ diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commc
|
|||
+ HANDLE hFile;
|
||||
+ BOOL bRet = FALSE;
|
||||
+
|
||||
+ hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFEST", RT_MANIFEST);
|
||||
+ hResInfo = FindResourceW(COMCTL32_hModule, L"WINE_MANIFEST", (LPWSTR)RT_MANIFEST);
|
||||
+ if (!hResInfo)
|
||||
+ return FALSE;
|
||||
+
|
||||
|
@ -172,7 +157,7 @@ diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commc
|
|||
|
||||
/***********************************************************************
|
||||
* DllMain [Internal]
|
||||
@@ -930,6 +1008,12 @@ HRESULT WINAPI DllGetVersion (DLLVERSION
|
||||
@@ -928,6 +990,12 @@ HRESULT WINAPI DllGetVersion (DLLVERSION
|
||||
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
|
||||
{
|
||||
TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
|
||||
|
@ -181,11 +166,11 @@ diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commc
|
|||
+ ERR("create_manifest failed!\n");
|
||||
+ return HRESULT_FROM_WIN32(GetLastError());
|
||||
+ }
|
||||
+
|
||||
+
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -1593,12 +1677,114 @@ LRESULT WINAPI SetPathWordBreakProc(HWND
|
||||
@@ -1591,12 +1659,114 @@ LRESULT WINAPI SetPathWordBreakProc(HWND
|
||||
*
|
||||
* Draw text with shadow.
|
||||
*/
|
||||
|
@ -304,7 +289,7 @@ diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commc
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -1639,3 +1825,15 @@ HRESULT WINAPI TaskDialogIndirect(const
|
||||
@@ -1637,3 +1807,15 @@ HRESULT WINAPI TaskDialogIndirect(const
|
||||
if (pfVerificationFlagChecked) *pfVerificationFlagChecked = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -322,9 +307,9 @@ diff -prudN e:\Wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commc
|
|||
+}
|
||||
|
||||
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
|
||||
--- e:\Wine\dlls\comctl32/listview.c 2014-04-18 20:39:25.506861000 +0100
|
||||
+++ e:\reactos\dll\win32\comctl32/listview.c 2014-04-22 13:09:20.504496900 +0100
|
||||
@@ -307,6 +288,7 @@ typedef struct tagLISTVIEW_INFO
|
||||
COLORREF clrBk;
|
||||
COLORREF clrText;
|
||||
COLORREF clrTextBk;
|
||||
|
@ -332,7 +317,7 @@ diff -prudN e:\Wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listv
|
|||
|
||||
/* font */
|
||||
HFONT hDefaultFont;
|
||||
@@ -1700,8 +1701,19 @@ static inline BOOL LISTVIEW_GetItemW(con
|
||||
@@ -1693,8 +1675,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)
|
||||
{
|
||||
|
@ -354,19 +339,21 @@ diff -prudN e:\Wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listv
|
|||
}
|
||||
|
||||
/* Listview invalidation functions: use _only_ these functions to invalidate */
|
||||
@@ -4734,7 +4746,10 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_I
|
||||
@@ -4727,7 +4720,12 @@ 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);
|
||||
+#ifdef __REACTOS__
|
||||
+ 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
|
||||
+#endif
|
||||
+ DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);
|
||||
|
||||
postpaint:
|
||||
if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT)
|
||||
@@ -5143,7 +5158,11 @@ enddraw:
|
||||
@@ -5136,7 +5134,11 @@ enddraw:
|
||||
|
||||
/* Draw marquee rectangle if appropriate */
|
||||
if (infoPtr->bMarqueeSelect)
|
||||
|
@ -378,7 +365,7 @@ diff -prudN e:\Wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listv
|
|||
|
||||
if (cdmode & CDRF_NOTIFYPOSTPAINT)
|
||||
notify_postpaint(infoPtr, &nmlvcd);
|
||||
@@ -7952,6 +7971,7 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW
|
||||
@@ -7939,6 +7941,7 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW
|
||||
{
|
||||
TRACE("(color=%x)\n", color);
|
||||
|
||||
|
@ -386,7 +373,27 @@ diff -prudN e:\Wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listv
|
|||
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
|
||||
@@ -8600,7 +8603,7 @@ static DWORD LISTVIEW_SetIconSpacing(LIS
|
||||
return oldspacing;
|
||||
}
|
||||
|
||||
-static inline void set_icon_size(SIZE *size, HIMAGELIST himl, BOOL small)
|
||||
+static inline void set_icon_size(SIZE *size, HIMAGELIST himl, BOOL is_small)
|
||||
{
|
||||
INT cx, cy;
|
||||
|
||||
@@ -8611,8 +8614,8 @@ static inline void set_icon_size(SIZE *s
|
||||
}
|
||||
else
|
||||
{
|
||||
- size->cx = GetSystemMetrics(small ? SM_CXSMICON : SM_CXICON);
|
||||
- size->cy = GetSystemMetrics(small ? SM_CYSMICON : SM_CYICON);
|
||||
+ size->cx = GetSystemMetrics(is_small ? SM_CXSMICON : SM_CXICON);
|
||||
+ size->cy = GetSystemMetrics(is_small ? SM_CYSMICON : SM_CYICON);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9349,6 +9352,7 @@ static LRESULT LISTVIEW_NCCreate(HWND hw
|
||||
infoPtr->clrText = CLR_DEFAULT;
|
||||
infoPtr->clrTextBk = CLR_DEFAULT;
|
||||
LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
|
||||
|
@ -394,7 +401,7 @@ diff -prudN e:\Wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listv
|
|||
|
||||
/* set default values */
|
||||
infoPtr->nFocusedItem = -1;
|
||||
@@ -11644,6 +11665,12 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg
|
||||
@@ -11631,6 +11635,12 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg
|
||||
|
||||
case WM_SYSCOLORCHANGE:
|
||||
COMCTL32_RefreshSysColors();
|
||||
|
@ -409,41 +416,42 @@ diff -prudN e:\Wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listv
|
|||
/* 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
|
||||
--- e:\Wine\dlls\comctl32/propsheet.c 2014-04-04 14:12:39.676987100 +0100
|
||||
+++ e:\reactos\dll\win32\comctl32/propsheet.c 2014-04-22 13:11:33.830045900 +0100
|
||||
@@ -2430,6 +2414,11 @@ 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);
|
||||
+#ifdef __REACTOS__
|
||||
+ HWND hwndCancel = GetDlgItem(hwndDlg, IDCANCEL);
|
||||
+ INT iDefItem = 0;
|
||||
+ HWND hwndFocus;
|
||||
+#endif
|
||||
|
||||
TRACE("%d\n", dwFlags);
|
||||
|
||||
@@ -2437,17 +2440,6 @@ static void PROPSHEET_SetWizButtons(HWND
|
||||
@@ -2437,6 +2426,7 @@ 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);
|
||||
+#ifndef __REACTOS__
|
||||
/* 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);
|
||||
@@ -2446,6 +2436,7 @@ static void PROPSHEET_SetWizButtons(HWND
|
||||
SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
|
||||
else
|
||||
SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
|
||||
+#endif
|
||||
|
||||
@@ -2477,6 +2469,22 @@ static void PROPSHEET_SetWizButtons(HWND
|
||||
|
||||
if (dwFlags & PSWIZB_BACK)
|
||||
@@ -2477,6 +2468,25 @@ static void PROPSHEET_SetWizButtons(HWND
|
||||
}
|
||||
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
|
||||
EnableWindow(hwndFinish, TRUE);
|
||||
+
|
||||
+#ifdef __REACTOS__
|
||||
+ /* set the default pushbutton to an enabled button */
|
||||
+ if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
|
||||
+ iDefItem = IDC_FINISH_BUTTON;
|
||||
|
@ -459,13 +467,15 @@ diff -prudN e:\Wine\dlls\comctl32/propsheet.c e:\reactos\dll\win32\comctl32/prop
|
|||
+ hwndFocus = GetFocus();
|
||||
+ if (!hwndFocus || hwndFocus == hwndCancel)
|
||||
+ SetFocus(GetDlgItem(hwndDlg, iDefItem));
|
||||
+#endif
|
||||
+
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
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 @@
|
||||
--- e:\Wine\dlls\comctl32/rebar.c 2014-04-04 14:12:39.678989500 +0100
|
||||
+++ e:\reactos\dll\win32\comctl32/rebar.c 2014-04-22 13:17:59.092589800 +0100
|
||||
@@ -50,7 +50,6 @@
|
||||
* - WM_QUERYNEWPALETTE
|
||||
* - WM_RBUTTONDOWN
|
||||
* - WM_RBUTTONUP
|
||||
|
@ -473,21 +483,7 @@ diff -prudN e:\Wine\dlls\comctl32/rebar.c e:\reactos\dll\win32\comctl32/rebar.c
|
|||
* - 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
|
||||
@@ -2912,12 +2896,22 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT
|
||||
|
||||
|
||||
static LRESULT
|
||||
|
@ -499,6 +495,7 @@ diff -prudN e:\Wine\dlls\comctl32/rebar.c e:\reactos\dll\win32\comctl32/rebar.c
|
|||
TRACE("[%s]\n", wine_dbgstr_rect(lpRect));
|
||||
REBAR_SizeToHeight(infoPtr, get_rect_cy(infoPtr, lpRect));
|
||||
+
|
||||
+#ifdef __REACTOS__
|
||||
+ /* Note that this undocumented flag is available on comctl32 v6 or later */
|
||||
+ if ((flags & RBSTR_CHANGERECT) != 0)
|
||||
+ {
|
||||
|
@ -506,10 +503,11 @@ diff -prudN e:\Wine\dlls\comctl32/rebar.c e:\reactos\dll\win32\comctl32/rebar.c
|
|||
+ GetClientRect(infoPtr->hwndSelf, &rcRebar);
|
||||
+ lpRect->bottom = lpRect->top + (rcRebar.bottom - rcRebar.top);
|
||||
+ }
|
||||
+#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -3713,7 +3718,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg,
|
||||
@@ -3675,7 +3669,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg,
|
||||
return REBAR_ShowBand (infoPtr, wParam, lParam);
|
||||
|
||||
case RB_SIZETORECT:
|
||||
|
@ -518,165 +516,23 @@ diff -prudN e:\Wine\dlls\comctl32/rebar.c e:\reactos\dll\win32\comctl32/rebar.c
|
|||
|
||||
|
||||
/* Messages passed to parent */
|
||||
@@ -3797,6 +3802,8 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg,
|
||||
@@ -3758,6 +3752,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg,
|
||||
|
||||
case WM_SYSCOLORCHANGE:
|
||||
COMCTL32_RefreshSysColors();
|
||||
+#ifdef __REACTOS__
|
||||
+ /* r51522 - Properly support WM_SYSCOLORCHANGE */
|
||||
+ infoPtr->clrBtnText = comctl32_color.clrBtnText;
|
||||
+ infoPtr->clrBtnFace = comctl32_color.clrBtnFace;
|
||||
+#endif
|
||||
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
|
||||
--- e:\Wine\dlls\comctl32/tooltips.c 2014-04-04 14:12:39.707008100 +0100
|
||||
+++ e:\reactos\dll\win32\comctl32/tooltips.c 2014-04-06 12:20:33.342535700 +0100
|
||||
@@ -2007,7 +1994,32 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO
|
||||
static LRESULT
|
||||
TOOLTIPS_NotifyFormat (TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -710,11 +566,10 @@ diff -prudN e:\Wine\dlls\comctl32/tooltips.c e:\reactos\dll\win32\comctl32/toolt
|
|||
|
||||
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,
|
||||
--- e:\Wine\dlls\comctl32/treeview.c 2014-04-04 14:12:39.709009500 +0100
|
||||
+++ e:\reactos\dll\win32\comctl32/treeview.c 2014-04-06 12:22:08.977839700 +0100
|
||||
@@ -2921,7 +2899,12 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -929,7 +929,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
|
|||
* Failure: 0
|
||||
*
|
||||
* NOTES
|
||||
* Do not use this functions anymore. Use CreateToolbarEx instead.
|
||||
* Do not use this function anymore. Use CreateToolbarEx instead.
|
||||
*/
|
||||
|
||||
HWND WINAPI
|
||||
|
@ -1560,7 +1560,7 @@ void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm)
|
|||
* identifies them.
|
||||
*
|
||||
* Some of the codes are in the CCM_FIRST..CCM_LAST range, but there is no
|
||||
* colision with defined CCM_ codes.
|
||||
* collision with defined CCM_ codes.
|
||||
*/
|
||||
BOOL COMCTL32_IsReflectedMessage(UINT uMsg)
|
||||
{
|
||||
|
@ -1609,7 +1609,7 @@ BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static inline int IsDelimiter(WCHAR c)
|
||||
static inline BOOL IsDelimiter(WCHAR c)
|
||||
{
|
||||
switch(c)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct
|
|||
RECT checkbox; /* checkbox allowing the control to be enabled/disabled */
|
||||
RECT calbutton; /* button that toggles the dropdown of the monthcal control */
|
||||
BOOL bCalDepressed; /* TRUE = cal button is depressed */
|
||||
int bDropdownEnabled;
|
||||
BOOL bDropdownEnabled;
|
||||
int select;
|
||||
WCHAR charsEntered[4];
|
||||
int nCharsEntered;
|
||||
|
@ -186,7 +186,7 @@ static BOOL DATETIME_IsDateInValidRange(const DATETIME_INFO *infoPtr, const SYST
|
|||
static BOOL
|
||||
DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *systime)
|
||||
{
|
||||
if (!systime) return 0;
|
||||
if (!systime) return FALSE;
|
||||
|
||||
TRACE("%04d/%02d/%02d %02d:%02d:%02d\n",
|
||||
systime->wYear, systime->wMonth, systime->wDay,
|
||||
|
@ -205,7 +205,7 @@ DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *sy
|
|||
return FALSE;
|
||||
|
||||
/* Windows returns true if the date is valid but outside the limits set */
|
||||
if (DATETIME_IsDateInValidRange(infoPtr, systime) == FALSE)
|
||||
if (!DATETIME_IsDateInValidRange(infoPtr, systime))
|
||||
return TRUE;
|
||||
|
||||
infoPtr->dateValid = TRUE;
|
||||
|
@ -819,8 +819,8 @@ DATETIME_HitTest (const DATETIME_INFO *infoPtr, POINT pt)
|
|||
return DTHT_NONE;
|
||||
}
|
||||
|
||||
/* Returns index of a closest date field from given counting to left
|
||||
or -1 if there's no such fields at left */
|
||||
/* Returns index of the nearest preceding date field from given,
|
||||
or -1 if none was found */
|
||||
static int DATETIME_GetPrevDateField(const DATETIME_INFO *infoPtr, int i)
|
||||
{
|
||||
for(--i; i >= 0; i--)
|
||||
|
@ -834,7 +834,8 @@ static void
|
|||
DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
|
||||
{
|
||||
int fieldNum = infoPtr->select & DTHT_DATEFIELD;
|
||||
int i, val=0, clamp_day=0;
|
||||
int i, val = 0;
|
||||
BOOL clamp_day = FALSE;
|
||||
SYSTEMTIME date = infoPtr->date;
|
||||
int oldyear;
|
||||
|
||||
|
@ -858,7 +859,7 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
|
|||
date.wYear = date.wYear - (date.wYear%100) + val;
|
||||
|
||||
if (DATETIME_IsDateInValidRange(infoPtr, &date))
|
||||
clamp_day = 1;
|
||||
clamp_day = TRUE;
|
||||
else
|
||||
date.wYear = oldyear;
|
||||
|
||||
|
@ -869,7 +870,7 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
|
|||
date.wYear = val;
|
||||
|
||||
if (DATETIME_IsDateInValidRange(infoPtr, &date))
|
||||
clamp_day = 1;
|
||||
clamp_day = TRUE;
|
||||
else
|
||||
date.wYear = oldyear;
|
||||
|
||||
|
@ -877,7 +878,7 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
|
|||
case ONEDIGITMONTH:
|
||||
case TWODIGITMONTH:
|
||||
date.wMonth = val;
|
||||
clamp_day = 1;
|
||||
clamp_day = TRUE;
|
||||
break;
|
||||
case ONEDIGITDAY:
|
||||
case TWODIGITDAY:
|
||||
|
|
|
@ -117,8 +117,10 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc,
|
|||
if (!hDpa)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (!DPA_Grow (hDpa, streamData.dwItems))
|
||||
if (!DPA_Grow (hDpa, streamData.dwItems)) {
|
||||
DPA_Destroy (hDpa);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
/* load data from the stream into the dpa */
|
||||
ptr = hDpa->ptrs;
|
||||
|
@ -162,7 +164,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc,
|
|||
* NOTES
|
||||
* No more information available yet!
|
||||
*/
|
||||
HRESULT WINAPI DPA_SaveStream (const HDPA hDpa, PFNDPASTREAM saveProc,
|
||||
HRESULT WINAPI DPA_SaveStream (HDPA hDpa, PFNDPASTREAM saveProc,
|
||||
IStream *pStream, LPVOID pData)
|
||||
{
|
||||
LARGE_INTEGER position;
|
||||
|
@ -257,7 +259,7 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
|
|||
INT nResult, i;
|
||||
INT nIndex;
|
||||
|
||||
TRACE("%p %p %08x %p %p %08lx)\n",
|
||||
TRACE("(%p %p %08x %p %p %08lx)\n",
|
||||
hdpa1, hdpa2, dwFlags, pfnCompare, pfnMerge, lParam);
|
||||
|
||||
if (IsBadWritePtr (hdpa1, sizeof(*hdpa1)))
|
||||
|
@ -385,7 +387,7 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DPA_Destroy (const HDPA hdpa)
|
||||
BOOL WINAPI DPA_Destroy (HDPA hdpa)
|
||||
{
|
||||
TRACE("(%p)\n", hdpa);
|
||||
|
||||
|
@ -455,11 +457,11 @@ BOOL WINAPI DPA_Grow (HDPA hdpa, INT nGrow)
|
|||
*
|
||||
* NOTES
|
||||
* - If the 'hdpaNew' is a NULL-Pointer, a copy of the source pointer
|
||||
* array will be created and it's handle (pointer) is returned.
|
||||
* array will be created and its handle (pointer) is returned.
|
||||
* - If 'hdpa' is a NULL-Pointer, the original implementation crashes,
|
||||
* this implementation just returns NULL.
|
||||
*/
|
||||
HDPA WINAPI DPA_Clone (const HDPA hdpa, const HDPA hdpaNew)
|
||||
HDPA WINAPI DPA_Clone (const HDPA hdpa, HDPA hdpaNew)
|
||||
{
|
||||
INT nNewItems, nSize;
|
||||
HDPA hdpaTemp;
|
||||
|
@ -516,7 +518,7 @@ HDPA WINAPI DPA_Clone (const HDPA hdpa, const HDPA hdpaNew)
|
|||
* Success: pointer
|
||||
* Failure: NULL
|
||||
*/
|
||||
LPVOID WINAPI DPA_GetPtr (const HDPA hdpa, INT nIndex)
|
||||
LPVOID WINAPI DPA_GetPtr (HDPA hdpa, INT nIndex)
|
||||
{
|
||||
TRACE("(%p %d)\n", hdpa, nIndex);
|
||||
|
||||
|
@ -580,7 +582,7 @@ INT WINAPI DPA_GetPtrIndex (HDPA hdpa, LPCVOID p)
|
|||
* Success: index of the inserted pointer
|
||||
* Failure: -1
|
||||
*/
|
||||
INT WINAPI DPA_InsertPtr (const HDPA hdpa, INT i, LPVOID p)
|
||||
INT WINAPI DPA_InsertPtr (HDPA hdpa, INT i, LPVOID p)
|
||||
{
|
||||
TRACE("(%p %d %p)\n", hdpa, i, p);
|
||||
|
||||
|
@ -615,7 +617,7 @@ INT WINAPI DPA_InsertPtr (const HDPA hdpa, INT i, LPVOID p)
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p)
|
||||
BOOL WINAPI DPA_SetPtr (HDPA hdpa, INT i, LPVOID p)
|
||||
{
|
||||
LPVOID *lpTemp;
|
||||
|
||||
|
@ -666,7 +668,7 @@ BOOL WINAPI DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p)
|
|||
* Success: deleted pointer
|
||||
* Failure: NULL
|
||||
*/
|
||||
LPVOID WINAPI DPA_DeletePtr (const HDPA hdpa, INT i)
|
||||
LPVOID WINAPI DPA_DeletePtr (HDPA hdpa, INT i)
|
||||
{
|
||||
LPVOID *lpDest, *lpSrc, lpTemp = NULL;
|
||||
INT nSize;
|
||||
|
@ -719,7 +721,7 @@ LPVOID WINAPI DPA_DeletePtr (const HDPA hdpa, INT i)
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DPA_DeleteAllPtrs (const HDPA hdpa)
|
||||
BOOL WINAPI DPA_DeleteAllPtrs (HDPA hdpa)
|
||||
{
|
||||
TRACE("(%p)\n", hdpa);
|
||||
|
||||
|
@ -802,7 +804,7 @@ static VOID DPA_QuickSort (LPVOID *lpPtrs, INT l, INT r,
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DPA_Sort (const HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
|
||||
BOOL WINAPI DPA_Sort (HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
|
||||
{
|
||||
if (!hdpa || !pfnCompare)
|
||||
return FALSE;
|
||||
|
@ -834,7 +836,7 @@ BOOL WINAPI DPA_Sort (const HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
|
|||
* Success: index of the pointer in the array.
|
||||
* Failure: -1
|
||||
*/
|
||||
INT WINAPI DPA_Search (const HDPA hdpa, LPVOID pFind, INT nStart,
|
||||
INT WINAPI DPA_Search (HDPA hdpa, LPVOID pFind, INT nStart,
|
||||
PFNDPACOMPARE pfnCompare, LPARAM lParam, UINT uOptions)
|
||||
{
|
||||
if (!hdpa || !pfnCompare || !pFind)
|
||||
|
|
|
@ -92,7 +92,7 @@ HDSA WINAPI DSA_Create (INT nSize, INT nGrow)
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DSA_Destroy (const HDSA hdsa)
|
||||
BOOL WINAPI DSA_Destroy (HDSA hdsa)
|
||||
{
|
||||
TRACE("(%p)\n", hdsa);
|
||||
|
||||
|
@ -120,7 +120,7 @@ BOOL WINAPI DSA_Destroy (const HDSA hdsa)
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DSA_GetItem (const HDSA hdsa, INT nIndex, LPVOID pDest)
|
||||
BOOL WINAPI DSA_GetItem (HDSA hdsa, INT nIndex, LPVOID pDest)
|
||||
{
|
||||
LPVOID pSrc;
|
||||
|
||||
|
@ -151,7 +151,7 @@ BOOL WINAPI DSA_GetItem (const HDSA hdsa, INT nIndex, LPVOID pDest)
|
|||
* Success: pointer to an item
|
||||
* Failure: NULL
|
||||
*/
|
||||
LPVOID WINAPI DSA_GetItemPtr (const HDSA hdsa, INT nIndex)
|
||||
LPVOID WINAPI DSA_GetItemPtr (HDSA hdsa, INT nIndex)
|
||||
{
|
||||
LPVOID pSrc;
|
||||
|
||||
|
@ -184,7 +184,7 @@ LPVOID WINAPI DSA_GetItemPtr (const HDSA hdsa, INT nIndex)
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
||||
BOOL WINAPI DSA_SetItem (HDSA hdsa, INT nIndex, LPVOID pSrc)
|
||||
{
|
||||
INT nSize, nNewItems;
|
||||
LPVOID pDest, lpTemp;
|
||||
|
@ -240,7 +240,7 @@ BOOL WINAPI DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
|||
* Success: position of the new item
|
||||
* Failure: -1
|
||||
*/
|
||||
INT WINAPI DSA_InsertItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
||||
INT WINAPI DSA_InsertItem (HDSA hdsa, INT nIndex, LPVOID pSrc)
|
||||
{
|
||||
INT nNewItems, nSize;
|
||||
LPVOID lpTemp, lpDest;
|
||||
|
@ -301,7 +301,7 @@ INT WINAPI DSA_InsertItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
|||
* Success: number of the deleted element
|
||||
* Failure: -1
|
||||
*/
|
||||
INT WINAPI DSA_DeleteItem (const HDSA hdsa, INT nIndex)
|
||||
INT WINAPI DSA_DeleteItem (HDSA hdsa, INT nIndex)
|
||||
{
|
||||
LPVOID lpDest,lpSrc;
|
||||
INT nSize;
|
||||
|
@ -353,7 +353,7 @@ INT WINAPI DSA_DeleteItem (const HDSA hdsa, INT nIndex)
|
|||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*/
|
||||
BOOL WINAPI DSA_DeleteAllItems (const HDSA hdsa)
|
||||
BOOL WINAPI DSA_DeleteAllItems (HDSA hdsa)
|
||||
{
|
||||
TRACE("(%p)\n", hdsa);
|
||||
|
||||
|
|
|
@ -872,7 +872,7 @@ HEADER_SendNotifyWithIntFieldT(const HEADER_INFO *infoPtr, UINT code, INT iItem,
|
|||
* Prepare callback items
|
||||
* depends on NMHDDISPINFOW having same structure as NMHDDISPINFOA
|
||||
* (so we handle the two cases only doing a specific cast for pszText).
|
||||
* Checks if any of the required field are callback. If there are sends a
|
||||
* Checks if any of the required fields is a callback. If this is the case sends a
|
||||
* NMHDISPINFO notify to retrieve these items. The items are stored in the
|
||||
* HEADER_ITEM pszText and iImage fields. They should be freed with
|
||||
* HEADER_FreeCallbackItems.
|
||||
|
|
|
@ -196,7 +196,7 @@ static void add_dib_bits( HIMAGELIST himl, int pos, int count, int width, int he
|
|||
|
||||
for (n = 0; n < count; n++)
|
||||
{
|
||||
int has_alpha = 0;
|
||||
BOOL has_alpha = FALSE;
|
||||
|
||||
imagelist_point_from_index( himl, pos + n, &pt );
|
||||
|
||||
|
@ -2876,7 +2876,7 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
|
|||
himl->hbmImage = hbmNewBitmap;
|
||||
}
|
||||
else
|
||||
ERR("Could not create new image bitmap !\n");
|
||||
ERR("Could not create new image bitmap!\n");
|
||||
|
||||
if (himl->hbmMask)
|
||||
{
|
||||
|
@ -3147,7 +3147,7 @@ static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count)
|
|||
*/
|
||||
|
||||
UINT WINAPI
|
||||
ImageList_SetColorTable (HIMAGELIST himl, UINT uStartIndex, UINT cEntries, CONST RGBQUAD * prgb)
|
||||
ImageList_SetColorTable(HIMAGELIST himl, UINT uStartIndex, UINT cEntries, const RGBQUAD *prgb)
|
||||
{
|
||||
return SetDIBColorTable(himl->hdcImage, uStartIndex, cEntries, prgb);
|
||||
}
|
||||
|
|
|
@ -1118,7 +1118,7 @@ static inline BOOL ranges_delitem(RANGES ranges, INT nItem)
|
|||
* ITERATOR DOCUMENTATION
|
||||
*
|
||||
* The iterator functions allow for easy, and convenient iteration
|
||||
* over items of interest in the list. Typically, you create a
|
||||
* over items of interest in the list. Typically, you create an
|
||||
* iterator, use it, and destroy it, as such:
|
||||
* ITERATOR i;
|
||||
*
|
||||
|
@ -3670,8 +3670,8 @@ static void LISTVIEW_SetSelection(LISTVIEW_INFO *infoPtr, INT nItem)
|
|||
static BOOL LISTVIEW_KeySelection(LISTVIEW_INFO *infoPtr, INT nItem, BOOL space)
|
||||
{
|
||||
/* FIXME: pass in the state */
|
||||
WORD wShift = HIWORD(GetKeyState(VK_SHIFT));
|
||||
WORD wCtrl = HIWORD(GetKeyState(VK_CONTROL));
|
||||
WORD wShift = GetKeyState(VK_SHIFT) & 0x8000;
|
||||
WORD wCtrl = GetKeyState(VK_CONTROL) & 0x8000;
|
||||
BOOL bResult = FALSE;
|
||||
|
||||
TRACE("nItem=%d, wShift=%d, wCtrl=%d\n", nItem, wShift, wCtrl);
|
||||
|
@ -4720,9 +4720,11 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
|
|||
if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES)
|
||||
rcLabel.bottom--;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
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
|
||||
#endif
|
||||
DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);
|
||||
|
||||
postpaint:
|
||||
|
@ -5383,9 +5385,8 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP
|
|||
*/
|
||||
static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy)
|
||||
{
|
||||
NMLISTVIEW nmlv;
|
||||
HDPA hdpaSubItems = NULL;
|
||||
BOOL bSuppress;
|
||||
BOOL suppress = FALSE;
|
||||
ITEMHDR *hdrItem;
|
||||
ITEM_INFO *lpItem;
|
||||
ITEM_ID *lpID;
|
||||
|
@ -5400,11 +5401,15 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy)
|
|||
SetRectEmpty(&infoPtr->rcFocus);
|
||||
/* But we are supposed to leave nHotItem as is! */
|
||||
|
||||
|
||||
/* send LVN_DELETEALLITEMS notification */
|
||||
ZeroMemory(&nmlv, sizeof(NMLISTVIEW));
|
||||
nmlv.iItem = -1;
|
||||
bSuppress = notify_listview(infoPtr, LVN_DELETEALLITEMS, &nmlv);
|
||||
if (!(infoPtr->dwStyle & LVS_OWNERDATA) || !destroy)
|
||||
{
|
||||
NMLISTVIEW nmlv;
|
||||
|
||||
memset(&nmlv, 0, sizeof(NMLISTVIEW));
|
||||
nmlv.iItem = -1;
|
||||
suppress = notify_listview(infoPtr, LVN_DELETEALLITEMS, &nmlv);
|
||||
}
|
||||
|
||||
for (i = infoPtr->nItemCount - 1; i >= 0; i--)
|
||||
{
|
||||
|
@ -5412,7 +5417,7 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy)
|
|||
{
|
||||
/* send LVN_DELETEITEM notification, if not suppressed
|
||||
and if it is not a virtual listview */
|
||||
if (!bSuppress) notify_deleteitem(infoPtr, i);
|
||||
if (!suppress) notify_deleteitem(infoPtr, i);
|
||||
hdpaSubItems = DPA_GetPtr(infoPtr->hdpaItems, i);
|
||||
lpItem = DPA_GetPtr(hdpaSubItems, 0);
|
||||
/* free id struct */
|
||||
|
@ -7500,6 +7505,7 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht,
|
|||
WCHAR szDispText[DISP_TEXT_SIZE] = { '\0' };
|
||||
RECT rcBox, rcBounds, rcState, rcIcon, rcLabel, rcSearch;
|
||||
POINT Origin, Position, opt;
|
||||
BOOL is_fullrow;
|
||||
LVITEMW lvItem;
|
||||
ITERATOR i;
|
||||
INT iItem;
|
||||
|
@ -7623,15 +7629,17 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht,
|
|||
TRACE("rcBounds=%s\n", wine_dbgstr_rect(&rcBounds));
|
||||
if (!PtInRect(&rcBounds, opt)) return -1;
|
||||
|
||||
/* That's a special case - row rectangle is used as item rectangle and
|
||||
returned flags contain all item parts. */
|
||||
is_fullrow = (infoPtr->uView == LV_VIEW_DETAILS) && ((infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) || (infoPtr->dwStyle & LVS_OWNERDRAWFIXED));
|
||||
|
||||
if (PtInRect(&rcIcon, opt))
|
||||
lpht->flags |= LVHT_ONITEMICON;
|
||||
else if (PtInRect(&rcLabel, opt))
|
||||
lpht->flags |= LVHT_ONITEMLABEL;
|
||||
else if (infoPtr->himlState && PtInRect(&rcState, opt))
|
||||
lpht->flags |= LVHT_ONITEMSTATEICON;
|
||||
/* special case for LVS_EX_FULLROWSELECT */
|
||||
if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT &&
|
||||
!(lpht->flags & LVHT_ONITEM))
|
||||
if (is_fullrow && !(lpht->flags & LVHT_ONITEM))
|
||||
{
|
||||
lpht->flags = LVHT_ONITEM | LVHT_ABOVE;
|
||||
}
|
||||
|
@ -7639,9 +7647,7 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht,
|
|||
lpht->flags &= ~LVHT_NOWHERE;
|
||||
TRACE("lpht->flags=0x%x\n", lpht->flags);
|
||||
|
||||
if (select && !(infoPtr->uView == LV_VIEW_DETAILS &&
|
||||
((infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) ||
|
||||
(infoPtr->dwStyle & LVS_OWNERDRAWFIXED))))
|
||||
if (select && !is_fullrow)
|
||||
{
|
||||
if (infoPtr->uView == LV_VIEW_DETAILS)
|
||||
{
|
||||
|
@ -8247,7 +8253,7 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx)
|
|||
INT max_cx = 0;
|
||||
HDITEMW hdi;
|
||||
|
||||
TRACE("(nColumn=%d, cx=%d\n", nColumn, cx);
|
||||
TRACE("(nColumn=%d, cx=%d)\n", nColumn, cx);
|
||||
|
||||
/* set column width only if in report or list mode */
|
||||
if (infoPtr->uView != LV_VIEW_DETAILS && infoPtr->uView != LV_VIEW_LIST) return FALSE;
|
||||
|
@ -8631,7 +8637,7 @@ static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *infoPtr, INT nType, HIMAG
|
|||
INT oldHeight = infoPtr->nItemHeight;
|
||||
HIMAGELIST himlOld = 0;
|
||||
|
||||
TRACE("(nType=%d, himl=%p\n", nType, himl);
|
||||
TRACE("(nType=%d, himl=%p)\n", nType, himl);
|
||||
|
||||
switch (nType)
|
||||
{
|
||||
|
@ -8786,7 +8792,7 @@ static BOOL LISTVIEW_SetItemPosition(LISTVIEW_INFO *infoPtr, INT nItem, const PO
|
|||
{
|
||||
POINT Origin, Pt;
|
||||
|
||||
TRACE("(nItem=%d, pt=%s\n", nItem, wine_dbgstr_point(pt));
|
||||
TRACE("(nItem=%d, pt=%s)\n", nItem, wine_dbgstr_point(pt));
|
||||
|
||||
if (!pt || nItem < 0 || nItem >= infoPtr->nItemCount ||
|
||||
!(infoPtr->uView == LV_VIEW_ICON || infoPtr->uView == LV_VIEW_SMALLICON)) return FALSE;
|
||||
|
|
|
@ -1872,7 +1872,7 @@ static void PROPSHEET_UnChanged(HWND hwndDlg, HWND hwndCleanPage)
|
|||
if (psInfo->proppage[i].hwndPage == hwndCleanPage)
|
||||
psInfo->proppage[i].isDirty = FALSE;
|
||||
|
||||
/* look to see if there's any dirty pages */
|
||||
/* look to see if there are any dirty pages */
|
||||
if (psInfo->proppage[i].isDirty)
|
||||
noPageDirty = FALSE;
|
||||
}
|
||||
|
@ -2414,9 +2414,11 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
|||
HWND hwndBack = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
|
||||
HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
|
||||
HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
|
||||
#ifdef __REACTOS__
|
||||
HWND hwndCancel = GetDlgItem(hwndDlg, IDCANCEL);
|
||||
INT iDefItem = 0;
|
||||
HWND hwndFocus;
|
||||
#endif
|
||||
|
||||
TRACE("%d\n", dwFlags);
|
||||
|
||||
|
@ -2424,6 +2426,19 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
|||
EnableWindow(hwndNext, FALSE);
|
||||
EnableWindow(hwndFinish, FALSE);
|
||||
|
||||
#ifndef __REACTOS__
|
||||
/* 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);
|
||||
#endif
|
||||
|
||||
|
||||
if (dwFlags & PSWIZB_BACK)
|
||||
EnableWindow(hwndBack, TRUE);
|
||||
|
||||
|
@ -2454,6 +2469,7 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
|||
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
|
||||
EnableWindow(hwndFinish, TRUE);
|
||||
|
||||
#ifdef __REACTOS__
|
||||
/* set the default pushbutton to an enabled button */
|
||||
if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
|
||||
iDefItem = IDC_FINISH_BUTTON;
|
||||
|
@ -2469,6 +2485,8 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
|||
hwndFocus = GetFocus();
|
||||
if (!hwndFocus || hwndFocus == hwndCancel)
|
||||
SetFocus(GetDlgItem(hwndDlg, iDefItem));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
* - WM_QUERYNEWPALETTE
|
||||
* - WM_RBUTTONDOWN
|
||||
* - WM_RBUTTONUP
|
||||
* - WM_SYSCOLORCHANGE
|
||||
* - WM_VKEYTOITEM
|
||||
* - WM_WININICHANGE
|
||||
* Notifications:
|
||||
|
@ -2904,6 +2903,7 @@ REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM flags, RECT *lpRect)
|
|||
TRACE("[%s]\n", wine_dbgstr_rect(lpRect));
|
||||
REBAR_SizeToHeight(infoPtr, get_rect_cy(infoPtr, lpRect));
|
||||
|
||||
#ifdef __REACTOS__
|
||||
/* Note that this undocumented flag is available on comctl32 v6 or later */
|
||||
if ((flags & RBSTR_CHANGERECT) != 0)
|
||||
{
|
||||
|
@ -2911,6 +2911,7 @@ REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM flags, RECT *lpRect)
|
|||
GetClientRect(infoPtr->hwndSelf, &rcRebar);
|
||||
lpRect->bottom = lpRect->top + (rcRebar.bottom - rcRebar.top);
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -3378,7 +3379,7 @@ REBAR_NotifyFormat (REBAR_INFO *infoPtr, LPARAM cmd)
|
|||
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n", i);
|
||||
i = NFR_ANSI;
|
||||
}
|
||||
infoPtr->bUnicode = (i == NFR_UNICODE) ? 1 : 0;
|
||||
infoPtr->bUnicode = (i == NFR_UNICODE);
|
||||
return (LRESULT)i;
|
||||
}
|
||||
return (LRESULT)((infoPtr->bUnicode) ? NFR_UNICODE : NFR_ANSI);
|
||||
|
@ -3751,8 +3752,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_SYSCOLORCHANGE:
|
||||
COMCTL32_RefreshSysColors();
|
||||
#ifdef __REACTOS__
|
||||
/* r51522 - Properly support WM_SYSCOLORCHANGE */
|
||||
infoPtr->clrBtnText = comctl32_color.clrBtnText;
|
||||
infoPtr->clrBtnFace = comctl32_color.clrBtnFace;
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
/* case WM_VKEYTOITEM: supported according to ControlSpy */
|
||||
|
|
|
@ -687,10 +687,12 @@ STATUSBAR_SetParts (STATUS_INFO *infoPtr, INT count, LPINT parts)
|
|||
if (infoPtr->hwndToolTip) {
|
||||
INT nTipCount;
|
||||
TTTOOLINFOW ti;
|
||||
WCHAR wEmpty = 0;
|
||||
|
||||
ZeroMemory (&ti, sizeof(TTTOOLINFOW));
|
||||
ti.cbSize = sizeof(TTTOOLINFOW);
|
||||
ti.hwnd = infoPtr->Self;
|
||||
ti.lpszText = &wEmpty;
|
||||
|
||||
nTipCount = SendMessageW (infoPtr->hwndToolTip, TTM_GETTOOLCOUNT, 0, 0);
|
||||
if (nTipCount < infoPtr->numParts) {
|
||||
|
|
|
@ -238,22 +238,29 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem)
|
|||
|
||||
TRACE("(%p %d)\n", infoPtr, iItem);
|
||||
|
||||
if (iItem < 0)
|
||||
infoPtr->iSelected = -1;
|
||||
else if (iItem >= infoPtr->uNumItem)
|
||||
if (iItem >= (INT)infoPtr->uNumItem)
|
||||
return -1;
|
||||
else {
|
||||
if (prevItem != iItem) {
|
||||
if (prevItem != -1)
|
||||
TAB_GetItem(infoPtr, prevItem)->dwState &= ~TCIS_BUTTONPRESSED;
|
||||
TAB_GetItem(infoPtr, iItem)->dwState |= TCIS_BUTTONPRESSED;
|
||||
|
||||
if (prevItem != iItem) {
|
||||
if (prevItem != -1)
|
||||
TAB_GetItem(infoPtr, prevItem)->dwState &= ~TCIS_BUTTONPRESSED;
|
||||
|
||||
if (iItem >= 0)
|
||||
{
|
||||
TAB_GetItem(infoPtr, iItem)->dwState |= TCIS_BUTTONPRESSED;
|
||||
infoPtr->iSelected = iItem;
|
||||
infoPtr->uFocus = iItem;
|
||||
TAB_EnsureSelectionVisible(infoPtr);
|
||||
TAB_InvalidateTabArea(infoPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
infoPtr->iSelected = -1;
|
||||
infoPtr->uFocus = -1;
|
||||
}
|
||||
|
||||
TAB_EnsureSelectionVisible(infoPtr);
|
||||
TAB_InvalidateTabArea(infoPtr);
|
||||
}
|
||||
|
||||
return prevItem;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@ typedef struct
|
|||
INT idCommand;
|
||||
BYTE fsState;
|
||||
BYTE fsStyle;
|
||||
BYTE bHot;
|
||||
BYTE bDropDownPressed;
|
||||
BOOL bHot;
|
||||
BOOL bDropDownPressed;
|
||||
DWORD_PTR dwData;
|
||||
INT_PTR iString;
|
||||
INT nRow;
|
||||
|
|
|
@ -613,7 +613,7 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
|
|||
TOOLTIPS_CalcTipSize (infoPtr, &size);
|
||||
TRACE("size %d x %d\n", size.cx, size.cy);
|
||||
|
||||
if (track_activate)
|
||||
if (track_activate && (toolPtr->uFlags & TTF_TRACK))
|
||||
{
|
||||
rect.left = infoPtr->xTrackPos;
|
||||
rect.top = infoPtr->yTrackPos;
|
||||
|
@ -1024,6 +1024,9 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
|
|||
infoPtr->hwndSelf, ti->hwnd, ti->uId,
|
||||
(ti->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" : "");
|
||||
|
||||
if (ti->cbSize >= TTTOOLINFOW_V2_SIZE && !ti->lpszText && isW)
|
||||
return FALSE;
|
||||
|
||||
if (infoPtr->uNumTools == 0) {
|
||||
infoPtr->tools = Alloc (sizeof(TTTOOL_INFO));
|
||||
toolPtr = infoPtr->tools;
|
||||
|
@ -1047,27 +1050,29 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
|
|||
toolPtr->rect = ti->rect;
|
||||
toolPtr->hinst = ti->hinst;
|
||||
|
||||
if (IS_INTRESOURCE(ti->lpszText)) {
|
||||
TRACE("add string id %x\n", LOWORD(ti->lpszText));
|
||||
toolPtr->lpszText = ti->lpszText;
|
||||
}
|
||||
else if (ti->lpszText) {
|
||||
if (TOOLTIPS_IsCallbackString(ti->lpszText, isW)) {
|
||||
TRACE("add CALLBACK!\n");
|
||||
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
|
||||
}
|
||||
else if (isW) {
|
||||
INT len = lstrlenW (ti->lpszText);
|
||||
TRACE("add text %s!\n", debugstr_w(ti->lpszText));
|
||||
toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
|
||||
strcpyW (toolPtr->lpszText, ti->lpszText);
|
||||
}
|
||||
else {
|
||||
INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0);
|
||||
TRACE("add text \"%s\"!\n", (LPSTR)ti->lpszText);
|
||||
toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, toolPtr->lpszText, len);
|
||||
}
|
||||
if (ti->cbSize >= TTTOOLINFOW_V1_SIZE) {
|
||||
if (IS_INTRESOURCE(ti->lpszText)) {
|
||||
TRACE("add string id %x\n", LOWORD(ti->lpszText));
|
||||
toolPtr->lpszText = ti->lpszText;
|
||||
}
|
||||
else if (ti->lpszText) {
|
||||
if (TOOLTIPS_IsCallbackString(ti->lpszText, isW)) {
|
||||
TRACE("add CALLBACK!\n");
|
||||
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
|
||||
}
|
||||
else if (isW) {
|
||||
INT len = lstrlenW (ti->lpszText);
|
||||
TRACE("add text %s!\n", debugstr_w(ti->lpszText));
|
||||
toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
|
||||
strcpyW (toolPtr->lpszText, ti->lpszText);
|
||||
}
|
||||
else {
|
||||
INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0);
|
||||
TRACE("add text \"%s\"!\n", (LPSTR)ti->lpszText);
|
||||
toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, toolPtr->lpszText, len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ti->cbSize >= TTTOOLINFOW_V2_SIZE)
|
||||
|
|
|
@ -597,7 +597,6 @@ TRACKBAR_DrawTics (const TRACKBAR_INFO *infoPtr, HDC hdc)
|
|||
}
|
||||
}
|
||||
|
||||
#define POINT_COUNT 6
|
||||
static int
|
||||
TRACKBAR_FillThumb (const TRACKBAR_INFO *infoPtr, HDC hdc, HBRUSH hbrush)
|
||||
{
|
||||
|
@ -1511,11 +1510,13 @@ TRACKBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
hwnd, 0, 0, 0);
|
||||
|
||||
if (infoPtr->hwndToolTip) {
|
||||
TTTOOLINFOW ti;
|
||||
TTTOOLINFOW ti;
|
||||
WCHAR wEmpty = 0;
|
||||
ZeroMemory (&ti, sizeof(ti));
|
||||
ti.cbSize = sizeof(ti);
|
||||
ti.uFlags = TTF_IDISHWND | TTF_TRACK | TTF_ABSOLUTE;
|
||||
ti.hwnd = hwnd;
|
||||
ti.lpszText = &wEmpty;
|
||||
|
||||
SendMessageW (infoPtr->hwndToolTip, TTM_ADDTOOLW, 0, (LPARAM)&ti);
|
||||
}
|
||||
|
|
|
@ -2926,6 +2926,62 @@ TREEVIEW_Invalidate(const TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *item)
|
|||
InvalidateRect(infoPtr->hwnd, NULL, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
TREEVIEW_InitCheckboxes(TREEVIEW_INFO *infoPtr)
|
||||
{
|
||||
RECT rc;
|
||||
HBITMAP hbm, hbmOld;
|
||||
HDC hdc, hdcScreen;
|
||||
int nIndex;
|
||||
|
||||
infoPtr->himlState = ImageList_Create(16, 16, ILC_COLOR | ILC_MASK, 3, 0);
|
||||
|
||||
hdcScreen = GetDC(0);
|
||||
|
||||
hdc = CreateCompatibleDC(hdcScreen);
|
||||
hbm = CreateCompatibleBitmap(hdcScreen, 48, 16);
|
||||
hbmOld = SelectObject(hdc, hbm);
|
||||
|
||||
SetRect(&rc, 0, 0, 48, 16);
|
||||
FillRect(hdc, &rc, (HBRUSH)(COLOR_WINDOW+1));
|
||||
|
||||
SetRect(&rc, 18, 2, 30, 14);
|
||||
DrawFrameControl(hdc, &rc, DFC_BUTTON,
|
||||
DFCS_BUTTONCHECK|DFCS_FLAT);
|
||||
|
||||
SetRect(&rc, 34, 2, 46, 14);
|
||||
DrawFrameControl(hdc, &rc, DFC_BUTTON,
|
||||
DFCS_BUTTONCHECK|DFCS_FLAT|DFCS_CHECKED);
|
||||
|
||||
SelectObject(hdc, hbmOld);
|
||||
nIndex = ImageList_AddMasked(infoPtr->himlState, hbm,
|
||||
comctl32_color.clrWindow);
|
||||
TRACE("checkbox index %d\n", nIndex);
|
||||
|
||||
DeleteObject(hbm);
|
||||
DeleteDC(hdc);
|
||||
ReleaseDC(0, hdcScreen);
|
||||
|
||||
infoPtr->stateImageWidth = 16;
|
||||
infoPtr->stateImageHeight = 16;
|
||||
}
|
||||
|
||||
static void
|
||||
TREEVIEW_ResetImageStateIndex(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item)
|
||||
{
|
||||
TREEVIEW_ITEM *child = item->firstChild;
|
||||
|
||||
item->state &= ~TVIS_STATEIMAGEMASK;
|
||||
item->state |= INDEXTOSTATEIMAGEMASK(1);
|
||||
|
||||
while (child)
|
||||
{
|
||||
TREEVIEW_ITEM *next = child->nextSibling;
|
||||
TREEVIEW_ResetImageStateIndex(infoPtr, child);
|
||||
child = next;
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, HDC hdc_ref)
|
||||
{
|
||||
|
@ -2935,6 +2991,17 @@ TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, HDC hdc_ref)
|
|||
|
||||
TRACE("(%p %p)\n", infoPtr, hdc_ref);
|
||||
|
||||
if ((infoPtr->dwStyle & TVS_CHECKBOXES) && !infoPtr->himlState)
|
||||
{
|
||||
TREEVIEW_InitCheckboxes(infoPtr);
|
||||
TREEVIEW_ResetImageStateIndex(infoPtr, infoPtr->root);
|
||||
|
||||
TREEVIEW_EndEditLabelNow(infoPtr, TRUE);
|
||||
TREEVIEW_UpdateSubTree(infoPtr, infoPtr->root);
|
||||
TREEVIEW_UpdateScrollBars(infoPtr);
|
||||
TREEVIEW_Invalidate(infoPtr, NULL);
|
||||
}
|
||||
|
||||
if (hdc_ref)
|
||||
{
|
||||
hdc = hdc_ref;
|
||||
|
@ -3344,7 +3411,7 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
|
|||
TREEVIEW_ITEM *nextItem, *tmpItem;
|
||||
BOOL sendsNotifications;
|
||||
|
||||
TRACE("(%p, %p, partial=%d, %d\n", infoPtr, item, partial, user);
|
||||
TRACE("(%p, %p, partial=%d, %d)\n", infoPtr, item, partial, user);
|
||||
|
||||
if (!TREEVIEW_HasChildren(infoPtr, item))
|
||||
return FALSE;
|
||||
|
@ -4955,46 +5022,6 @@ TREEVIEW_MouseWheel(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
/* Create/Destroy *******************************************************/
|
||||
|
||||
static void
|
||||
TREEVIEW_InitCheckboxes(TREEVIEW_INFO *infoPtr)
|
||||
{
|
||||
RECT rc;
|
||||
HBITMAP hbm, hbmOld;
|
||||
HDC hdc, hdcScreen;
|
||||
int nIndex;
|
||||
|
||||
infoPtr->himlState = ImageList_Create(16, 16, ILC_COLOR | ILC_MASK, 3, 0);
|
||||
|
||||
hdcScreen = GetDC(0);
|
||||
|
||||
hdc = CreateCompatibleDC(hdcScreen);
|
||||
hbm = CreateCompatibleBitmap(hdcScreen, 48, 16);
|
||||
hbmOld = SelectObject(hdc, hbm);
|
||||
|
||||
SetRect(&rc, 0, 0, 48, 16);
|
||||
FillRect(hdc, &rc, (HBRUSH)(COLOR_WINDOW+1));
|
||||
|
||||
SetRect(&rc, 18, 2, 30, 14);
|
||||
DrawFrameControl(hdc, &rc, DFC_BUTTON,
|
||||
DFCS_BUTTONCHECK|DFCS_FLAT);
|
||||
|
||||
SetRect(&rc, 34, 2, 46, 14);
|
||||
DrawFrameControl(hdc, &rc, DFC_BUTTON,
|
||||
DFCS_BUTTONCHECK|DFCS_FLAT|DFCS_CHECKED);
|
||||
|
||||
SelectObject(hdc, hbmOld);
|
||||
nIndex = ImageList_AddMasked(infoPtr->himlState, hbm,
|
||||
comctl32_color.clrWindow);
|
||||
TRACE("checkbox index %d\n", nIndex);
|
||||
|
||||
DeleteObject(hbm);
|
||||
DeleteDC(hdc);
|
||||
ReleaseDC(0, hdcScreen);
|
||||
|
||||
infoPtr->stateImageWidth = 16;
|
||||
infoPtr->stateImageHeight = 16;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||
{
|
||||
|
@ -5093,9 +5120,6 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
|||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
hwnd, 0, 0, 0);
|
||||
|
||||
if (infoPtr->dwStyle & TVS_CHECKBOXES)
|
||||
TREEVIEW_InitCheckboxes(infoPtr);
|
||||
|
||||
/* Make sure actual scrollbar state is consistent with uInternalStatus */
|
||||
ShowScrollBar(hwnd, SB_VERT, FALSE);
|
||||
ShowScrollBar(hwnd, SB_HORZ, FALSE);
|
||||
|
@ -5434,21 +5458,6 @@ TREEVIEW_Size(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void TREEVIEW_ResetImageStateIndex(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item)
|
||||
{
|
||||
TREEVIEW_ITEM *child = item->firstChild;
|
||||
|
||||
item->state &= ~TVIS_STATEIMAGEMASK;
|
||||
item->state |= INDEXTOSTATEIMAGEMASK(1);
|
||||
|
||||
while (child)
|
||||
{
|
||||
TREEVIEW_ITEM *next = child->nextSibling;
|
||||
TREEVIEW_ResetImageStateIndex(infoPtr, child);
|
||||
child = next;
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
TREEVIEW_StyleChanged(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -5492,6 +5501,7 @@ TREEVIEW_StyleChanged(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
infoPtr->dwStyle = dwNewStyle;
|
||||
}
|
||||
|
||||
TREEVIEW_EndEditLabelNow(infoPtr, TRUE);
|
||||
TREEVIEW_UpdateSubTree(infoPtr, infoPtr->root);
|
||||
TREEVIEW_UpdateScrollBars(infoPtr);
|
||||
TREEVIEW_Invalidate(infoPtr, NULL);
|
||||
|
|
|
@ -135,11 +135,16 @@ static BOOL UPDOWN_OffsetVal(UPDOWN_INFO *infoPtr, int delta)
|
|||
(infoPtr->MaxVal < infoPtr->MinVal ? -1 : 1) *
|
||||
(infoPtr->MinVal - infoPtr->MaxVal) +
|
||||
(delta < 0 ? 1 : -1);
|
||||
} else return FALSE;
|
||||
} else if ((infoPtr->MaxVal > infoPtr->MinVal && infoPtr->CurVal+delta > infoPtr->MaxVal)
|
||||
|| (infoPtr->MaxVal < infoPtr->MinVal && infoPtr->CurVal+delta < infoPtr->MaxVal)) {
|
||||
delta = infoPtr->MaxVal - infoPtr->CurVal;
|
||||
} else {
|
||||
delta = infoPtr->MinVal - infoPtr->CurVal;
|
||||
}
|
||||
}
|
||||
|
||||
infoPtr->CurVal += delta;
|
||||
return TRUE;
|
||||
return delta != 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -334,7 +339,7 @@ static BOOL UPDOWN_SetBuddyInt (const UPDOWN_INFO *infoPtr)
|
|||
|
||||
/* if nothing changed exit earlier */
|
||||
GetWindowTextW(infoPtr->Buddy, txt_old, sizeof(txt_old)/sizeof(WCHAR));
|
||||
if (lstrcmpiW(txt_old, txt) == 0) return 0;
|
||||
if (lstrcmpiW(txt_old, txt) == 0) return FALSE;
|
||||
|
||||
return SetWindowTextW(infoPtr->Buddy, txt);
|
||||
}
|
||||
|
@ -462,6 +467,51 @@ static LRESULT UPDOWN_KeyPressed(UPDOWN_INFO *infoPtr, int key)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int UPDOWN_GetPos(UPDOWN_INFO *infoPtr, BOOL *err)
|
||||
{
|
||||
BOOL succ = UPDOWN_GetBuddyInt(infoPtr);
|
||||
int val = infoPtr->CurVal;
|
||||
|
||||
if(!UPDOWN_InBounds(infoPtr, val)) {
|
||||
if((infoPtr->MinVal < infoPtr->MaxVal && val < infoPtr->MinVal)
|
||||
|| (infoPtr->MinVal > infoPtr->MaxVal && val > infoPtr->MinVal))
|
||||
val = infoPtr->MinVal;
|
||||
else
|
||||
val = infoPtr->MaxVal;
|
||||
|
||||
succ = FALSE;
|
||||
}
|
||||
|
||||
if(err) *err = !succ;
|
||||
return val;
|
||||
}
|
||||
|
||||
static int UPDOWN_SetPos(UPDOWN_INFO *infoPtr, int pos)
|
||||
{
|
||||
int ret = infoPtr->CurVal;
|
||||
|
||||
if(!UPDOWN_InBounds(infoPtr, pos)) {
|
||||
if((infoPtr->MinVal < infoPtr->MaxVal && pos < infoPtr->MinVal)
|
||||
|| (infoPtr->MinVal > infoPtr->MaxVal && pos > infoPtr->MinVal))
|
||||
pos = infoPtr->MinVal;
|
||||
else
|
||||
pos = infoPtr->MaxVal;
|
||||
}
|
||||
|
||||
infoPtr->CurVal = pos;
|
||||
UPDOWN_SetBuddyInt(infoPtr);
|
||||
|
||||
if(!UPDOWN_InBounds(infoPtr, ret)) {
|
||||
if((infoPtr->MinVal < infoPtr->MaxVal && ret < infoPtr->MinVal)
|
||||
|| (infoPtr->MinVal > infoPtr->MaxVal && ret > infoPtr->MinVal))
|
||||
ret = infoPtr->MinVal;
|
||||
else
|
||||
ret = infoPtr->MaxVal;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* UPDOWN_SetRange
|
||||
*
|
||||
|
@ -1044,22 +1094,15 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
|
|||
|
||||
case UDM_GETPOS:
|
||||
{
|
||||
BOOL ret = UPDOWN_GetBuddyInt (infoPtr);
|
||||
return MAKELONG(infoPtr->CurVal, ret ? 0 : 1);
|
||||
BOOL err;
|
||||
int pos;
|
||||
|
||||
pos = UPDOWN_GetPos(infoPtr, &err);
|
||||
return MAKELONG(pos, err);
|
||||
}
|
||||
case UDM_SETPOS:
|
||||
{
|
||||
int temp = (short)LOWORD(lParam);
|
||||
|
||||
TRACE("UpDown Ctrl new value(%d), hwnd=%p\n", temp, hwnd);
|
||||
if(!UPDOWN_InBounds(infoPtr, temp)) {
|
||||
if(temp < infoPtr->MinVal) temp = infoPtr->MinVal;
|
||||
if(temp > infoPtr->MaxVal) temp = infoPtr->MaxVal;
|
||||
}
|
||||
wParam = infoPtr->CurVal;
|
||||
infoPtr->CurVal = temp;
|
||||
UPDOWN_SetBuddyInt (infoPtr);
|
||||
return wParam; /* return prev value */
|
||||
return UPDOWN_SetPos(infoPtr, (short)LOWORD(lParam));
|
||||
}
|
||||
case UDM_GETRANGE:
|
||||
return MAKELONG(infoPtr->MaxVal, infoPtr->MinVal);
|
||||
|
@ -1083,22 +1126,11 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
|
|||
|
||||
case UDM_GETPOS32:
|
||||
{
|
||||
BOOL ret = UPDOWN_GetBuddyInt (infoPtr);
|
||||
if ((LPBOOL)lParam) *((LPBOOL)lParam) = !ret;
|
||||
return infoPtr->CurVal;
|
||||
return UPDOWN_GetPos(infoPtr, (BOOL*)lParam);
|
||||
}
|
||||
case UDM_SETPOS32:
|
||||
{
|
||||
int temp;
|
||||
|
||||
if(!UPDOWN_InBounds(infoPtr, (int)lParam)) {
|
||||
if((int)lParam < infoPtr->MinVal) lParam = infoPtr->MinVal;
|
||||
if((int)lParam > infoPtr->MaxVal) lParam = infoPtr->MaxVal;
|
||||
}
|
||||
temp = infoPtr->CurVal; /* save prev value */
|
||||
infoPtr->CurVal = (int)lParam; /* set the new value */
|
||||
UPDOWN_SetBuddyInt (infoPtr);
|
||||
return temp; /* return prev value */
|
||||
return UPDOWN_SetPos(infoPtr, (int)lParam);
|
||||
}
|
||||
case UDM_GETUNICODEFORMAT:
|
||||
/* we lie a bit here, we're always using Unicode internally */
|
||||
|
|
|
@ -60,7 +60,7 @@ reactos/dll/win32/browseui # Out of sync
|
|||
reactos/dll/win32/cabinet # Synced to Wine-1.7.17
|
||||
reactos/dll/win32/clusapi # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/comcat # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/comctl32 # Synced to Wine 1.7.1
|
||||
reactos/dll/win32/comctl32 # Synced to Wine 1.7.17
|
||||
reactos/dll/win32/comdlg32 # Synced to Wine 1.7.1
|
||||
reactos/dll/win32/compstui # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/credui # Synced to Wine-1.7.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue