[SDL] Re User Profile Path
Patricia Curtis
patricia.curtis at gmail.com
Thu Mar 8 00:40:23 PST 2007
Sorry i have sorted it
//the includes
#include "SDL_syswm.h"
#include "SDL_version.h"
#include "Shlobj.h"
//the code
#ifdef WIN32
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if ( SDL_GetWMInfo(&info) > 0 )
{
TCHAR szPath[MAX_PATH];
if(SUCCEEDED(SHGetFolderPath(info.window,
CSIDL_PERSONAL|CSIDL_FLAG_CREATE,
NULL,
SHGFP_TYPE_CURRENT,
szPath)))
{
// Write my file here
}
}
#endif
szPath gives me c:\Documents and Settings\Trish\My Documents change
the CSIDL_PERSONAL for differnt places to store your files
Trish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070308/a854ac7d/attachment.html
More information about the SDL
mailing list