Author: gedmurphy
Date: Wed Jul 5 00:43:03 2006
New Revision: 22844
URL:
http://svn.reactos.org/svn/reactos?rev=22844&view=rev
Log:
Wine 0_9_16 vendor drop
Modified:
vendor/wine/dlls/comctl32/current/listview.c
vendor/wine/dlls/comctl32/current/propsheet.c
Modified: vendor/wine/dlls/comctl32/current/listview.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/comctl32/current/listvi…
==============================================================================
--- vendor/wine/dlls/comctl32/current/listview.c (original)
+++ vendor/wine/dlls/comctl32/current/listview.c Wed Jul 5 00:43:03 2006
@@ -3769,9 +3769,10 @@
himl = (uView == LVS_ICON ? infoPtr->himlNormal : infoPtr->himlSmall);
if (himl && lvItem.iImage >= 0 && !IsRectEmpty(&rcIcon))
{
- TRACE("iImage=%d\n", lvItem.iImage);
- ImageList_Draw(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top,
- (lvItem.state & LVIS_SELECTED) && (infoPtr->bFocus) ? ILD_SELECTED :
ILD_NORMAL);
+ TRACE("iImage=%d\n", lvItem.iImage);
+ ImageList_DrawEx(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top,
+ rcIcon.right - rcIcon.left, rcIcon.bottom - rcIcon.top,
infoPtr->clrBk, CLR_DEFAULT,
+ (lvItem.state & LVIS_SELECTED) &&
(infoPtr->bFocus) ? ILD_SELECTED : ILD_NORMAL);
}
/* Don't bother painting item being edited */
@@ -4293,8 +4294,8 @@
infoPtr->nItemCount --;
}
+ LISTVIEW_Arrange(infoPtr, LVA_DEFAULT);
LISTVIEW_UpdateScroll(infoPtr);
-
LISTVIEW_InvalidateList(infoPtr);
return TRUE;
Modified: vendor/wine/dlls/comctl32/current/propsheet.c
URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/comctl32/current/propsh…
==============================================================================
--- vendor/wine/dlls/comctl32/current/propsheet.c (original)
+++ vendor/wine/dlls/comctl32/current/propsheet.c Wed Jul 5 00:43:03 2006
@@ -1248,6 +1248,7 @@
const WORD* p = (const WORD *)pTemplate;
BOOL istemplateex = (((MyDLGTEMPLATEEX*)pTemplate)->signature == 0xFFFF);
WORD nrofitems;
+ UINT ret;
if (istemplateex)
{
@@ -1363,9 +1364,9 @@
--nrofitems;
}
- TRACE("%p %p size 0x%08x\n",p, (WORD*)pTemplate,sizeof(WORD)*(p -
(WORD*)pTemplate));
- return (p - (WORD*)pTemplate)*sizeof(WORD);
-
+ ret = (p - (WORD*)pTemplate) * sizeof(WORD);
+ TRACE("%p %p size 0x%08x\n", p, pTemplate, ret);
+ return ret;
}
/******************************************************************************
@@ -2862,6 +2863,42 @@
return bRet;
}
+static LPWSTR load_string( HINSTANCE instance, LPCWSTR str )
+{
+ LPWSTR ret;
+ UINT len;
+
+ if (IS_INTRESOURCE(str))
+ {
+ HRSRC hrsrc;
+ HGLOBAL hmem;
+ WCHAR *ptr;
+ WORD i, id = LOWORD(str);
+
+ if (!(hrsrc = FindResourceW( instance, MAKEINTRESOURCEW((id >> 4) + 1),
(LPWSTR)RT_STRING )))
+ return NULL;
+ if (!(hmem = LoadResource( instance, hrsrc ))) return NULL;
+ if (!(ptr = LockResource( hmem ))) return NULL;
+ for (i = id & 0x0f; i > 0; i--) ptr += *ptr + 1;
+ len = *ptr;
+ if (!len) return NULL;
+ ret = Alloc( (len + 1) * sizeof(WCHAR) );
+ if (ret)
+ {
+ memcpy( ret, ptr + 1, len * sizeof(WCHAR) );
+ ret[len] = 0;
+ }
+ }
+ else
+ {
+ int len = (strlenW(str) + 1) * sizeof(WCHAR);
+ ret = Alloc( len );
+ if (ret) memcpy( ret, str, len );
+ }
+ return ret;
+}
+
+
/******************************************************************************
* CreatePropertySheetPage (COMCTL32.@)
* CreatePropertySheetPageA (COMCTL32.@)
@@ -2906,12 +2943,7 @@
if (HIWORD( ppsp->pszTitle ))
PROPSHEET_AtoW( &ppsp->pszTitle, lpPropSheetPage->pszTitle );
else
- {
- UINT id = LOWORD(ppsp->pszTitle);
- int len = LoadStringW( ppsp->hInstance, id, NULL, 0 ) + 1;
- ppsp->pszTitle = Alloc( len * sizeof(WCHAR) );
- LoadStringW( ppsp->hInstance, id, (LPWSTR)ppsp->pszTitle, len );
- }
+ ppsp->pszTitle = load_string( ppsp->hInstance, ppsp->pszTitle );
}
else
ppsp->pszTitle = NULL;
@@ -2924,12 +2956,7 @@
if (HIWORD( ppsp->pszHeaderTitle ))
PROPSHEET_AtoW(&ppsp->pszHeaderTitle,
lpPropSheetPage->pszHeaderTitle);
else
- {
- UINT id = LOWORD(ppsp->pszHeaderTitle);
- int len = LoadStringW( ppsp->hInstance, id, NULL, 0 ) + 1;
- ppsp->pszHeaderTitle = Alloc( len * sizeof(WCHAR) );
- LoadStringW( ppsp->hInstance, id, (LPWSTR)ppsp->pszHeaderTitle, len );
- }
+ ppsp->pszHeaderTitle = load_string( ppsp->hInstance,
ppsp->pszHeaderTitle );
}
else
ppsp->pszHeaderTitle = NULL;
@@ -2939,12 +2966,7 @@
if (HIWORD( ppsp->pszHeaderSubTitle ))
PROPSHEET_AtoW(&ppsp->pszHeaderSubTitle,
lpPropSheetPage->pszHeaderSubTitle);
else
- {
- UINT id = LOWORD(ppsp->pszHeaderSubTitle);
- int len = LoadStringW( ppsp->hInstance, id, NULL, 0 ) + 1;
- ppsp->pszHeaderSubTitle = Alloc( len * sizeof(WCHAR) );
- LoadStringW( ppsp->hInstance, id, (LPWSTR)ppsp->pszHeaderSubTitle, len
);
- }
+ ppsp->pszHeaderSubTitle = load_string( ppsp->hInstance,
ppsp->pszHeaderSubTitle );
}
else
ppsp->pszHeaderSubTitle = NULL;
@@ -2986,21 +3008,7 @@
}
if (ppsp->dwFlags & PSP_USETITLE)
- {
- if (HIWORD( ppsp->pszTitle ))
- {
- int len = strlenW(lpPropSheetPage->pszTitle) + 1;
- ppsp->pszTitle = Alloc( len * sizeof (WCHAR) );
- strcpyW( (WCHAR *)ppsp->pszTitle, lpPropSheetPage->pszTitle );
- }
- else
- {
- UINT id = LOWORD(ppsp->pszTitle);
- int len = LoadStringW( ppsp->hInstance, id, NULL, 0 ) + 1;
- ppsp->pszTitle = Alloc( len * sizeof(WCHAR) );
- LoadStringW( ppsp->hInstance, id, (LPWSTR)ppsp->pszTitle, len );
- }
- }
+ ppsp->pszTitle = load_string( ppsp->hInstance, ppsp->pszTitle );
else
ppsp->pszTitle = NULL;
@@ -3008,40 +3016,12 @@
ppsp->dwFlags &= ~(PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE);
if (ppsp->dwFlags & PSP_USEHEADERTITLE)
- {
- if (HIWORD( ppsp->pszHeaderTitle ))
- {
- int len = strlenW(lpPropSheetPage->pszHeaderTitle) + 1;
- ppsp->pszHeaderTitle = Alloc( len * sizeof (WCHAR) );
- strcpyW( (WCHAR *)ppsp->pszHeaderTitle, lpPropSheetPage->pszHeaderTitle
);
- }
- else
- {
- UINT id = LOWORD(ppsp->pszHeaderTitle);
- int len = LoadStringW( ppsp->hInstance, id, NULL, 0 ) + 1;
- ppsp->pszHeaderTitle = Alloc( len * sizeof(WCHAR) );
- LoadStringW( ppsp->hInstance, id, (LPWSTR)ppsp->pszHeaderTitle, len );
- }
- }
+ ppsp->pszHeaderTitle = load_string( ppsp->hInstance,
ppsp->pszHeaderTitle );
else
ppsp->pszHeaderTitle = NULL;
if (ppsp->dwFlags & PSP_USEHEADERSUBTITLE)
- {
- if (HIWORD( ppsp->pszHeaderSubTitle ))
- {
- int len = strlenW(lpPropSheetPage->pszHeaderSubTitle) + 1;
- ppsp->pszHeaderSubTitle = Alloc( len * sizeof (WCHAR) );
- strcpyW( (WCHAR *)ppsp->pszHeaderSubTitle,
lpPropSheetPage->pszHeaderSubTitle );
- }
- else
- {
- UINT id = LOWORD(ppsp->pszHeaderSubTitle);
- int len = LoadStringW( ppsp->hInstance, id, NULL, 0 ) + 1;
- ppsp->pszHeaderSubTitle = Alloc( len * sizeof(WCHAR) );
- LoadStringW( ppsp->hInstance, id, (LPWSTR)ppsp->pszHeaderSubTitle, len
);
- }
- }
+ ppsp->pszHeaderSubTitle = load_string( ppsp->hInstance,
ppsp->pszHeaderSubTitle );
else
ppsp->pszHeaderSubTitle = NULL;
@@ -3533,7 +3513,7 @@
case WM_CLOSE:
PROPSHEET_Cancel(hwnd, 1);
- return TRUE;
+ return FALSE; /* let DefDlgProc post us WM_COMMAND/IDCANCEL */
case WM_COMMAND:
if (!PROPSHEET_DoCommand(hwnd, LOWORD(wParam)))