mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org> - Removed unnecessary code in the 16-bit DllEntryPoint function of some dlls, and also fixed its ordinal in a few places. - Added rules for building import libraries in the individual dll makefiles, and added support for building a .def.a static import library too. - Don't convert the template name to Unicode, it's not used by the dialog anyway. Clear the window property on WM_DESTROY. Michael Jung <mjung@iss.tu-darmstadt.de> - Use IShellFolder::GetDisplayNameOf instead of SHGetPathFromIDList to be able to browse shell namespace extensions. svn path=/trunk/; revision=15532
This commit is contained in:
parent
120d7a64b9
commit
da5d24be89
6 changed files with 11 additions and 78 deletions
|
@ -3,6 +3,7 @@ TOPOBJDIR = ../..
|
|||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = comdlg32.dll
|
||||
IMPORTLIB = libcomdlg32.$(IMPLIBEXT)
|
||||
IMPORTS = shell32 shlwapi comctl32 winspool user32 gdi32 kernel32 ntdll
|
||||
EXTRALIBS = -luuid
|
||||
|
||||
|
@ -22,7 +23,6 @@ C_SRCS16 = \
|
|||
filedlg16.c \
|
||||
finddlg.c \
|
||||
fontdlg16.c \
|
||||
generic.c \
|
||||
printdlg16.c
|
||||
|
||||
SPEC_SRCS16 = commdlg.spec
|
||||
|
|
|
@ -24,4 +24,3 @@
|
|||
#29 pascal DWLBSUBCLASS exported, shared data
|
||||
#30 pascal DWUPARROWHACK exported, shared data
|
||||
#31 pascal DWOKSUBCLASS exported, shared data
|
||||
32 pascal DllEntryPoint(long word word word long word) COMMDLG_DllEntryPoint
|
||||
|
|
|
@ -1835,7 +1835,13 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
|||
|
||||
TRACE("parse now=%s next=%s sf=%p\n",debugstr_w(lpwstrTemp), debugstr_w(lpszTemp), lpsf);
|
||||
|
||||
if(lstrlenW(lpwstrTemp)==2) PathAddBackslashW(lpwstrTemp);
|
||||
/* append a backslash to drive letters */
|
||||
if(lstrlenW(lpwstrTemp)==2 && lpwstrTemp[1] == ':' &&
|
||||
((lpwstrTemp[0] >= 'a' && lpwstrTemp[0] <= 'z') ||
|
||||
(lpwstrTemp[0] >= 'A' && lpwstrTemp[0] <= 'Z')))
|
||||
{
|
||||
PathAddBackslashW(lpwstrTemp);
|
||||
}
|
||||
|
||||
dwAttributes = SFGAO_FOLDER;
|
||||
if(SUCCEEDED(IShellFolder_ParseDisplayName(lpsf, hwnd, NULL, lpwstrTemp, &dwEaten, &pidl, &dwAttributes)))
|
||||
|
|
|
@ -776,7 +776,8 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowse
|
|||
else
|
||||
{
|
||||
/* Tell the dialog that the user selected a file */
|
||||
hRes = PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
|
||||
PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
|
||||
hRes = S_OK;
|
||||
}
|
||||
|
||||
/* Free memory used by pidl */
|
||||
|
|
|
@ -1024,18 +1024,15 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
|
|||
LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpcfw)
|
||||
{
|
||||
LPCHOOSEFONTA lpcfa;
|
||||
LPCSTR lpTemplateName;
|
||||
LPSTR lpszStyle;
|
||||
LPLOGFONTA lpLogFonta;
|
||||
int len;
|
||||
|
||||
lpcfa = GetPropW(hwnd, strWineFontData_a);
|
||||
lpLogFonta = lpcfa->lpLogFont;
|
||||
lpTemplateName = lpcfa->lpTemplateName;
|
||||
lpszStyle = lpcfa->lpszStyle;
|
||||
memcpy(lpcfa, lpcfw, sizeof(CHOOSEFONTA));
|
||||
lpcfa->lpLogFont = lpLogFonta;
|
||||
lpcfa->lpTemplateName = lpTemplateName;
|
||||
lpcfa->lpszStyle = lpszStyle;
|
||||
memcpy(lpcfa->lpLogFont, lpcfw->lpLogFont, sizeof(LOGFONTA));
|
||||
WideCharToMultiByte(CP_ACP, 0, lpcfw->lpLogFont->lfFaceName,
|
||||
|
@ -1047,9 +1044,9 @@ LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpc
|
|||
HeapFree(GetProcessHeap(), 0, lpcfw->lpszStyle);
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, (LPBYTE)lpcfw->lpTemplateName);
|
||||
HeapFree(GetProcessHeap(), 0, lpcfw->lpLogFont);
|
||||
HeapFree(GetProcessHeap(), 0, lpcfw);
|
||||
SetPropW(hwnd, strWineFontData, 0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1141,13 +1138,6 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
|
|||
MultiByteToWideChar(CP_ACP, 0, lpcfa->lpszStyle, -1, lpcfw->lpszStyle, len);
|
||||
}
|
||||
|
||||
if((lpcfa->Flags & CF_ENABLETEMPLATE) && lpcfa->lpTemplateName) {
|
||||
len = MultiByteToWideChar(CP_ACP, 0, lpcfa->lpTemplateName, -1, NULL, 0);
|
||||
lpcfw->lpTemplateName = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpcfa->lpTemplateName,
|
||||
-1, (LPWSTR)lpcfw->lpTemplateName, len);
|
||||
}
|
||||
|
||||
if (!CFn_WMInitDialog(hDlg, wParam, lParam, lpcfw))
|
||||
{
|
||||
TRACE("CFn_WMInitDialog returned FALSE\n");
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* COMMDLG/COMDLG32 functions
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
* Copyright 1996 Albrecht Kleine
|
||||
* Copyright 1998,1999 Bertho Stultiens
|
||||
* Copyright 1999 Klaas van Gend
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "commdlg.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
|
||||
|
||||
#include "cdlg.h"
|
||||
#include "cdlg16.h"
|
||||
|
||||
/***********************************************************************
|
||||
* DllEntryPoint [COMMDLG.32]
|
||||
*
|
||||
* Initialization code for the COMMDLG DLL
|
||||
*
|
||||
* RETURNS:
|
||||
*/
|
||||
BOOL WINAPI COMMDLG_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, WORD ds, WORD HeapSize, DWORD res1, WORD res2)
|
||||
{
|
||||
TRACE("(%08lx, %04x, %04x, %04x, %08lx, %04x)\n", Reason, hInst, ds, HeapSize, res1, res2);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CommDlgExtendedError16 [COMMDLG.26]
|
||||
*
|
||||
* Get the last error value if a commdlg function fails.
|
||||
* RETURNS
|
||||
* Current error value which might not be valid
|
||||
* if a previous call succeeded.
|
||||
*/
|
||||
DWORD WINAPI CommDlgExtendedError16(void)
|
||||
{
|
||||
return CommDlgExtendedError();
|
||||
}
|
Loading…
Reference in a new issue