|
From: Emilien K. <cur...@us...> - 2005-04-19 09:30:57
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26421/src/msw Modified Files: FileSystemStandard.cpp Log Message: Utilisation des classe de base de registre de wx à la place des fonction du WINSDK. Index: FileSystemStandard.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/msw/FileSystemStandard.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FileSystemStandard.cpp 16 Mar 2005 14:34:58 -0000 1.3 --- FileSystemStandard.cpp 19 Apr 2005 09:30:46 -0000 1.4 *************** *** 26,29 **** --- 26,30 ---- #include <wx/utils.h> + #include <wx/config.h> using namespace wxDevCenter; *************** *** 334,355 **** m_strNameComputer(WXDC_WINDOWS_COMPUTER) { ! HKEY key; ! char buffer[MAX_PATH]; ! unsigned long size; ! ! ! if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", 0, KEY_READ, &key)==ERROR_SUCCESS) { ! size=MAX_PATH; ! RegQueryValueEx(key, "Desktop", NULL, NULL, (unsigned char*)buffer, &size); ! m_strPathDesktop = FilePath(buffer); ! ! size=MAX_PATH; ! RegQueryValueEx(key, "Personal", NULL, NULL, (unsigned char*)buffer, &size); ! m_strPathDocuments = FilePath(buffer); } else ! m_strFindPath = "Error"; ! m_strComputerName = wxGetHostName(); --- 335,348 ---- m_strNameComputer(WXDC_WINDOWS_COMPUTER) { ! wxRegKey key("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"); ! key.Open(); ! if(key.IsOpened()) { ! key.QueryValue(wxT("Desktop"), m_strPathDesktop); ! key.QueryValue(wxT("Personal"), m_strPathDocuments); ! key.Close(); } else ! m_strFindPath = wxT("Error"); m_strComputerName = wxGetHostName(); |