mirror of
https://github.com/reactos/reactos.git
synced 2025-06-19 00:55:19 +00:00
[COMCTL32] Sync with Wine Staging 2.2. CORE-12823
cc055c4 comctl32: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications. (v2) 83cde06 comctl32/propsheet: Implement PSM_SETHEADERSUBTITLE. ce9c06b comctl32/propsheet: Implement PSM_SETHEADERTITLE. 1a750f7 comctl32/propsheet: Add helpers to do string duplication. 14a6c98 comctl32/pager: Don't block window size changes. a6661ba comctl32/propsheet: Added PSM_INSERTPAGE implementation. 34dd326 comctl32/propsheet: Only use header bitmap when asked for it. 6eafebe comctl32/propsheet: Force wizard header if any of pages has title/subtitle. 70c9a96 comctl32: Fix some more spec file entries. 2dd0fb8 comctl32: Correctly set the colour table for ILC_COLOR4 and ILC_COLOR8 imagelists. a0e73a1 comctl32/syslink: Don't use exported StrCmpNIW(). 970029b comctl32/toolbar: Fix TB_SETDRAWTEXTFLAGS handler. 99913e8 comctl32: Fix some spec file entries. 9d404dd comctl32/propsheet: Double size of a template buffer passed to PSCB_PRECREATE. bb1d68e comctl32/trackbar: Fix TBM_SETRANGEMAX handling when new limit is less than current min boundary. 26067cc comctl32/toolbar: Protect from NULL pointer access in TB_GETBUTTONINFOW handler. a6aabe0 comctl32/trackbar: Update thumb unconditionally on TBM_SETTICFREQ. c7c8994 comctl32: Recompute the text width if necessary. 3ed6ba5 comctl32: Set the text and bkgnd colours to the default before the item pre-paint notification. 8915404 comctl32: Use wine_dbgstr_point in TRACES. svn path=/trunk/; revision=74090
This commit is contained in:
parent
07ecda8b60
commit
9ce65ea71e
13 changed files with 330 additions and 319 deletions
|
@ -1,12 +1,12 @@
|
||||||
2 stdcall MenuHelp(long long long long long long ptr)
|
2 stdcall MenuHelp(long long long long long long ptr)
|
||||||
3 stdcall ShowHideMenuCtl(long long ptr)
|
3 stdcall ShowHideMenuCtl(long long ptr)
|
||||||
4 stdcall GetEffectiveClientRect(long long long)
|
4 stdcall GetEffectiveClientRect(long ptr ptr)
|
||||||
5 stdcall DrawStatusTextA(long ptr str long)
|
5 stdcall DrawStatusTextA(long ptr str long)
|
||||||
6 stdcall CreateStatusWindowA(long str long long)
|
6 stdcall CreateStatusWindowA(long str long long)
|
||||||
7 stdcall CreateToolbar(long long long long long long ptr long)
|
7 stdcall CreateToolbar(long long long long long long ptr long)
|
||||||
8 stdcall CreateMappedBitmap(long long long ptr long)
|
8 stdcall CreateMappedBitmap(long long long ptr long)
|
||||||
9 stdcall -noname DPA_LoadStream(ptr ptr ptr long)
|
9 stdcall -noname DPA_LoadStream(ptr ptr ptr ptr)
|
||||||
10 stdcall -noname DPA_SaveStream(ptr ptr ptr long)
|
10 stdcall -noname DPA_SaveStream(ptr ptr ptr ptr)
|
||||||
11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
|
11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
|
||||||
12 stdcall CreatePropertySheetPage(ptr) CreatePropertySheetPageA
|
12 stdcall CreatePropertySheetPage(ptr) CreatePropertySheetPageA
|
||||||
13 stdcall MakeDragList(long)
|
13 stdcall MakeDragList(long)
|
||||||
|
@ -105,10 +105,10 @@
|
||||||
236 stdcall -ordinal Str_SetPtrW(wstr wstr)
|
236 stdcall -ordinal Str_SetPtrW(wstr wstr)
|
||||||
320 stdcall -ordinal DSA_Create(long long)
|
320 stdcall -ordinal DSA_Create(long long)
|
||||||
321 stdcall -ordinal DSA_Destroy(ptr)
|
321 stdcall -ordinal DSA_Destroy(ptr)
|
||||||
322 stdcall -noname DSA_GetItem(ptr long long)
|
322 stdcall -noname DSA_GetItem(ptr long ptr)
|
||||||
323 stdcall -ordinal DSA_GetItemPtr(ptr long)
|
323 stdcall -ordinal DSA_GetItemPtr(ptr long)
|
||||||
324 stdcall -ordinal DSA_InsertItem(ptr long long)
|
324 stdcall -ordinal DSA_InsertItem(ptr long ptr)
|
||||||
325 stdcall -noname DSA_SetItem (ptr long long)
|
325 stdcall -noname DSA_SetItem (ptr long ptr)
|
||||||
326 stdcall -noname DSA_DeleteItem(ptr long)
|
326 stdcall -noname DSA_DeleteItem(ptr long)
|
||||||
327 stdcall -ordinal DSA_DeleteAllItems(ptr)
|
327 stdcall -ordinal DSA_DeleteAllItems(ptr)
|
||||||
328 stdcall -ordinal DPA_Create(long)
|
328 stdcall -ordinal DPA_Create(long)
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
340 stdcall -noname DPA_CreateEx(long long)
|
340 stdcall -noname DPA_CreateEx(long long)
|
||||||
341 stdcall -noname SendNotify(long long long ptr)
|
341 stdcall -noname SendNotify(long long long ptr)
|
||||||
342 stdcall -noname SendNotifyEx(long long long ptr long)
|
342 stdcall -noname SendNotifyEx(long long long ptr long)
|
||||||
350 stdcall -noname -private StrChrA(str str)
|
350 stdcall -noname -private StrChrA(str long)
|
||||||
351 stdcall -noname -private StrRChrA(str str long)
|
351 stdcall -noname -private StrRChrA(str str long)
|
||||||
352 stdcall -noname -private StrCmpNA(str str long)
|
352 stdcall -noname -private StrCmpNA(str str long)
|
||||||
353 stdcall -noname -private StrCmpNIA(str str long)
|
353 stdcall -noname -private StrCmpNIA(str str long)
|
||||||
|
@ -155,10 +155,10 @@
|
||||||
382 stdcall -noname SmoothScrollWindow(ptr)
|
382 stdcall -noname SmoothScrollWindow(ptr)
|
||||||
383 stdcall -noname DoReaderMode(ptr)
|
383 stdcall -noname DoReaderMode(ptr)
|
||||||
384 stdcall -noname SetPathWordBreakProc(ptr long)
|
384 stdcall -noname SetPathWordBreakProc(ptr long)
|
||||||
385 stdcall -ordinal DPA_EnumCallback(long long long)
|
385 stdcall -ordinal DPA_EnumCallback(ptr ptr ptr)
|
||||||
386 stdcall -ordinal DPA_DestroyCallback(ptr ptr long)
|
386 stdcall -ordinal DPA_DestroyCallback(ptr ptr ptr)
|
||||||
387 stdcall -noname DSA_EnumCallback(ptr ptr long)
|
387 stdcall -noname DSA_EnumCallback(ptr ptr ptr)
|
||||||
388 stdcall -ordinal DSA_DestroyCallback(ptr ptr long)
|
388 stdcall -ordinal DSA_DestroyCallback(ptr ptr ptr)
|
||||||
#389 CControl::v_OnNotify
|
#389 CControl::v_OnNotify
|
||||||
390 stdcall -noname ImageList_SetColorTable(ptr long long ptr)
|
390 stdcall -noname ImageList_SetColorTable(ptr long long ptr)
|
||||||
400 stdcall -ordinal CreateMRUListW(ptr)
|
400 stdcall -ordinal CreateMRUListW(ptr)
|
||||||
|
|
|
@ -804,7 +804,7 @@ DATETIME_HitTest (const DATETIME_INFO *infoPtr, POINT pt)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
TRACE ("%d, %d\n", pt.x, pt.y);
|
TRACE ("%s\n", wine_dbgstr_point(&pt));
|
||||||
|
|
||||||
if (PtInRect (&infoPtr->calbutton, pt)) return DTHT_MCPOPUP;
|
if (PtInRect (&infoPtr->calbutton, pt)) return DTHT_MCPOPUP;
|
||||||
if (PtInRect (&infoPtr->checkbox, pt)) return DTHT_CHECKBOX;
|
if (PtInRect (&infoPtr->checkbox, pt)) return DTHT_CHECKBOX;
|
||||||
|
|
|
@ -72,6 +72,7 @@ struct _IMAGELIST
|
||||||
INT cInitial;
|
INT cInitial;
|
||||||
UINT uBitsPixel;
|
UINT uBitsPixel;
|
||||||
char *has_alpha;
|
char *has_alpha;
|
||||||
|
BOOL color_table_set;
|
||||||
|
|
||||||
LONG ref; /* reference count */
|
LONG ref; /* reference count */
|
||||||
};
|
};
|
||||||
|
@ -298,6 +299,9 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT WINAPI
|
||||||
|
ImageList_SetColorTable(HIMAGELIST himl, UINT uStartIndex, UINT cEntries, const RGBQUAD *prgb);
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* IMAGELIST_InternalExpandBitmaps [Internal]
|
* IMAGELIST_InternalExpandBitmaps [Internal]
|
||||||
*
|
*
|
||||||
|
@ -420,7 +424,8 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
|
||||||
|
|
||||||
nImageCount = bmp.bmWidth / himl->cx;
|
nImageCount = bmp.bmWidth / himl->cx;
|
||||||
|
|
||||||
TRACE("%p has %d images (%d x %d)\n", hbmImage, nImageCount, bmp.bmWidth, bmp.bmHeight);
|
TRACE("%p has %d images (%d x %d) bpp %d\n", hbmImage, nImageCount, bmp.bmWidth, bmp.bmHeight,
|
||||||
|
bmp.bmBitsPixel);
|
||||||
|
|
||||||
IMAGELIST_InternalExpandBitmaps(himl, nImageCount);
|
IMAGELIST_InternalExpandBitmaps(himl, nImageCount);
|
||||||
|
|
||||||
|
@ -438,6 +443,14 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
|
||||||
SelectObject(hdcTemp, hbmMask);
|
SelectObject(hdcTemp, hbmMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (himl->uBitsPixel <= 8 && bmp.bmBitsPixel <= 8 &&
|
||||||
|
!himl->color_table_set && himl->cCurImage == 0)
|
||||||
|
{
|
||||||
|
RGBQUAD colors[256];
|
||||||
|
UINT num = GetDIBColorTable( hdcBitmap, 0, 1 << bmp.bmBitsPixel, colors );
|
||||||
|
if (num) ImageList_SetColorTable( himl, 0, num, colors );
|
||||||
|
}
|
||||||
|
|
||||||
for (i=0; i<nImageCount; i++)
|
for (i=0; i<nImageCount; i++)
|
||||||
{
|
{
|
||||||
imagelist_point_from_index( himl, himl->cCurImage + i, &pt );
|
imagelist_point_from_index( himl, himl->cCurImage + i, &pt );
|
||||||
|
@ -787,6 +800,7 @@ ImageList_Create (INT cx, INT cy, UINT flags,
|
||||||
himl->cGrow = cGrow;
|
himl->cGrow = cGrow;
|
||||||
himl->clrFg = CLR_DEFAULT;
|
himl->clrFg = CLR_DEFAULT;
|
||||||
himl->clrBk = CLR_NONE;
|
himl->clrBk = CLR_NONE;
|
||||||
|
himl->color_table_set = FALSE;
|
||||||
|
|
||||||
/* initialize overlay mask indices */
|
/* initialize overlay mask indices */
|
||||||
for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++)
|
for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++)
|
||||||
|
@ -3218,11 +3232,25 @@ static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count)
|
||||||
bmi->bmiHeader.biCompression = BI_RGB;
|
bmi->bmiHeader.biCompression = BI_RGB;
|
||||||
|
|
||||||
if (himl->uBitsPixel <= ILC_COLOR8)
|
if (himl->uBitsPixel <= ILC_COLOR8)
|
||||||
|
{
|
||||||
|
if (!himl->color_table_set)
|
||||||
{
|
{
|
||||||
/* retrieve the default color map */
|
/* retrieve the default color map */
|
||||||
HBITMAP tmp = CreateBitmap( 1, 1, 1, 1, NULL );
|
HBITMAP tmp = CreateBitmap( 1, 1, 1, 1, NULL );
|
||||||
GetDIBits( hdc, tmp, 0, 0, NULL, bmi, DIB_RGB_COLORS );
|
GetDIBits( hdc, tmp, 0, 0, NULL, bmi, DIB_RGB_COLORS );
|
||||||
DeleteObject( tmp );
|
DeleteObject( tmp );
|
||||||
|
if (ilc == ILC_COLOR4)
|
||||||
|
{
|
||||||
|
RGBQUAD tmp;
|
||||||
|
tmp = bmi->bmiColors[7];
|
||||||
|
bmi->bmiColors[7] = bmi->bmiColors[8];
|
||||||
|
bmi->bmiColors[8] = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetDIBColorTable(himl->hdcImage, 0, 1 << himl->uBitsPixel, bmi->bmiColors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hbmNewBitmap = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, NULL, 0, 0);
|
hbmNewBitmap = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -3258,6 +3286,8 @@ static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count)
|
||||||
UINT WINAPI
|
UINT WINAPI
|
||||||
ImageList_SetColorTable(HIMAGELIST himl, UINT uStartIndex, UINT cEntries, const RGBQUAD *prgb)
|
ImageList_SetColorTable(HIMAGELIST himl, UINT uStartIndex, UINT cEntries, const RGBQUAD *prgb)
|
||||||
{
|
{
|
||||||
|
TRACE("(%p, %d, %d, %p)\n", himl, uStartIndex, cEntries, prgb);
|
||||||
|
himl->color_table_set = TRUE;
|
||||||
return SetDIBColorTable(himl->hdcImage, uStartIndex, cEntries, prgb);
|
return SetDIBColorTable(himl->hdcImage, uStartIndex, cEntries, prgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2157,7 +2157,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
|
|
||||||
hit = MONTHCAL_HitTest(infoPtr, &ht);
|
hit = MONTHCAL_HitTest(infoPtr, &ht);
|
||||||
|
|
||||||
TRACE("%x at (%d, %d)\n", hit, ht.pt.x, ht.pt.y);
|
TRACE("%x at %s\n", hit, wine_dbgstr_point(&ht.pt));
|
||||||
|
|
||||||
switch(hit)
|
switch(hit)
|
||||||
{
|
{
|
||||||
|
|
|
@ -379,34 +379,6 @@ PAGER_SetPos(PAGER_INFO* infoPtr, INT newPos, BOOL fromBtnPress)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LRESULT
|
|
||||||
PAGER_WindowPosChanging(PAGER_INFO* infoPtr, WINDOWPOS *winpos)
|
|
||||||
{
|
|
||||||
if ((infoPtr->dwStyle & CCS_NORESIZE) && !(winpos->flags & SWP_NOSIZE))
|
|
||||||
{
|
|
||||||
/* don't let the app resize the nonscrollable dimension of a control
|
|
||||||
* that was created with CCS_NORESIZE style
|
|
||||||
* (i.e. height for a horizontal pager, or width for a vertical one) */
|
|
||||||
|
|
||||||
/* except if the current dimension is 0 and app is setting for
|
|
||||||
* first time, then save amount as dimension. - GA 8/01 */
|
|
||||||
|
|
||||||
if (infoPtr->dwStyle & PGS_HORZ)
|
|
||||||
if (!infoPtr->nHeight && winpos->cy)
|
|
||||||
infoPtr->nHeight = winpos->cy;
|
|
||||||
else
|
|
||||||
winpos->cy = infoPtr->nHeight;
|
|
||||||
else
|
|
||||||
if (!infoPtr->nWidth && winpos->cx)
|
|
||||||
infoPtr->nWidth = winpos->cx;
|
|
||||||
else
|
|
||||||
winpos->cx = infoPtr->nWidth;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return DefWindowProcW (infoPtr->hwndSelf, WM_WINDOWPOSCHANGING, 0, (LPARAM)winpos);
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* For the PGM_RECALCSIZE message (but not the other uses in *
|
* For the PGM_RECALCSIZE message (but not the other uses in *
|
||||||
* this module), the native control does only the following: *
|
* this module), the native control does only the following: *
|
||||||
|
@ -1027,6 +999,8 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PAGER_INFO *infoPtr = (PAGER_INFO *)GetWindowLongPtrW(hwnd, 0);
|
PAGER_INFO *infoPtr = (PAGER_INFO *)GetWindowLongPtrW(hwnd, 0);
|
||||||
|
|
||||||
|
TRACE("(%p, %#x, %#lx, %#lx)\n", hwnd, uMsg, wParam, lParam);
|
||||||
|
|
||||||
if (!infoPtr && (uMsg != WM_CREATE))
|
if (!infoPtr && (uMsg != WM_CREATE))
|
||||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||||
|
|
||||||
|
@ -1085,9 +1059,6 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_NCPAINT:
|
case WM_NCPAINT:
|
||||||
return PAGER_NCPaint (infoPtr, (HRGN)wParam);
|
return PAGER_NCPaint (infoPtr, (HRGN)wParam);
|
||||||
|
|
||||||
case WM_WINDOWPOSCHANGING:
|
|
||||||
return PAGER_WindowPosChanging (infoPtr, (WINDOWPOS*)lParam);
|
|
||||||
|
|
||||||
case WM_STYLECHANGED:
|
case WM_STYLECHANGED:
|
||||||
return PAGER_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
|
return PAGER_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,7 @@
|
||||||
* - Wizard 97 header resizing
|
* - Wizard 97 header resizing
|
||||||
* - Enforcing of minimal wizard size
|
* - Enforcing of minimal wizard size
|
||||||
* - Messages:
|
* - Messages:
|
||||||
* o PSM_INSERTPAGE
|
|
||||||
* o PSM_RECALCPAGESIZES
|
* o PSM_RECALCPAGESIZES
|
||||||
* o PSM_SETHEADERSUBTITLE
|
|
||||||
* o PSM_SETHEADERTITLE
|
|
||||||
* o WM_HELP
|
* o WM_HELP
|
||||||
* o WM_CONTEXTMENU
|
* o WM_CONTEXTMENU
|
||||||
* - Notifications:
|
* - Notifications:
|
||||||
|
@ -156,13 +153,32 @@ static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psI
|
||||||
static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheetInfo* psInfo);
|
static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheetInfo* psInfo);
|
||||||
static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID);
|
static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID);
|
||||||
static BOOL PROPSHEET_RemovePage(HWND hwndDlg, int index, HPROPSHEETPAGE hpage);
|
static BOOL PROPSHEET_RemovePage(HWND hwndDlg, int index, HPROPSHEETPAGE hpage);
|
||||||
static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage);
|
|
||||||
|
|
||||||
static INT_PTR CALLBACK
|
static INT_PTR CALLBACK
|
||||||
PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(propsheet);
|
WINE_DEFAULT_DEBUG_CHANNEL(propsheet);
|
||||||
|
|
||||||
|
static WCHAR *heap_strdupW(const WCHAR *str)
|
||||||
|
{
|
||||||
|
int len = strlenW(str) + 1;
|
||||||
|
WCHAR *ret = Alloc(len * sizeof(WCHAR));
|
||||||
|
strcpyW(ret, str);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static WCHAR *heap_strdupAtoW(const char *str)
|
||||||
|
{
|
||||||
|
WCHAR *ret;
|
||||||
|
INT len;
|
||||||
|
|
||||||
|
len = MultiByteToWideChar(CP_ACP, 0, str, -1, 0, 0);
|
||||||
|
ret = Alloc(len * sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#define add_flag(a) if (dwFlags & a) {strcat(string, #a );strcat(string," ");}
|
#define add_flag(a) if (dwFlags & a) {strcat(string, #a );strcat(string," ");}
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_UnImplementedFlags
|
* PROPSHEET_UnImplementedFlags
|
||||||
|
@ -255,23 +271,6 @@ static INT PROPSHEET_FindPageByResId(const PropSheetInfo * psInfo, LRESULT resId
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* PROPSHEET_AtoW
|
|
||||||
*
|
|
||||||
* Convert ASCII to Unicode since all data is saved as Unicode.
|
|
||||||
*/
|
|
||||||
static void PROPSHEET_AtoW(LPCWSTR *tostr, LPCSTR frstr)
|
|
||||||
{
|
|
||||||
INT len;
|
|
||||||
WCHAR *to;
|
|
||||||
|
|
||||||
TRACE("<%s>\n", frstr);
|
|
||||||
len = MultiByteToWideChar(CP_ACP, 0, frstr, -1, 0, 0);
|
|
||||||
to = Alloc(len * sizeof(WCHAR));
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, frstr, -1, to, len);
|
|
||||||
*tostr = to;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_CollectSheetInfoCommon
|
* PROPSHEET_CollectSheetInfoCommon
|
||||||
*
|
*
|
||||||
|
@ -360,12 +359,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE(lppsh->pszCaption))
|
if (!IS_INTRESOURCE(lppsh->pszCaption))
|
||||||
{
|
psInfo->ppshheader.pszCaption = heap_strdupW( lppsh->pszCaption );
|
||||||
int len = strlenW(lppsh->pszCaption);
|
|
||||||
WCHAR *caption = Alloc( (len+1)*sizeof(WCHAR) );
|
|
||||||
|
|
||||||
psInfo->ppshheader.pszCaption = strcpyW( caption, lppsh->pszCaption );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
psInfo->nPages = lppsh->nPages;
|
psInfo->nPages = lppsh->nPages;
|
||||||
|
|
||||||
|
@ -471,6 +465,9 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
|
||||||
width = (WORD)*p; p++;
|
width = (WORD)*p; p++;
|
||||||
height = (WORD)*p; p++;
|
height = (WORD)*p; p++;
|
||||||
|
|
||||||
|
if (lppsp->dwFlags & (PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE))
|
||||||
|
psInfo->ppshheader.dwFlags |= PSH_HEADER;
|
||||||
|
|
||||||
/* Special calculation for interior wizard pages so the largest page is
|
/* Special calculation for interior wizard pages so the largest page is
|
||||||
* calculated correctly. We need to add all the padding and space occupied
|
* calculated correctly. We need to add all the padding and space occupied
|
||||||
* by the header so the width and height sums up to the whole wizard client
|
* by the header so the width and height sums up to the whole wizard client
|
||||||
|
@ -535,8 +532,6 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
|
||||||
WCHAR szTitle[256];
|
WCHAR szTitle[256];
|
||||||
const WCHAR *pTitle;
|
const WCHAR *pTitle;
|
||||||
static const WCHAR pszNull[] = { '(','n','u','l','l',')',0 };
|
static const WCHAR pszNull[] = { '(','n','u','l','l',')',0 };
|
||||||
WCHAR *text;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
if (IS_INTRESOURCE( lppsp->pszTitle ))
|
if (IS_INTRESOURCE( lppsp->pszTitle ))
|
||||||
{
|
{
|
||||||
|
@ -550,9 +545,7 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
|
||||||
else
|
else
|
||||||
pTitle = lppsp->pszTitle;
|
pTitle = lppsp->pszTitle;
|
||||||
|
|
||||||
len = strlenW(pTitle);
|
psInfo->proppage[index].pszText = heap_strdupW( pTitle );
|
||||||
text = Alloc( (len+1)*sizeof (WCHAR) );
|
|
||||||
psInfo->proppage[index].pszText = strcpyW( text, pTitle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -624,7 +617,7 @@ static INT_PTR PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
|
||||||
*/
|
*/
|
||||||
resSize = SizeofResource(COMCTL32_hModule, hRes);
|
resSize = SizeofResource(COMCTL32_hModule, hRes);
|
||||||
|
|
||||||
temp = Alloc(resSize);
|
temp = Alloc(2 * resSize);
|
||||||
|
|
||||||
if (!temp)
|
if (!temp)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -2226,16 +2219,108 @@ static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg,
|
||||||
return msgResult;
|
return msgResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* PROPSHEET_InsertPage
|
||||||
|
*/
|
||||||
|
static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage)
|
||||||
|
{
|
||||||
|
PropSheetInfo *psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
||||||
|
PropPageInfo *ppi, *prev_ppi = psInfo->proppage;
|
||||||
|
HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
|
||||||
|
LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
|
||||||
|
TCITEMW item;
|
||||||
|
int index;
|
||||||
|
|
||||||
|
TRACE("hwndDlg %p, hpageInsertAfter %p, hpage %p\n", hwndDlg, hpageInsertAfter, hpage);
|
||||||
|
|
||||||
|
if (IS_INTRESOURCE(hpageInsertAfter))
|
||||||
|
index = LOWORD(hpageInsertAfter);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
index = PROPSHEET_GetPageIndex(hpageInsertAfter, psInfo, -1);
|
||||||
|
if (index < 0)
|
||||||
|
{
|
||||||
|
TRACE("Could not find page to insert after!\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index > psInfo->nPages)
|
||||||
|
index = psInfo->nPages;
|
||||||
|
|
||||||
|
ppi = Alloc(sizeof(PropPageInfo) * (psInfo->nPages + 1));
|
||||||
|
if (!ppi)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fill in a new PropPageInfo entry.
|
||||||
|
*/
|
||||||
|
if (index > 0)
|
||||||
|
memcpy(ppi, prev_ppi, index * sizeof(PropPageInfo));
|
||||||
|
memset(&ppi[index], 0, sizeof(PropPageInfo));
|
||||||
|
if (index < psInfo->nPages)
|
||||||
|
memcpy(&ppi[index + 1], &prev_ppi[index], (psInfo->nPages - index) * sizeof(PropPageInfo));
|
||||||
|
psInfo->proppage = ppi;
|
||||||
|
|
||||||
|
if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, index, FALSE))
|
||||||
|
{
|
||||||
|
psInfo->proppage = prev_ppi;
|
||||||
|
Free(ppi);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
psInfo->proppage[index].hpage = hpage;
|
||||||
|
|
||||||
|
if (ppsp->dwFlags & PSP_PREMATURE)
|
||||||
|
{
|
||||||
|
/* Create the page but don't show it */
|
||||||
|
if (!PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppsp))
|
||||||
|
{
|
||||||
|
psInfo->proppage = prev_ppi;
|
||||||
|
Free(ppi);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Free(prev_ppi);
|
||||||
|
psInfo->nPages++;
|
||||||
|
if (index <= psInfo->active_page)
|
||||||
|
psInfo->active_page++;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add a new tab to the tab control.
|
||||||
|
*/
|
||||||
|
item.mask = TCIF_TEXT;
|
||||||
|
item.pszText = (LPWSTR) psInfo->proppage[index].pszText;
|
||||||
|
item.cchTextMax = MAX_TABTEXT_LENGTH;
|
||||||
|
|
||||||
|
if (psInfo->hImageList)
|
||||||
|
SendMessageW(hwndTabControl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
|
||||||
|
|
||||||
|
if (psInfo->proppage[index].hasIcon)
|
||||||
|
{
|
||||||
|
item.mask |= TCIF_IMAGE;
|
||||||
|
item.iImage = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
SendMessageW(hwndTabControl, TCM_INSERTITEMW, index, (LPARAM)&item);
|
||||||
|
|
||||||
|
/* If it is the only page - show it */
|
||||||
|
if (psInfo->nPages == 1)
|
||||||
|
PROPSHEET_SetCurSel(hwndDlg, 0, 1, 0);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_AddPage
|
* PROPSHEET_AddPage
|
||||||
*/
|
*/
|
||||||
static BOOL PROPSHEET_AddPage(HWND hwndDlg,
|
static BOOL PROPSHEET_AddPage(HWND hwndDlg, HPROPSHEETPAGE hpage)
|
||||||
HPROPSHEETPAGE hpage)
|
|
||||||
{
|
{
|
||||||
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
||||||
TRACE("hpage %p\n", hpage);
|
TRACE("hwndDlg %p, hpage %p\n", hwndDlg, hpage);
|
||||||
return PROPSHEET_InsertPage(hwndDlg, (HPROPSHEETPAGE)(ULONG_PTR)psInfo->nPages, hpage);
|
return PROPSHEET_InsertPage(hwndDlg, UlongToPtr(psInfo->nPages), hpage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -2418,136 +2503,76 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* PROPSHEET_InsertPage
|
|
||||||
*/
|
|
||||||
static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter, HPROPSHEETPAGE hpage)
|
|
||||||
{
|
|
||||||
PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
|
||||||
PropPageInfo * ppi, * prev_ppi = psInfo->proppage;
|
|
||||||
HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
|
|
||||||
LPCPROPSHEETPAGEW ppsp = (LPCPROPSHEETPAGEW)hpage;
|
|
||||||
TCITEMW item;
|
|
||||||
int index;
|
|
||||||
|
|
||||||
TRACE("hwndDlg %p, hpageInsertAfter %p, hpage %p\n", hwndDlg, hpageInsertAfter, hpage);
|
|
||||||
|
|
||||||
if (IS_INTRESOURCE(hpageInsertAfter))
|
|
||||||
index = LOWORD(hpageInsertAfter);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
index = PROPSHEET_GetPageIndex(hpageInsertAfter, psInfo, -1);
|
|
||||||
if (index < 0)
|
|
||||||
{
|
|
||||||
TRACE("Could not find page to insert after!\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (index > psInfo->nPages)
|
|
||||||
index = psInfo->nPages;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Allocate a new PropPageInfo entry.
|
|
||||||
*/
|
|
||||||
ppi = Alloc(sizeof(PropPageInfo) * (psInfo->nPages + 1));
|
|
||||||
if (!ppi)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Fill in a new PropPageInfo entry.
|
|
||||||
*/
|
|
||||||
if (index > 0)
|
|
||||||
memcpy(ppi, prev_ppi, index * sizeof(PropPageInfo));
|
|
||||||
memset(&ppi[index], 0, sizeof(PropPageInfo));
|
|
||||||
if (index < psInfo->nPages)
|
|
||||||
memcpy(&ppi[index + 1], &prev_ppi[index], (psInfo->nPages - index) * sizeof(PropPageInfo));
|
|
||||||
psInfo->proppage = ppi;
|
|
||||||
|
|
||||||
if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, index, FALSE))
|
|
||||||
{
|
|
||||||
psInfo->proppage = prev_ppi;
|
|
||||||
Free(ppi);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
psInfo->proppage[index].hpage = hpage;
|
|
||||||
|
|
||||||
if (ppsp->dwFlags & PSP_PREMATURE)
|
|
||||||
{
|
|
||||||
/* Create the page but don't show it */
|
|
||||||
if(!PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppsp))
|
|
||||||
{
|
|
||||||
psInfo->proppage = prev_ppi;
|
|
||||||
Free(ppi);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Free(prev_ppi);
|
|
||||||
psInfo->nPages++;
|
|
||||||
if (index <= psInfo->active_page)
|
|
||||||
psInfo->active_page++;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add a new tab to the tab control.
|
|
||||||
*/
|
|
||||||
item.mask = TCIF_TEXT;
|
|
||||||
item.pszText = (LPWSTR) psInfo->proppage[index].pszText;
|
|
||||||
item.cchTextMax = MAX_TABTEXT_LENGTH;
|
|
||||||
|
|
||||||
if (psInfo->hImageList)
|
|
||||||
{
|
|
||||||
SendMessageW(hwndTabControl, TCM_SETIMAGELIST, 0, (LPARAM)psInfo->hImageList);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (psInfo->proppage[index].hasIcon)
|
|
||||||
{
|
|
||||||
item.mask |= TCIF_IMAGE;
|
|
||||||
item.iImage = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
SendMessageW(hwndTabControl, TCM_INSERTITEMW, index,
|
|
||||||
(LPARAM)&item);
|
|
||||||
|
|
||||||
/* If it is the only page - show it */
|
|
||||||
if (psInfo->nPages == 1)
|
|
||||||
PROPSHEET_SetCurSel(hwndDlg, 0, 1, 0);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_SetHeaderTitleW
|
* PROPSHEET_SetHeaderTitleW
|
||||||
*/
|
*/
|
||||||
static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, int iPageIndex, LPCWSTR pszHeaderTitle)
|
static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, UINT page_index, const WCHAR *title)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_w(pszHeaderTitle));
|
PropSheetInfo *psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
||||||
|
PROPSHEETPAGEW *page;
|
||||||
|
|
||||||
|
TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_w(title));
|
||||||
|
|
||||||
|
if (page_index >= psInfo->nPages)
|
||||||
|
return;
|
||||||
|
|
||||||
|
page = (PROPSHEETPAGEW *)psInfo->proppage[page_index].hpage;
|
||||||
|
|
||||||
|
if (!IS_INTRESOURCE(page->pszHeaderTitle))
|
||||||
|
Free((void *)page->pszHeaderTitle);
|
||||||
|
|
||||||
|
page->pszHeaderTitle = heap_strdupW(title);
|
||||||
|
page->dwFlags |= PSP_USEHEADERTITLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_SetHeaderTitleA
|
* PROPSHEET_SetHeaderTitleA
|
||||||
*/
|
*/
|
||||||
static void PROPSHEET_SetHeaderTitleA(HWND hwndDlg, int iPageIndex, LPCSTR pszHeaderTitle)
|
static void PROPSHEET_SetHeaderTitleA(HWND hwndDlg, UINT page_index, const char *title)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_a(pszHeaderTitle));
|
WCHAR *titleW;
|
||||||
|
|
||||||
|
TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_a(title));
|
||||||
|
|
||||||
|
titleW = heap_strdupAtoW(title);
|
||||||
|
PROPSHEET_SetHeaderTitleW(hwndDlg, page_index, titleW);
|
||||||
|
Free(titleW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_SetHeaderSubTitleW
|
* PROPSHEET_SetHeaderSubTitleW
|
||||||
*/
|
*/
|
||||||
static void PROPSHEET_SetHeaderSubTitleW(HWND hwndDlg, int iPageIndex, LPCWSTR pszHeaderSubTitle)
|
static void PROPSHEET_SetHeaderSubTitleW(HWND hwndDlg, UINT page_index, const WCHAR *subtitle)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_w(pszHeaderSubTitle));
|
PropSheetInfo *psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
|
||||||
|
PROPSHEETPAGEW *page;
|
||||||
|
|
||||||
|
TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_w(subtitle));
|
||||||
|
|
||||||
|
if (page_index >= psInfo->nPages)
|
||||||
|
return;
|
||||||
|
|
||||||
|
page = (PROPSHEETPAGEW *)psInfo->proppage[page_index].hpage;
|
||||||
|
|
||||||
|
if (!IS_INTRESOURCE(page->pszHeaderSubTitle))
|
||||||
|
Free((void *)page->pszHeaderSubTitle);
|
||||||
|
|
||||||
|
page->pszHeaderSubTitle = heap_strdupW(subtitle);
|
||||||
|
page->dwFlags |= PSP_USEHEADERSUBTITLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_SetHeaderSubTitleA
|
* PROPSHEET_SetHeaderSubTitleA
|
||||||
*/
|
*/
|
||||||
static void PROPSHEET_SetHeaderSubTitleA(HWND hwndDlg, int iPageIndex, LPCSTR pszHeaderSubTitle)
|
static void PROPSHEET_SetHeaderSubTitleA(HWND hwndDlg, UINT page_index, const char *subtitle)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d, %s): stub\n", hwndDlg, iPageIndex, debugstr_a(pszHeaderSubTitle));
|
WCHAR *subtitleW;
|
||||||
|
|
||||||
|
TRACE("(%p, %u, %s)\n", hwndDlg, page_index, debugstr_a(subtitle));
|
||||||
|
|
||||||
|
subtitleW = heap_strdupAtoW(subtitle);
|
||||||
|
PROPSHEET_SetHeaderSubTitleW(hwndDlg, page_index, subtitleW);
|
||||||
|
Free(subtitleW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -2963,15 +2988,15 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
|
||||||
if (ppsp->dwFlags & PSP_USEICONID)
|
if (ppsp->dwFlags & PSP_USEICONID)
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE( ppsp->u2.pszIcon ))
|
if (!IS_INTRESOURCE( ppsp->u2.pszIcon ))
|
||||||
PROPSHEET_AtoW(&ppsp->u2.pszIcon, lpPropSheetPage->u2.pszIcon);
|
ppsp->u2.pszIcon = heap_strdupAtoW( lpPropSheetPage->u2.pszIcon );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ppsp->dwFlags & PSP_USETITLE)
|
if (ppsp->dwFlags & PSP_USETITLE)
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE( ppsp->pszTitle ))
|
if (IS_INTRESOURCE( ppsp->pszTitle ))
|
||||||
PROPSHEET_AtoW( &ppsp->pszTitle, lpPropSheetPage->pszTitle );
|
|
||||||
else
|
|
||||||
ppsp->pszTitle = load_string( ppsp->hInstance, ppsp->pszTitle );
|
ppsp->pszTitle = load_string( ppsp->hInstance, ppsp->pszTitle );
|
||||||
|
else
|
||||||
|
ppsp->pszTitle = heap_strdupAtoW( lpPropSheetPage->pszTitle );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ppsp->pszTitle = NULL;
|
ppsp->pszTitle = NULL;
|
||||||
|
@ -2981,24 +3006,27 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
|
||||||
|
|
||||||
if (ppsp->dwFlags & PSP_USEHEADERTITLE)
|
if (ppsp->dwFlags & PSP_USEHEADERTITLE)
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE( ppsp->pszHeaderTitle ))
|
if (IS_INTRESOURCE( ppsp->pszHeaderTitle ))
|
||||||
PROPSHEET_AtoW(&ppsp->pszHeaderTitle, lpPropSheetPage->pszHeaderTitle);
|
|
||||||
else
|
|
||||||
ppsp->pszHeaderTitle = load_string( ppsp->hInstance, ppsp->pszHeaderTitle );
|
ppsp->pszHeaderTitle = load_string( ppsp->hInstance, ppsp->pszHeaderTitle );
|
||||||
|
else
|
||||||
|
ppsp->pszHeaderTitle = heap_strdupAtoW( lpPropSheetPage->pszHeaderTitle );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ppsp->pszHeaderTitle = NULL;
|
ppsp->pszHeaderTitle = NULL;
|
||||||
|
|
||||||
if (ppsp->dwFlags & PSP_USEHEADERSUBTITLE)
|
if (ppsp->dwFlags & PSP_USEHEADERSUBTITLE)
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE( ppsp->pszHeaderSubTitle ))
|
if (IS_INTRESOURCE( ppsp->pszHeaderSubTitle ))
|
||||||
PROPSHEET_AtoW(&ppsp->pszHeaderSubTitle, lpPropSheetPage->pszHeaderSubTitle);
|
|
||||||
else
|
|
||||||
ppsp->pszHeaderSubTitle = load_string( ppsp->hInstance, ppsp->pszHeaderSubTitle );
|
ppsp->pszHeaderSubTitle = load_string( ppsp->hInstance, ppsp->pszHeaderSubTitle );
|
||||||
|
else
|
||||||
|
ppsp->pszHeaderSubTitle = heap_strdupAtoW( lpPropSheetPage->pszHeaderSubTitle );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ppsp->pszHeaderSubTitle = NULL;
|
ppsp->pszHeaderSubTitle = NULL;
|
||||||
|
|
||||||
|
if ((ppsp->dwFlags & PSH_USECALLBACK) && ppsp->pfnCallback)
|
||||||
|
ppsp->pfnCallback(0, PSPCB_ADDREF, ppsp);
|
||||||
|
|
||||||
return (HPROPSHEETPAGE)ppsp;
|
return (HPROPSHEETPAGE)ppsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3018,23 +3046,13 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
|
||||||
if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) )
|
if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) )
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE( ppsp->u.pszTemplate ))
|
if (!IS_INTRESOURCE( ppsp->u.pszTemplate ))
|
||||||
{
|
ppsp->u.pszTemplate = heap_strdupW( lpPropSheetPage->u.pszTemplate );
|
||||||
int len = strlenW(lpPropSheetPage->u.pszTemplate) + 1;
|
|
||||||
WCHAR *template = Alloc( len * sizeof (WCHAR) );
|
|
||||||
|
|
||||||
ppsp->u.pszTemplate = strcpyW( template, lpPropSheetPage->u.pszTemplate );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ppsp->dwFlags & PSP_USEICONID )
|
if ( ppsp->dwFlags & PSP_USEICONID )
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE( ppsp->u2.pszIcon ))
|
if (!IS_INTRESOURCE( ppsp->u2.pszIcon ))
|
||||||
{
|
ppsp->u2.pszIcon = heap_strdupW( lpPropSheetPage->u2.pszIcon );
|
||||||
int len = strlenW(lpPropSheetPage->u2.pszIcon) + 1;
|
|
||||||
WCHAR *icon = Alloc( len * sizeof (WCHAR) );
|
|
||||||
|
|
||||||
ppsp->u2.pszIcon = strcpyW( icon, lpPropSheetPage->u2.pszIcon );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ppsp->dwFlags & PSP_USETITLE)
|
if (ppsp->dwFlags & PSP_USETITLE)
|
||||||
|
@ -3055,6 +3073,9 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
|
||||||
else
|
else
|
||||||
ppsp->pszHeaderSubTitle = NULL;
|
ppsp->pszHeaderSubTitle = NULL;
|
||||||
|
|
||||||
|
if ((ppsp->dwFlags & PSH_USECALLBACK) && ppsp->pfnCallback)
|
||||||
|
ppsp->pfnCallback(0, PSPCB_ADDREF, ppsp);
|
||||||
|
|
||||||
return (HPROPSHEETPAGE)ppsp;
|
return (HPROPSHEETPAGE)ppsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3076,6 +3097,9 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
|
||||||
if (!psp)
|
if (!psp)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if ((psp->dwFlags & PSH_USECALLBACK) && psp->pfnCallback)
|
||||||
|
psp->pfnCallback(0, PSPCB_RELEASE, psp);
|
||||||
|
|
||||||
if (!(psp->dwFlags & PSP_DLGINDIRECT) && !IS_INTRESOURCE( psp->u.pszTemplate ))
|
if (!(psp->dwFlags & PSP_DLGINDIRECT) && !IS_INTRESOURCE( psp->u.pszTemplate ))
|
||||||
Free ((LPVOID)psp->u.pszTemplate);
|
Free ((LPVOID)psp->u.pszTemplate);
|
||||||
|
|
||||||
|
@ -3251,15 +3275,17 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
|
||||||
COLORREF clrOld = 0;
|
COLORREF clrOld = 0;
|
||||||
int oldBkMode = 0;
|
int oldBkMode = 0;
|
||||||
|
|
||||||
hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u5.hbmHeader);
|
|
||||||
hOldFont = SelectObject(hdc, psInfo->hFontBold);
|
|
||||||
|
|
||||||
GetClientRect(hwndLineHeader, &r);
|
GetClientRect(hwndLineHeader, &r);
|
||||||
MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
|
MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
|
||||||
SetRect(&rzone, 0, 0, r.right + 1, r.top - 1);
|
SetRect(&rzone, 0, 0, r.right + 1, r.top - 1);
|
||||||
|
|
||||||
GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), &bm);
|
hOldFont = SelectObject(hdc, psInfo->hFontBold);
|
||||||
|
|
||||||
|
if (psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)
|
||||||
|
{
|
||||||
|
hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u5.hbmHeader);
|
||||||
|
|
||||||
|
GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), &bm);
|
||||||
if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD)
|
if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD)
|
||||||
{
|
{
|
||||||
/* Fill the unoccupied part of the header with color of the
|
/* Fill the unoccupied part of the header with color of the
|
||||||
|
@ -3284,8 +3310,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw the header itself. */
|
/* Draw the header itself. */
|
||||||
BitBlt(hdc, 0, 0,
|
BitBlt(hdc, 0, 0, bm.bmWidth, min(bm.bmHeight, rzone.bottom),
|
||||||
bm.bmWidth, min(bm.bmHeight, rzone.bottom),
|
|
||||||
hdcSrc, 0, 0, SRCCOPY);
|
hdcSrc, 0, 0, SRCCOPY);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3307,6 +3332,9 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
|
||||||
* replicate it. */
|
* replicate it. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SelectObject(hdcSrc, hbmp);
|
||||||
|
}
|
||||||
|
|
||||||
clrOld = SetTextColor (hdc, 0x00000000);
|
clrOld = SetTextColor (hdc, 0x00000000);
|
||||||
oldBkMode = SetBkMode (hdc, TRANSPARENT);
|
oldBkMode = SetBkMode (hdc, TRANSPARENT);
|
||||||
|
|
||||||
|
@ -3346,7 +3374,6 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
|
||||||
SetTextColor(hdc, clrOld);
|
SetTextColor(hdc, clrOld);
|
||||||
SetBkMode(hdc, oldBkMode);
|
SetBkMode(hdc, oldBkMode);
|
||||||
SelectObject(hdc, hOldFont);
|
SelectObject(hdc, hOldFont);
|
||||||
SelectObject(hdcSrc, hbmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (ppshpage && (ppshpage->dwFlags & PSP_HIDEHEADER)) &&
|
if ( (ppshpage && (ppshpage->dwFlags & PSP_HIDEHEADER)) &&
|
||||||
|
@ -3754,19 +3781,19 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
case PSM_SETHEADERTITLEW:
|
case PSM_SETHEADERTITLEW:
|
||||||
PROPSHEET_SetHeaderTitleW(hwnd, (int)wParam, (LPCWSTR)lParam);
|
PROPSHEET_SetHeaderTitleW(hwnd, wParam, (LPCWSTR)lParam);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case PSM_SETHEADERTITLEA:
|
case PSM_SETHEADERTITLEA:
|
||||||
PROPSHEET_SetHeaderTitleA(hwnd, (int)wParam, (LPCSTR)lParam);
|
PROPSHEET_SetHeaderTitleA(hwnd, wParam, (LPCSTR)lParam);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case PSM_SETHEADERSUBTITLEW:
|
case PSM_SETHEADERSUBTITLEW:
|
||||||
PROPSHEET_SetHeaderSubTitleW(hwnd, (int)wParam, (LPCWSTR)lParam);
|
PROPSHEET_SetHeaderSubTitleW(hwnd, wParam, (LPCWSTR)lParam);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case PSM_SETHEADERSUBTITLEA:
|
case PSM_SETHEADERSUBTITLEA:
|
||||||
PROPSHEET_SetHeaderSubTitleA(hwnd, (int)wParam, (LPCSTR)lParam);
|
PROPSHEET_SetHeaderSubTitleA(hwnd, wParam, (LPCSTR)lParam);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case PSM_HWNDTOINDEX:
|
case PSM_HWNDTOINDEX:
|
||||||
|
|
|
@ -3386,7 +3386,7 @@ REBAR_NCHitTest (const REBAR_INFO *infoPtr, LPARAM lParam)
|
||||||
ret, i);
|
ret, i);
|
||||||
ret = (LRESULT) i;
|
ret = (LRESULT) i;
|
||||||
}
|
}
|
||||||
TRACE("returning %ld, client point (%d,%d)\n", ret, clpt.x, clpt.y);
|
TRACE("returning %ld, client point %s\n", ret, wine_dbgstr_point(&clpt));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(syslink);
|
WINE_DEFAULT_DEBUG_CHANNEL(syslink);
|
||||||
|
|
||||||
INT WINAPI StrCmpNIW(LPCWSTR,LPCWSTR,INT);
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int nChars;
|
int nChars;
|
||||||
|
@ -90,11 +88,6 @@ typedef struct
|
||||||
BOOL IgnoreReturn; /* (infoPtr->Style & LWS_IGNORERETURN) on creation */
|
BOOL IgnoreReturn; /* (infoPtr->Style & LWS_IGNORERETURN) on creation */
|
||||||
} SYSLINK_INFO;
|
} SYSLINK_INFO;
|
||||||
|
|
||||||
static const WCHAR SL_LINKOPEN[] = { '<','a', 0 };
|
|
||||||
static const WCHAR SL_HREF[] = { 'h','r','e','f','=','\"',0 };
|
|
||||||
static const WCHAR SL_ID[] = { 'i','d','=','\"',0 };
|
|
||||||
static const WCHAR SL_LINKCLOSE[] = { '<','/','a','>',0 };
|
|
||||||
|
|
||||||
/* Control configuration constants */
|
/* Control configuration constants */
|
||||||
|
|
||||||
#define SL_LEFTMARGIN (0)
|
#define SL_LEFTMARGIN (0)
|
||||||
|
@ -166,26 +159,6 @@ static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* SYSLINK_StrCmpNIW
|
|
||||||
* Wrapper for StrCmpNIW to ensure 'len' is not too big.
|
|
||||||
*/
|
|
||||||
static INT SYSLINK_StrCmpNIW (LPCWSTR str, LPCWSTR comp, INT len)
|
|
||||||
{
|
|
||||||
INT i;
|
|
||||||
|
|
||||||
for(i = 0; i < len; i++)
|
|
||||||
{
|
|
||||||
if(!str[i])
|
|
||||||
{
|
|
||||||
len = i + 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return StrCmpNIW(str, comp, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SYSLINK_ParseText
|
* SYSLINK_ParseText
|
||||||
* Parses the window text string and creates a document. Returns the
|
* Parses the window text string and creates a document. Returns the
|
||||||
|
@ -193,6 +166,10 @@ static INT SYSLINK_StrCmpNIW (LPCWSTR str, LPCWSTR comp, INT len)
|
||||||
*/
|
*/
|
||||||
static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
||||||
{
|
{
|
||||||
|
static const WCHAR SL_LINKOPEN[] = { '<','a' };
|
||||||
|
static const WCHAR SL_HREF[] = { 'h','r','e','f','=','\"' };
|
||||||
|
static const WCHAR SL_ID[] = { 'i','d','=','\"' };
|
||||||
|
static const WCHAR SL_LINKCLOSE[] = { '<','/','a','>' };
|
||||||
LPCWSTR current, textstart = NULL, linktext = NULL, firsttag = NULL;
|
LPCWSTR current, textstart = NULL, linktext = NULL, firsttag = NULL;
|
||||||
int taglen = 0, textlen = 0, linklen = 0, docitems = 0;
|
int taglen = 0, textlen = 0, linklen = 0, docitems = 0;
|
||||||
PDOC_ITEM Last = NULL;
|
PDOC_ITEM Last = NULL;
|
||||||
|
@ -206,7 +183,7 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
||||||
{
|
{
|
||||||
if(*current == '<')
|
if(*current == '<')
|
||||||
{
|
{
|
||||||
if(!SYSLINK_StrCmpNIW(current, SL_LINKOPEN, 2) && (CurrentType == slText))
|
if(!strncmpiW(current, SL_LINKOPEN, sizeof(SL_LINKOPEN)/sizeof(SL_LINKOPEN[0])) && (CurrentType == slText))
|
||||||
{
|
{
|
||||||
BOOL ValidParam = FALSE, ValidLink = FALSE;
|
BOOL ValidParam = FALSE, ValidLink = FALSE;
|
||||||
|
|
||||||
|
@ -234,14 +211,14 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
|
||||||
|
|
||||||
CheckParameter:
|
CheckParameter:
|
||||||
/* compare the current position with all known parameters */
|
/* compare the current position with all known parameters */
|
||||||
if(!SYSLINK_StrCmpNIW(tmp, SL_HREF, 6))
|
if(!strncmpiW(tmp, SL_HREF, sizeof(SL_HREF)/sizeof(SL_HREF[0])))
|
||||||
{
|
{
|
||||||
taglen += 6;
|
taglen += 6;
|
||||||
ValidParam = TRUE;
|
ValidParam = TRUE;
|
||||||
CurrentParameter = &lpUrl;
|
CurrentParameter = &lpUrl;
|
||||||
CurrentParameterLen = &lenUrl;
|
CurrentParameterLen = &lenUrl;
|
||||||
}
|
}
|
||||||
else if(!SYSLINK_StrCmpNIW(tmp, SL_ID, 4))
|
else if(!strncmpiW(tmp, SL_ID, sizeof(SL_ID)/sizeof(SL_ID[0])))
|
||||||
{
|
{
|
||||||
taglen += 4;
|
taglen += 4;
|
||||||
ValidParam = TRUE;
|
ValidParam = TRUE;
|
||||||
|
@ -315,7 +292,7 @@ CheckParameter:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!SYSLINK_StrCmpNIW(current, SL_LINKCLOSE, 4) && (CurrentType == slLink) && firsttag)
|
else if(!strncmpiW(current, SL_LINKCLOSE, sizeof(SL_LINKCLOSE)/sizeof(SL_LINKCLOSE[0])) && (CurrentType == slLink) && firsttag)
|
||||||
{
|
{
|
||||||
/* there's a <a...> tag opened, first add the previous text, if present */
|
/* there's a <a...> tag opened, first add the previous text, if present */
|
||||||
if(textstart != NULL && textlen > 0 && firsttag > textstart)
|
if(textstart != NULL && textlen > 0 && firsttag > textstart)
|
||||||
|
|
|
@ -3484,7 +3484,7 @@ TOOLBAR_GetButtonInfoT(const TOOLBAR_INFO *infoPtr, INT Id, LPTBBUTTONINFOW lpTb
|
||||||
Str_GetPtrW(lpText, lpTbInfo->pszText, lpTbInfo->cchText);
|
Str_GetPtrW(lpText, lpTbInfo->pszText, lpTbInfo->cchText);
|
||||||
else
|
else
|
||||||
Str_GetPtrWtoA(lpText, (LPSTR)lpTbInfo->pszText, lpTbInfo->cchText);
|
Str_GetPtrWtoA(lpText, (LPSTR)lpTbInfo->pszText, lpTbInfo->cchText);
|
||||||
} else
|
} else if (!bUnicode || lpTbInfo->pszText)
|
||||||
lpTbInfo->pszText[0] = '\0';
|
lpTbInfo->pszText[0] = '\0';
|
||||||
}
|
}
|
||||||
return nIndex;
|
return nIndex;
|
||||||
|
@ -4663,17 +4663,16 @@ TOOLBAR_SetDisabledImageList (TOOLBAR_INFO *infoPtr, WPARAM wParam, HIMAGELIST h
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_SetDrawTextFlags (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_SetDrawTextFlags (TOOLBAR_INFO *infoPtr, DWORD mask, DWORD flags)
|
||||||
{
|
{
|
||||||
DWORD dwTemp;
|
DWORD old_flags;
|
||||||
|
|
||||||
TRACE("hwnd = %p, dwMask = 0x%08x, dwDTFlags = 0x%08x\n", infoPtr->hwndSelf, (DWORD)wParam, (DWORD)lParam);
|
TRACE("hwnd = %p, mask = 0x%08x, flags = 0x%08x\n", infoPtr->hwndSelf, mask, flags);
|
||||||
|
|
||||||
dwTemp = infoPtr->dwDTFlags;
|
old_flags = infoPtr->dwDTFlags;
|
||||||
infoPtr->dwDTFlags =
|
infoPtr->dwDTFlags = (old_flags & ~mask) | (flags & mask);
|
||||||
(infoPtr->dwDTFlags & (DWORD)wParam) | (DWORD)lParam;
|
|
||||||
|
|
||||||
return (LRESULT)dwTemp;
|
return (LRESULT)old_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function differs a bit from what MSDN says it does:
|
/* This function differs a bit from what MSDN says it does:
|
||||||
|
|
|
@ -1521,7 +1521,7 @@ TOOLTIPS_RelayEvent (TOOLTIPS_INFO *infoPtr, LPMSG lpMsg)
|
||||||
&pt);
|
&pt);
|
||||||
TRACE("tool (%p) %d %d %d\n", infoPtr->hwndSelf, nOldTool,
|
TRACE("tool (%p) %d %d %d\n", infoPtr->hwndSelf, nOldTool,
|
||||||
infoPtr->nTool, infoPtr->nCurrentTool);
|
infoPtr->nTool, infoPtr->nCurrentTool);
|
||||||
TRACE("WM_MOUSEMOVE (%p %d %d)\n", infoPtr->hwndSelf, pt.x, pt.y);
|
TRACE("WM_MOUSEMOVE (%p %s)\n", infoPtr->hwndSelf, wine_dbgstr_point(&pt));
|
||||||
|
|
||||||
if (infoPtr->nTool != nOldTool) {
|
if (infoPtr->nTool != nOldTool) {
|
||||||
if(infoPtr->nTool == -1) { /* Moved out of all tools */
|
if(infoPtr->nTool == -1) { /* Moved out of all tools */
|
||||||
|
|
|
@ -436,7 +436,7 @@ TRACKBAR_AutoPage (TRACKBAR_INFO *infoPtr, POINT clickPoint)
|
||||||
LONG dir = TRACKBAR_GetAutoPageDirection(infoPtr, clickPoint);
|
LONG dir = TRACKBAR_GetAutoPageDirection(infoPtr, clickPoint);
|
||||||
LONG prevPos = infoPtr->lPos;
|
LONG prevPos = infoPtr->lPos;
|
||||||
|
|
||||||
TRACE("x=%d, y=%d, dir=%d\n", clickPoint.x, clickPoint.y, dir);
|
TRACE("clickPoint=%s, dir=%d\n", wine_dbgstr_point(&clickPoint), dir);
|
||||||
|
|
||||||
if (dir > 0 && (infoPtr->flags & TB_AUTO_PAGE_RIGHT))
|
if (dir > 0 && (infoPtr->flags & TB_AUTO_PAGE_RIGHT))
|
||||||
TRACKBAR_PageDown(infoPtr);
|
TRACKBAR_PageDown(infoPtr);
|
||||||
|
@ -1261,10 +1261,11 @@ static inline LRESULT
|
||||||
TRACKBAR_SetRangeMax (TRACKBAR_INFO *infoPtr, BOOL redraw, LONG lMax)
|
TRACKBAR_SetRangeMax (TRACKBAR_INFO *infoPtr, BOOL redraw, LONG lMax)
|
||||||
{
|
{
|
||||||
BOOL changed = infoPtr->lRangeMax != lMax;
|
BOOL changed = infoPtr->lRangeMax != lMax;
|
||||||
|
LONG rightmost = max(lMax, infoPtr->lRangeMin);
|
||||||
|
|
||||||
infoPtr->lRangeMax = lMax;
|
infoPtr->lRangeMax = lMax;
|
||||||
if (infoPtr->lPos > infoPtr->lRangeMax) {
|
if (infoPtr->lPos > rightmost) {
|
||||||
infoPtr->lPos = infoPtr->lRangeMax;
|
infoPtr->lPos = rightmost;
|
||||||
infoPtr->flags |= TB_THUMBPOSCHANGED;
|
infoPtr->flags |= TB_THUMBPOSCHANGED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1415,6 +1416,7 @@ TRACKBAR_SetTicFreq (TRACKBAR_INFO *infoPtr, WORD wFreq)
|
||||||
TRACKBAR_InvalidateAll(infoPtr);
|
TRACKBAR_InvalidateAll(infoPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACKBAR_UpdateThumb (infoPtr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2531,6 +2531,8 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
|
||||||
}
|
}
|
||||||
|
|
||||||
hOldFont = SelectObject(hdc, TREEVIEW_FontForItem(infoPtr, item));
|
hOldFont = SelectObject(hdc, TREEVIEW_FontForItem(infoPtr, item));
|
||||||
|
oldTextColor = SetTextColor(hdc, nmcdhdr.clrText);
|
||||||
|
oldTextBkColor = SetBkColor(hdc, nmcdhdr.clrTextBk);
|
||||||
|
|
||||||
/* The custom draw handler can query the text rectangle,
|
/* The custom draw handler can query the text rectangle,
|
||||||
* so get ready. */
|
* so get ready. */
|
||||||
|
@ -2565,9 +2567,9 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
|
||||||
|
|
||||||
TREEVIEW_DrawItemLines(infoPtr, hdc, item);
|
TREEVIEW_DrawItemLines(infoPtr, hdc, item);
|
||||||
|
|
||||||
/* Set colors. Custom draw handler can change these so we do this after it. */
|
/* reset colors. Custom draw handler can change them */
|
||||||
oldTextColor = SetTextColor(hdc, nmcdhdr.clrText);
|
SetTextColor(hdc, nmcdhdr.clrText);
|
||||||
oldTextBkColor = SetBkColor(hdc, nmcdhdr.clrTextBk);
|
SetBkColor(hdc, nmcdhdr.clrTextBk);
|
||||||
|
|
||||||
centery = (item->rect.top + item->rect.bottom) / 2;
|
centery = (item->rect.top + item->rect.bottom) / 2;
|
||||||
|
|
||||||
|
@ -3687,6 +3689,9 @@ TREEVIEW_HitTest(const TREEVIEW_INFO *infoPtr, LPTVHITTESTINFO lpht)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!item->textWidth)
|
||||||
|
TREEVIEW_ComputeTextWidth(infoPtr, item, 0);
|
||||||
|
|
||||||
if (x >= item->textOffset + item->textWidth)
|
if (x >= item->textOffset + item->textWidth)
|
||||||
{
|
{
|
||||||
lpht->flags = TVHT_ONITEMRIGHT;
|
lpht->flags = TVHT_ONITEMRIGHT;
|
||||||
|
|
|
@ -54,7 +54,7 @@ reactos/dll/win32/browseui # Out of sync
|
||||||
reactos/dll/win32/cabinet # Synced to WineStaging-2.2
|
reactos/dll/win32/cabinet # Synced to WineStaging-2.2
|
||||||
reactos/dll/win32/clusapi # Synced to WineStaging-1.9.11
|
reactos/dll/win32/clusapi # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/comcat # Synced to WineStaging-1.9.11
|
reactos/dll/win32/comcat # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/comctl32 # Synced to WineStaging-1.9.23
|
reactos/dll/win32/comctl32 # Synced to WineStaging-2.2
|
||||||
reactos/dll/win32/comdlg32 # Synced to WineStaging-1.9.23
|
reactos/dll/win32/comdlg32 # Synced to WineStaging-1.9.23
|
||||||
reactos/dll/win32/compstui # Synced to WineStaging-2.2
|
reactos/dll/win32/compstui # Synced to WineStaging-2.2
|
||||||
reactos/dll/win32/credui # Synced to WineStaging-2.2
|
reactos/dll/win32/credui # Synced to WineStaging-2.2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue