From: <mie...@us...> - 2009-09-28 18:34:52
|
Revision: 5218 http://oorexx.svn.sourceforge.net/oorexx/?rev=5218&view=rev Author: miesfeld Date: 2009-09-28 18:34:40 +0000 (Mon, 28 Sep 2009) Log Message: ----------- 2869039 ooDialog may fail under certain versions of XP Modified Paths: -------------- main/trunk/extensions/platform/windows/oodialog/oodUtilities.cpp Modified: main/trunk/extensions/platform/windows/oodialog/oodUtilities.cpp =================================================================== --- main/trunk/extensions/platform/windows/oodialog/oodUtilities.cpp 2009-09-28 18:29:45 UTC (rev 5217) +++ main/trunk/extensions/platform/windows/oodialog/oodUtilities.cpp 2009-09-28 18:34:40 UTC (rev 5218) @@ -52,10 +52,21 @@ /** - * Defines and structs for the DlgUtil class. + * Defines, structs, and methods for the DlgUtil class. */ -#define DLGUTILCLASS ".DlgUtil" +#define DLGUTIL_CLASS "DlgUtil" +/** + * Do not include ICC_STANDARD_CLASSES. Some versions of Windows XP have a bug + * that causes InitCommonControlsEx() to fail when that flag is used. The flag + * itself is not needed under any version of Windows. + * + * Note: These flags are valid under any supported CommCtrl32 version. But, as + * ooDialog adds support for more dialog controls, it may become necessary to + * check the CommCtrl32 version and have a different set of flags for certain + * versions. + */ +#define INITCOMMONCONTROLS_CLASS_FLAGS ICC_WIN95_CLASSES | ICC_DATE_CLASSES const char *comctl32VersionPart(DWORD id, DWORD type) { @@ -175,11 +186,6 @@ } /** - * Methods for the .DlgUtil class. - */ -#define DLG_UTIL_CLASS "DlgUtil" - -/** * Determines the version of comctl32.dll and compares it against a minimum * required version. * @@ -340,8 +346,7 @@ return false; } - if ( ! initCommonControls(context, ICC_WIN95_CLASSES | ICC_STANDARD_CLASSES | ICC_DATE_CLASSES, - "ooDialog", COMCTL_ERR_TITLE) ) + if ( ! initCommonControls(context, INITCOMMONCONTROLS_CLASS_FLAGS, "ooDialog", COMCTL_ERR_TITLE) ) { ComCtl32Version = 0; return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |