Hi,
I don't know how to select between 5 and 6.
The next C function enable to know the actual version.
I think convertion to Forth is a trivial work.
Charles
__________
int GetComCtlVersion()
{
// Load the Common Controls DLL
HMODULE hComCtl =3D ::LoadLibraryA("COMCTL32.DLL");
if (!hComCtl)
return 0;
int ComCtlVer =3D 400;
if (::GetProcAddress(hComCtl, "InitCommonControlsEx"))
{
// InitCommonControlsEx is unique to 4.7 and later
ComCtlVer =3D 470;
if (::GetProcAddress(hComCtl, "DllInstall"))
{
// DllInstall is unique to 4.71 and later
ComCtlVer =3D 471;
typedef HRESULT CALLBACK DLLGETVERSION(DLLVERSIONINFO*);
DLLGETVERSION* pfnDLLGetVersion =3D NULL;
pfnDLLGetVersion =3D=20
(DLLGETVERSION*)::GetProcAddress(hComCtl, =
"DllGetVersion");
if(pfnDLLGetVersion)
{
DLLVERSIONINFO dvi;
dvi.cbSize =3D sizeof dvi;
if(NOERROR =3D=3D pfnDLLGetVersion(&dvi))
{
DWORD dwVerMajor =3D dvi.dwMajorVersion;
DWORD dwVerMinor =3D dvi.dwMinorVersion;
ComCtlVer =3D 100 * dwVerMajor + dwVerMinor;
}
}
}
}
::FreeLibrary(hComCtl);
// return values and DLL versions
// 400 dll ver 4.00 Windows 95/Windows NT 4.0
// 470 dll ver 4.70 Internet Explorer 3.x
// 471 dll ver 4.71 Internet Explorer 4.0
// 472 dll ver 4.72 Internet Explorer 4.01 and Windows 98
// 580 dll ver 5.80 Internet Explorer 5
// 581 dll ver 5.81 Windows 2000 and Windows ME
// 582 dll ver 5.82 Windows XP or Vista without XP themes
// 600 dll ver 6.00 Windows XP with XP themes
// 610 dll ver 6.10 Windows Vista with XP themes
return ComCtlVer;
}
-----Message d'origine-----
De=A0: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] De la =
part de
Rick VanNorman
Envoy=E9=A0: dimanche 2 mai 2010 20:22
=C0=A0: sftalk_at_forth.com
Objet=A0: [sftalk] Re: COMCTL32 controls versions
I will be happy to look into this issue at a very casual level. Please
provide me with source code so that I don't have to re-invent a bench to
test this against.
Email the source to me, please. The list will get copied later, =
hopefully
with a solution.
And, if anyone else already has a solution, please speak up. No point in
doing the thing twice!
Thanks,
Rick VanNorman
rick_at_neverslow.com
On Sun, May 2, 2010 at 12:44 PM, Douglas Reid
<douglas.reid_at_dunvegan.co.uk>wrote:
> I am wondering how it is possible to select between the versions 5 and =
6
of
> the Comctl32.dll controls library?
> I am using Windows XP Professional with recent service packs installed =
so
> version 6 of Comctl32.dll is present on the PC (although version 5 is =
also
> present elsewhere).
>
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sun May 02 2010 - 11:57:41 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 06-Feb-2012. Archive updated nightly.