* Sync with Wine 1.7.17.
CORE-8080
svn path=/trunk/; revision=62881
/***********************************************************************
* CC_MouseCheckPredefColorArray [internal]
- * returns 1 if one of the predefined colors is clicked
+ * returns TRUE if one of the predefined colors is clicked
*/
-static int CC_MouseCheckPredefColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam)
+static BOOL CC_MouseCheckPredefColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam)
{
HWND hwnd;
POINT point;
y = point.y / dy;
lpp->lpcc->rgbResult = predefcolors[y][x];
CC_DrawFocusRect(lpp, hwnd, x, y, rows, cols);
- return 1;
+ return TRUE;
}
}
- return 0;
+ return FALSE;
}
/***********************************************************************
* CC_MouseCheckUserColorArray [internal]
- * return 1 if the user clicked a color
+ * return TRUE if the user clicked a color
*/
-static int CC_MouseCheckUserColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam)
+static BOOL CC_MouseCheckUserColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam)
{
HWND hwnd;
POINT point;
y = point.y / dy;
lpp->lpcc->rgbResult = crarr[x + (cols * y) ];
CC_DrawFocusRect(lpp, hwnd, x, y, rows, cols);
- return 1;
+ return TRUE;
}
}
- return 0;
+ return FALSE;
}
#define MAXVERT 240
/***********************************************************************
* CC_MouseCheckColorGraph [internal]
*/
-static int CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *vert, LPARAM lParam )
+static BOOL CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *vert, LPARAM lParam )
{
HWND hwnd;
POINT point;
GetWindowRect(hwnd, &rect);
if (!PtInRect(&rect, point))
- return 0;
+ return FALSE;
GetClientRect(hwnd, &rect);
ScreenToClient(hwnd, &point);
if (vert)
*vert = y;
- return 1;
+ return TRUE;
}
/***********************************************************************
* CC_MouseCheckResultWindow [internal]
* test if double click one of the result colors
*/
-static int CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam )
+static BOOL CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam )
{
HWND hwnd;
POINT point;
if (PtInRect(&rect, point))
{
PostMessageA(hDlg, WM_COMMAND, IDC_COLOR_RES, 0);
- return 1;
+ return TRUE;
}
- return 0;
+ return FALSE;
}
/***********************************************************************
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#pragma makedep register
+
[
helpstring("File Open Dialog"),
threading(apartment),
-Index: filedlg.c\r
-===================================================================\r
---- filedlg.c (Revision 56893)\r
-+++ filedlg.c (Arbeitskopie)\r
-@@ -260,6 +260,8 @@\r
- HRSRC hRes;
- HANDLE hDlgTmpl = 0;
- HRESULT hr;
-+ DWORD dwSize;
-+ LPDLGTEMPLATE hDialogTemplate;
-
- /* test for missing functionality */
- if (fodInfos->ofnInfos->Flags & UNIMPLEMENTED_FLAGS)
-@@ -276,12 +278,17 @@\r
- return FALSE;
- }
- if (!(hDlgTmpl = LoadResource(COMDLG32_hInstance, hRes )) ||
-+ !(dwSize = SizeofResource(COMDLG32_hInstance, hRes )) ||
-+ !(hDialogTemplate = malloc(dwSize)) ||
- !(template = LockResource( hDlgTmpl )))
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
- return FALSE;
- }
-
-+ /* Copy the read only resource */
-+ memcpy(hDialogTemplate, template, dwSize);
-+
- /* msdn: explorer style dialogs permit sizing by default.
- * The OFN_ENABLESIZING flag is only needed when a hook or
- * custom tmeplate is provided */
-@@ -291,12 +298,12 @@\r
-
- if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)
- {
-- ((LPDLGTEMPLATEW)template)->style |= WS_SIZEBOX;
-+ hDialogTemplate->style |= WS_SIZEBOX;
- fodInfos->sizedlg.cx = fodInfos->sizedlg.cy = 0;
- fodInfos->initial_size.x = fodInfos->initial_size.y = 0;
- }
- else
-- ((LPDLGTEMPLATEW)template)->style &= ~WS_SIZEBOX;
-+ hDialogTemplate->style &= ~WS_SIZEBOX;
-
-
- /* old style hook messages */
-@@ -313,19 +320,21 @@\r
-
- if (fodInfos->unicode)
- lRes = DialogBoxIndirectParamW(COMDLG32_hInstance,
-- template,
-+ hDialogTemplate,
- fodInfos->ofnInfos->hwndOwner,
- FileOpenDlgProc95,
- (LPARAM) fodInfos);
- else
- lRes = DialogBoxIndirectParamA(COMDLG32_hInstance,
-- template,
-+ hDialogTemplate,
- fodInfos->ofnInfos->hwndOwner,
- FileOpenDlgProc95,
- (LPARAM) fodInfos);
-- if (SUCCEEDED(hr))
-+ if (SUCCEEDED(hr))
- OleUninitialize();
-
-+ free(hDialogTemplate);
-+
- /* Unable to create the dialog */
- if( lRes == -1)
- return FALSE;
+diff -prudN e:\Wine\dlls\comdlg32/cdlg32.c e:\reactos\dll\win32\comdlg32/cdlg32.c\r
+--- e:\Wine\dlls\comdlg32/cdlg32.c 2013-10-26 22:24:27.508648000 +0100\r
++++ e:\reactos\dll\win32\comdlg32/cdlg32.c 2014-03-05 11:46:06.260510700 +0100\r
+@@ -174,6 +157,8 @@ DWORD WINAPI CommDlgExtendedError(void)\r
+ return 0; /* we never set an error, so there isn't one */\r
+ }\r
+ \r
++#ifndef __REACTOS__ /* Win 7 */\r
++\r
+ /*************************************************************************\r
+ * Implement the CommDlg32 class factory\r
+ *\r
+@@ -283,7 +268,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSI\r
+ */\r
+ HRESULT WINAPI DllRegisterServer(void)\r
+ {\r
+- return __wine_register_resources(COMDLG32_hInstance);\r
++ return E_FAIL; // FIXME: __wine_register_resources(COMDLG32_hInstance);\r
+ }\r
+ \r
+ /***********************************************************************\r
+@@ -291,5 +276,7 @@ HRESULT WINAPI DllRegisterServer(void)\r
+ */\r
+ HRESULT WINAPI DllUnregisterServer(void)\r
+ {\r
+- return __wine_unregister_resources(COMDLG32_hInstance);\r
++ return E_FAIL; // FIXME: __wine_unregister_resources(COMDLG32_hInstance);\r
+ }\r
++\r
++#endif /* Win 7 */\r
+\r
+diff -prudN e:\Wine\dlls\comdlg32/comdlg32.spec e:\reactos\dll\win32\comdlg32/comdlg32.spec\r
+--- e:\Wine\dlls\comdlg32/comdlg32.spec 2011-09-16 23:22:36.026770600 +0100\r
++++ e:\reactos\dll\win32\comdlg32/comdlg32.spec 2012-02-15 22:32:22.456422900 +0100\r
+@@ -3,9 +3,9 @@\r
+ @ stdcall ChooseFontA(ptr)\r
+ @ stdcall ChooseFontW(ptr)\r
+ @ stdcall CommDlgExtendedError()\r
+-@ stdcall -private DllGetClassObject(ptr ptr ptr)\r
+-@ stdcall -private DllRegisterServer()\r
+-@ stdcall -private DllUnregisterServer()\r
++;@ stdcall -private DllGetClassObject(ptr ptr ptr) ; Win 7\r
++;@ stdcall -private DllRegisterServer() ; Win 7\r
++;@ stdcall -private DllUnregisterServer() ; Win 7\r
+ @ stdcall FindTextA(ptr)\r
+ @ stdcall FindTextW(ptr)\r
+ @ stdcall GetFileTitleA(str ptr long)\r
+\r
+diff -prudN e:\Wine\dlls\comdlg32/itemdlg.c e:\reactos\dll\win32\comdlg32/itemdlg.c\r
+--- e:\Wine\dlls\comdlg32/itemdlg.c 2013-10-26 22:24:27.515652700 +0100\r
++++ e:\reactos\dll\win32\comdlg32/itemdlg.c 2013-10-15 19:32:27.803008200 +0100\r
+@@ -18,6 +18,8 @@\r
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
+ \r
++#ifndef __REACTOS__ /* Win 7 */\r
++\r
+ #include <stdarg.h>\r
+ \r
+ #define COBJMACROS\r
+@@ -3660,3 +3662,5 @@ HRESULT FileSaveDialog_Constructor(IUnkn\r
+ {\r
+ return FileDialog_constructor(pUnkOuter, riid, ppv, ITEMDLG_TYPE_SAVE);\r
+ }\r
++\r
++#endif /* Win 7 */\r
ret = GetFileName95(&fodInfos);
break;
default :
- ret = 0;
+ ret = FALSE;
}
if (lpstrSavDir)
ret = GetFileName95(&fodInfos);
break;
default :
- ret = 0;
+ ret = FALSE;
}
if (lpstrSavDir)
*/
static LRESULT FILEDLG95_InitControls(HWND hwnd)
{
- int win2000plus = 0;
- int win98plus = 0;
- int handledPath = FALSE;
+ BOOL win2000plus = FALSE;
+ BOOL win98plus = FALSE;
+ BOOL handledPath = FALSE;
OSVERSIONINFOW osVi;
static const WCHAR szwSlash[] = { '\\', 0 };
static const WCHAR szwStar[] = { '*',0 };
}
/* 2. (All platforms) If initdir is not null, then use it */
- if ((handledPath == FALSE) && (fodInfos->initdir!=NULL) &&
- (*fodInfos->initdir!=0x00))
+ if (!handledPath && fodInfos->initdir && *fodInfos->initdir)
{
/* Work out the proper path as supplied one might be relative */
/* (Here because supplying '.' as dir browses to My Computer) */
- if (handledPath==FALSE) {
+ if (!handledPath) {
WCHAR tmpBuf[MAX_PATH];
WCHAR tmpBuf2[MAX_PATH];
WCHAR *nameBit;
}
}
- if ((handledPath == FALSE) && ((fodInfos->initdir==NULL) ||
- (*fodInfos->initdir==0x00)))
+ if (!handledPath && (!fodInfos->initdir || !*fodInfos->initdir))
{
/* 3. All except w2k+: if filename contains a path use it */
if (!win2000plus && fodInfos->filename &&
}
/* 4. Win2000+: Recently used */
- if (handledPath == FALSE && win2000plus) {
+ if (!handledPath && win2000plus) {
fodInfos->initdir = MemAlloc(MAX_PATH * sizeof(WCHAR));
fodInfos->initdir[0] = '\0';
/* 5. win98+ and win2000+ if any files of specified filter types in
current directory, use it */
- if ( win98plus && handledPath == FALSE &&
- fodInfos->filter && *fodInfos->filter) {
+ if (win98plus && !handledPath && fodInfos->filter && *fodInfos->filter) {
LPCWSTR lpstrPos = fodInfos->filter;
WIN32_FIND_DATAW FindFileData;
}
/* 6. Win98+ and 2000+: Use personal files dir, others use current dir */
- if (handledPath == FALSE && (win2000plus || win98plus)) {
+ if (!handledPath && (win2000plus || win98plus)) {
fodInfos->initdir = MemAlloc(MAX_PATH*sizeof(WCHAR));
if(!COMDLG32_SHGetFolderPathW(hwnd, CSIDL_PERSONAL, 0, 0, fodInfos->initdir))
TRACE("No initial dir specified, using personal files dir of %s\n", debugstr_w(fodInfos->initdir));
}
handledPath = TRUE;
- } else if (handledPath==FALSE) {
+ } else if (!handledPath) {
fodInfos->initdir = MemAlloc(MAX_PATH*sizeof(WCHAR));
GetCurrentDirectoryW(MAX_PATH, fodInfos->initdir);
handledPath = TRUE;
*/
static BOOL FD31_Init(void)
{
- static BOOL initialized = 0;
+ static BOOL initialized = FALSE;
if (!initialized) {
hFolder = LoadImageA( COMDLG32_hInstance, "FOLDER", IMAGE_ICON, 16, 16, LR_SHARED );
if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 ||
hHDisk == 0 || hCDRom == 0 || hNet == 0)
{
- ERR("Error loading icons !\n");
+ ERR("Error loading icons!\n");
return FALSE;
}
initialized = TRUE;
*
* Fill font style information into combobox (without using font.c directly)
*/
-static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
+static BOOL SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
{
#define FSTYLES 4
struct FONTSTYLE
WCHAR name[64];
LoadStringW(COMDLG32_hInstance, fontstyles[i].resId, name, 64);
j=SendMessageW(hwnd,CB_ADDSTRING,0,(LPARAM)name );
- if (j==CB_ERR) return 1;
+ if (j==CB_ERR) return TRUE;
j=SendMessageW(hwnd, CB_SETITEMDATA, j,
MAKELONG(tm.tmWeight,fontstyles[i].italic));
- if (j==CB_ERR) return 1;
+ if (j==CB_ERR) return TRUE;
}
}
- return 0;
+ return FALSE;
}
/*************************************************************************
* AddFontSizeToCombo3 [internal]
*/
-static int AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
+static BOOL AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
{
int j;
WCHAR buffer[20];
{
j=SendMessageW(hwnd, CB_ADDSTRING, 0, (LPARAM)buffer);
if (j!=CB_ERR) j = SendMessageW(hwnd, CB_SETITEMDATA, j, h);
- if (j==CB_ERR) return 1;
+ if (j==CB_ERR) return TRUE;
}
}
- return 0;
+ return FALSE;
}
/*************************************************************************
* SetFontSizesToCombo3 [internal]
*/
-static int SetFontSizesToCombo3(HWND hwnd, const CHOOSEFONTW *lpcf)
+static BOOL SetFontSizesToCombo3(HWND hwnd, const CHOOSEFONTW *lpcf)
{
static const BYTE sizes[]={6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
unsigned int i;
for (i = 0; i < sizeof(sizes)/sizeof(sizes[0]); i++)
- if (AddFontSizeToCombo3(hwnd, sizes[i], lpcf)) return 1;
- return 0;
+ if (AddFontSizeToCombo3(hwnd, sizes[i], lpcf)) return TRUE;
+ return FALSE;
}
/*************************************************************************
INT points;
points = MulDiv( lpNTM->ntmTm.tmHeight - lpNTM->ntmTm.tmInternalLeading,
72, GetScreenDPI());
- i = AddFontSizeToCombo3(hcmb3, points, lpcf);
- if(i) return 0;
+ if (AddFontSizeToCombo3(hcmb3, points, lpcf))
+ return 0;
} else if (SetFontSizesToCombo3(hcmb3, lpcf)) return 0;
if (!SendMessageW(hcmb2, CB_GETCOUNT, 0, 0))
{
+ BOOL res;
if(!(hdc = CFn_GetDC(lpcf))) return 0;
- i=SetFontStylesToCombo2(hcmb2,hdc,lplf);
+ res = SetFontStylesToCombo2(hcmb2,hdc,lplf);
CFn_ReleaseDC(lpcf, hdc);
- if (i)
+ if (res)
return 0;
}
if (!( hcmb5 = GetDlgItem(hDlg, cmb5))) return 1;
return 1 ;
}
-static INT CFn_FitFontSize( HWND hDlg, int points)
+static BOOL CFn_FitFontSize( HWND hDlg, int points)
{
int i,n;
- int ret = 0;
+ BOOL ret = FALSE;
/* look for fitting font size in combobox3 */
n=SendDlgItemMessageW(hDlg, cmb3, CB_GETCOUNT, 0, 0);
for (i=0;i<n;i++)
SendMessageW(hDlg, WM_COMMAND,
MAKEWPARAM(cmb3, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb3));
- ret = 1;
+ ret = TRUE;
break;
}
}
return ret;
}
-static INT CFn_FitFontStyle( HWND hDlg, LONG packedstyle )
+static BOOL CFn_FitFontStyle( HWND hDlg, LONG packedstyle )
{
LONG id;
- int i, ret = 0;
+ int i;
+ BOOL ret = FALSE;
/* look for fitting font style in combobox2 */
for (i=0;i<TEXT_EXTRAS;i++)
{
SendDlgItemMessageW(hDlg, cmb2, CB_SETCURSEL, i, 0);
SendMessageW(hDlg, WM_COMMAND, MAKEWPARAM(cmb2, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb2));
- ret = 1;
+ ret = TRUE;
break;
}
}
}
-static INT CFn_FitCharSet( HWND hDlg, int charset )
+static BOOL CFn_FitCharSet( HWND hDlg, int charset )
{
int i,n,cs;
/* look for fitting char set in combobox5 */
SendDlgItemMessageW(hDlg, cmb5, CB_SETCURSEL, i, 0);
SendMessageW(hDlg, WM_COMMAND, MAKEWPARAM(cmb5, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb2));
- return 1;
+ return TRUE;
}
}
/* no charset fits: select the first one in the list */
SendDlgItemMessageW(hDlg, cmb5, CB_SETCURSEL, 0, 0);
SendMessageW(hDlg, WM_COMMAND, MAKEWPARAM(cmb5, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb2));
- return 0;
+ return FALSE;
}
/***********************************************************************
static LRESULT CFn_WMInitDialog(HWND hDlg, LPARAM lParam, LPCHOOSEFONTW lpcf)
{
HDC hdc;
- int i,j,init=0;
+ int i,j;
+ BOOL init = FALSE;
long pstyle;
CFn_ENUMSTRUCT s;
LPLOGFONTW lpxx;
if (lpcf->lStructSize != sizeof(CHOOSEFONTW))
{
- ERR("structure size failure !!!\n");
+ ERR("structure size failure!!!\n");
EndDialog (hDlg, 0);
return FALSE;
}
SendDlgItemMessageW(hDlg, cmb1, CB_SETCURSEL, j, 0);
SendMessageW(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),
(LPARAM)GetDlgItem(hDlg,cmb1));
- init=1;
+ init = TRUE;
/* look for fitting font style in combobox2 */
CFn_FitFontStyle(hDlg, pstyle);
/* look for fitting font size in combobox3 */
PrintStructures->hNoCollateIcon == 0 ||
PrintStructures->hPortraitIcon == 0 ||
PrintStructures->hLandscapeIcon == 0) {
- ERR("no icon in resourcefile\n");
+ ERR("no icon in resource file\n");
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
EndDialog(hDlg, FALSE);
}
PrintStructures->hNoCollateIcon == 0 ||
PrintStructures->hPortraitIcon == 0 ||
PrintStructures->hLandscapeIcon == 0) {
- ERR("no icon in resourcefile\n");
+ ERR("no icon in resource file\n");
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
EndDialog(hDlg, FALSE);
}
}
if(lppd->lStructSize != sizeof(PRINTDLGA)) {
- WARN("structure size failure !!!\n");
+ WARN("structure size failure!!!\n");
COMDLG32_SetCommDlgExtendedError(CDERR_STRUCTSIZE);
return FALSE;
}
}
if(lppd->lStructSize != sizeof(PRINTDLGW)) {
- WARN("structure size failure !!!\n");
+ WARN("structure size failure!!!\n");
COMDLG32_SetCommDlgExtendedError(CDERR_STRUCTSIZE);
return FALSE;
}
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.17
-reactos/dll/win32/comdlg32 # Synced to Wine 1.7.1
+reactos/dll/win32/comdlg32 # Synced to Wine 1.7.17
reactos/dll/win32/compstui # Synced to Wine-1.7.1
reactos/dll/win32/credui # Synced to Wine-1.7.1
reactos/dll/win32/crypt32 # Synced to Wine-1.7.1