Print Page | Close Window

Problem with SHGetFolderPath and Xtreme Toolkit

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6433
Printed Date: 28 March 2024 at 8:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with SHGetFolderPath and Xtreme Toolkit
Posted By: aimslife
Subject: Problem with SHGetFolderPath and Xtreme Toolkit
Date Posted: 15 February 2007 at 10:57am
Hi,

i made a SDI application in vs2k5. In view class i tried to use SHGetFolderPath() function and include shlobj.h header files on the top.. but some how it is not working and in shlobj.h header file few lines of code are dimmed out

#ifndef _WINRESRC_
#ifndef _WIN32_IE
#define _WIN32_IE 0x0501 <<< this line is dimmed/grayed like
#else
#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
#error _WIN32_IE setting conflicts with _WIN32_WINNT setting
#endif
#endif

but when i tried to use SHGetFolderPath() function in any sample project of Xtreme Toolkit, then its works fine and no problem comes with it... i made all project settings as like in sample project but still SHGetFolderPath() function is not found... i made Standard MFC SDI application to test this function, either SHGetFolderPath() function working or not... but it was working fine... please guide me, what to do solve this problem??? is this problem related to Xtreme Toolkit Api's that wheneven I include its libs and headers the SHGetFolderPath() stops working.



-------------
regards,
-aims
.



Replies:
Posted By: Oleg
Date Posted: 15 February 2007 at 11:08am
Hi,
 
Add to your stdafx.h:
 
#if _MSC_VER > 1200
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER              // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0400       // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT        // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0400     // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS      // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE           // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0500    // Change this to the appropriate value to target IE 5.0 or later.
#endif
#endif


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: aimslife
Date Posted: 15 February 2007 at 11:20am
Hi Oleg,

Thanks, now its working... the problem related to _WIN32_IE macro... some how when we made SDI application with Xtreme Toolkit, it generates _WIN32_IE macro code with 0x0400 value... thats way SHGetFolderPath() function was not working...

Thanks Oleg...



-------------
regards,
-aims
.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net