Skip to content

Commit

Permalink
Autosyncing with Wine HEAD
Browse files Browse the repository at this point in the history
svn path=/trunk/; revision=29032
  • Loading branch information
hpoussin committed Sep 14, 2007
1 parent 05315cb commit 96cdd64
Show file tree
Hide file tree
Showing 15 changed files with 281 additions and 47 deletions.
2 changes: 0 additions & 2 deletions reactos/dll/win32/comctl32/comctl32.h
Expand Up @@ -153,8 +153,6 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc);

#define COMCTL32_VERSION_MINOR 81
#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 4704, 1100
#define WINE_FILEVERSIONSTR "5.81"

/* Our internal stack structure of the window procedures to subclass */
typedef struct _SUBCLASSPROCS {
Expand Down
8 changes: 1 addition & 7 deletions reactos/dll/win32/comctl32/comctl32.rbuild
@@ -1,4 +1,4 @@
<module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" allowwarnings="true">
<module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" allowwarnings="true" entrypoint="0">
<autoregister infsection="OleControlDlls" type="DllInstall" />
<importlibrary definition="comctl32.spec.def" />
<include base="comctl32">.</include>
Expand All @@ -9,12 +9,6 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>

<metadata
description = "Common controls used by ReactOS"
version = "Autosync"
owner = "Wine" />
<library>wine</library>
<library>user32</library>
<library>gdi32</library>
Expand Down
17 changes: 15 additions & 2 deletions reactos/dll/win32/comctl32/comctl32_ros.diff
@@ -1,3 +1,16 @@
Index: commctrl.c
===================================================================
--- commctrl.c (revision 23123)
+++ commctrl.c (working copy)
@@ -1620,7 +1620,7 @@
*
* Draw text with shadow.
*/
+int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *rect, DWORD dwFlags,
-int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD dwFlags,
COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
{
FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags,
Index: listview.c
===================================================================
--- listview.c (revision 23123)
Expand Down Expand Up @@ -102,7 +115,7 @@ Index: tooltips.c
===================================================================
--- tooltips.c (revision 25790)
+++ tooltips.c (working copy)
@@ -2437,7 +2437,34 @@
@@ -2471,7 +2471,34 @@
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
Expand Down Expand Up @@ -141,7 +154,7 @@ Index: treeview.c
===================================================================
--- treeview.c (revision 27134)
+++ treeview.c (working copy)
@@ -2839,8 +2839,6 @@
@@ -2844,8 +2844,6 @@
}
}

Expand Down
2 changes: 1 addition & 1 deletion reactos/dll/win32/comctl32/comctl_Fr.rc
Expand Up @@ -31,7 +31,7 @@ BEGIN
PUSHBUTTON "Annuler", IDCANCEL,58,122,50,14
PUSHBUTTON "&Appliquer", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
PUSHBUTTON "Aide", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
CONTROL "onglet", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
CONTROL "Onglet", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
END


Expand Down
2 changes: 1 addition & 1 deletion reactos/dll/win32/comctl32/comctl_No.rc
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/

LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL

IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
Expand Down
4 changes: 2 additions & 2 deletions reactos/dll/win32/comctl32/comctl_Pt.rc
@@ -1,6 +1,6 @@
/*
* Copyright 2003 Marcelo Duarte
* Copyright 2006 Am�rico Jos� Melo
* Copyright 2006-2007 Am�rico Jos� Melo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -42,7 +42,7 @@ BEGIN
PUSHBUTTON "Cancelar", IDCANCEL,58,122,50,14
PUSHBUTTON "&Aplicar", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
PUSHBUTTON "Ajuda", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
CONTROL "Separador", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
END


Expand Down
2 changes: 1 addition & 1 deletion reactos/dll/win32/comctl32/comctl_Ru.rc
Expand Up @@ -22,7 +22,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT

IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "��������: %s"
CAPTION "�������� ��� %s"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
Expand Down
5 changes: 2 additions & 3 deletions reactos/dll/win32/comctl32/comctl_Uk.rc
Expand Up @@ -2,7 +2,6 @@
* comctl (Ukrainian resources)
*
* Copyright 2004 Ilya Korniyko
* 2007 Artem Reznikov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -27,7 +26,7 @@ CAPTION "
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
PUSHBUTTON "&���������", IDCANCEL,58,122,50,14
PUSHBUTTON "&³����", IDCANCEL,58,122,50,14
PUSHBUTTON "&�����������", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
PUSHBUTTON "&������", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
Expand All @@ -42,7 +41,7 @@ BEGIN
PUSHBUTTON "< &�����", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&��� >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "&���������", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "&���������", IDCANCEL,178,138,50,14
PUSHBUTTON "&³����", IDCANCEL,178,138,50,14
PUSHBUTTON "&������", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
Expand Down
108 changes: 99 additions & 9 deletions reactos/dll/win32/comctl32/commctrl.c
Expand Up @@ -71,6 +71,58 @@

WINE_DEFAULT_DEBUG_CHANNEL(commctrl);


#define NAME "microsoft.windows.common-controls"
#define FILE "comctl32.dll"
#define VERSION "6.0.0.0"
#define PUBLIC_KEY "6595b64144ccf1df"

#ifdef __i386__
#define ARCH "x86"
#elif defined __x86_64__
#define ARCH "amd64"
#else
#define ARCH "none"
#endif

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 type=\"win32\" name=\"" NAME "\" version=\"" VERSION "\" processorArchitecture=\"" ARCH "\" publicKeyToken=\"" PUBLIC_KEY "\"/>\n"
" <file name=\"" FILE "\">\n"
" <windowClass>Button</windowClass>\n"
" <windowClass>ButtonListBox</windowClass>\n"
" <windowClass>ComboBoxEx32</windowClass>\n"
" <windowClass>ComboLBox</windowClass>\n"
" <windowClass>Combobox</windowClass>\n"
" <windowClass>Edit</windowClass>\n"
" <windowClass>Listbox</windowClass>\n"
" <windowClass>NativeFontCtl</windowClass>\n"
" <windowClass>ReBarWindow32</windowClass>\n"
" <windowClass>ScrollBar</windowClass>\n"
" <windowClass>Static</windowClass>\n"
" <windowClass>SysAnimate32</windowClass>\n"
" <windowClass>SysDateTimePick32</windowClass>\n"
" <windowClass>SysHeader32</windowClass>\n"
" <windowClass>SysIPAddress32</windowClass>\n"
" <windowClass>SysLink</windowClass>\n"
" <windowClass>SysListView32</windowClass>\n"
" <windowClass>SysMonthCal32</windowClass>\n"
" <windowClass>SysPager</windowClass>\n"
" <windowClass>SysTabControl32</windowClass>\n"
" <windowClass>SysTreeView32</windowClass>\n"
" <windowClass>ToolbarWindow32</windowClass>\n"
" <windowClass>msctls_hotkey32</windowClass>\n"
" <windowClass>msctls_progress32</windowClass>\n"
" <windowClass>msctls_statusbar32</windowClass>\n"
" <windowClass>msctls_trackbar32</windowClass>\n"
" <windowClass>msctls_updown32</windowClass>\n"
" <windowClass>tooltips_class32</windowClass>\n"
" </file>\n"
"</assembly>\n";

static const char manifest_filename[] = ARCH "_" NAME "_" PUBLIC_KEY "_" VERSION "_none_deadbeef.manifest";

LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

LPWSTR COMCTL32_wSubclass = NULL;
Expand All @@ -91,6 +143,47 @@ static const WCHAR strCC32SubclassInfo[] = {
'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0
};

static BOOL create_manifest( BOOL install )
{
static const WCHAR winsxsW[] = {'\\','w','i','n','s','x','s',0};
static const WCHAR manifestsW[] = {'\\','m','a','n','i','f','e','s','t','s','\\',0};

DWORD len, written;
WCHAR *buffer;
HANDLE file;
BOOL ret = FALSE;

len = MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename), NULL, 0 );
len += GetWindowsDirectoryW( NULL, 0 );
len += lstrlenW(winsxsW);
len += lstrlenW(manifestsW);
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return FALSE;
GetWindowsDirectoryW( buffer, len );
lstrcatW( buffer, winsxsW );
CreateDirectoryW( buffer, NULL );
lstrcatW( buffer, manifestsW );
CreateDirectoryW( buffer, NULL );
MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename),
buffer + lstrlenW(buffer), len );
if (install)
{
file = CreateFileW( buffer, 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) DeleteFileW( buffer );
else TRACE("created %s\n", debugstr_w(buffer));
}
}
else ret = DeleteFileW( buffer );

HeapFree( GetProcessHeap(), 0, buffer );
return ret;
}


/***********************************************************************
* DllMain [Internal]
*
Expand Down Expand Up @@ -917,10 +1010,9 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
*/
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
{
FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
debugstr_w(cmdline));

return S_OK;
TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
if (!create_manifest( bInstall )) return HRESULT_FROM_WIN32(GetLastError());
return S_OK;
}

/***********************************************************************
Expand Down Expand Up @@ -1528,12 +1620,10 @@ LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet)
*
* Draw text with shadow.
*/
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *pRect, DWORD dwFlags,
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *rect, DWORD dwFlags,
COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
{
RECT rect = *pRect;

FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, pRect, dwFlags,
FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags,
crText, crShadow, ixOffset, iyOffset);
return DrawTextW(hdc, pszText, cch, &rect, DT_LEFT);
return DrawTextW(hdc, pszText, cch, rect, DT_LEFT);
}
11 changes: 10 additions & 1 deletion reactos/dll/win32/comctl32/listview.c
Expand Up @@ -6658,7 +6658,16 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,

ZeroMemory(&hdi, sizeof(HDITEMW));
column_fill_hditem(infoPtr, &hdi, nColumn, lpColumn, isW);


/*
* A mask not including LVCF_WIDTH turns into a mask of width, width 10
* (can be seen in SPY) otherwise column never gets added.
*/
if (!(lpColumn->mask & LVCF_WIDTH)) {
hdi.mask |= HDI_WIDTH;
hdi.cxy = 10;
}

/*
* when the iSubItem is available Windows copies it to the header lParam. It seems
* to happen only in LVM_INSERTCOLUMN - not in LVM_SETCOLUMN
Expand Down
7 changes: 7 additions & 0 deletions reactos/dll/win32/comctl32/rsrc.rc
Expand Up @@ -27,6 +27,13 @@

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL

#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
#define WINE_FILENAME_STR "comctl32.dll"
#define WINE_FILEVERSION COMCTL32_VERSION, COMCTL32_VERSION_MINOR, 4704, 1100
#define WINE_FILEVERSIONSTR "5.81"
#define WINE_PRODUCTVERSION WINE_FILEVERSION
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSIONSTR

#include "wine/wine_common_ver.rc"

/* BINRES idt_check.bmp */
Expand Down
1 change: 1 addition & 0 deletions reactos/dll/win32/comctl32/tab.c
Expand Up @@ -255,6 +255,7 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem)
else {
if (infoPtr->iSelected != iItem) {
infoPtr->iSelected=iItem;
infoPtr->uFocus=iItem;
TAB_EnsureSelectionVisible(infoPtr);
TAB_InvalidateTabArea(infoPtr);
}
Expand Down

0 comments on commit 96cdd64

Please sign in to comment.