Click here to Skip to main content
15,903,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: re: sending a text message from main thread to a client thread Pin
Paulo Zemek11-Nov-09 5:29
Paulo Zemek11-Nov-09 5:29 
GeneralRe: re: sending a text message from main thread to a client thread Pin
Rajesh R Subramanian11-Nov-09 6:57
professionalRajesh R Subramanian11-Nov-09 6:57 
QuestionReading and writing files to the System Directory in Windows Vista using C++, MFC and fopen Pin
D_code_writer11-Nov-09 4:20
D_code_writer11-Nov-09 4:20 
AnswerRe: Reading and writing files to the System Directory in Windows Vista using C++, MFC and fopen Pin
David Crow11-Nov-09 4:36
David Crow11-Nov-09 4:36 
AnswerRe: Reading and writing files to the System Directory in Windows Vista using C++, MFC and fopen Pin
Covean11-Nov-09 4:38
Covean11-Nov-09 4:38 
AnswerRe: Reading and writing files to the System Directory in Windows Vista using C++, MFC and fopen Pin
Rolf Kristensen11-Nov-09 9:19
Rolf Kristensen11-Nov-09 9:19 
GeneralRe: Reading and writing files to the System Directory in Windows Vista using C++, MFC and fopen Pin
D_code_writer11-Nov-09 22:56
D_code_writer11-Nov-09 22:56 
GeneralRe: Reading and writing files to the System Directory in Windows Vista using C++, MFC and fopen [modified] Pin
Rolf Kristensen11-Nov-09 23:10
Rolf Kristensen11-Nov-09 23:10 
When you mean operating file, then I guess you mean data files that belongs to your application. Such files should not be placed in the Windows-directory.
What if another application suddenly decides to also use this location, and by mistakes uses your filename-format ?

You should read this guide from Microsoft Data and Settings Management[^] (Though written for Win2k, then it also holds for Vista/Win7)
TCHAR szAppData[MAX_PATH];
...
hr = SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, szAppData);
PathAppend(szAppData, "Company\Product\File.txt")


  • CSIDL_APPDATA - Per user, roaming [user profile]\Application data
  • CSIDL_LOCAL_APPDATA - Per user, non-roaming [user profile]\Local Settings\Application data
  • CSIDL_COMMON_APPDATA - Hidden folder for normal users. Per machine (non-user specific & non- roaming) All Users\Application data
  • CSIDL_COMMON_DOCUMENTS - Visible folder for normal users. Default files in this folder is readonly for other users than the creator, the application must change the security permissions on its application-folder to change this behavior. Per machine (non-user specific & non- roaming) All Users\Documents


modified on Monday, December 14, 2009 10:39 AM

QuestionCFileDialog creates problem under unicode standard Pin
m_mun11-Nov-09 4:20
m_mun11-Nov-09 4:20 
QuestionRe: CFileDialog creates problem under unicode standard Pin
David Crow11-Nov-09 4:28
David Crow11-Nov-09 4:28 
AnswerRe: CFileDialog creates problem under unicode standard Pin
m_mun11-Nov-09 4:30
m_mun11-Nov-09 4:30 
GeneralRe: CFileDialog creates problem under unicode standard Pin
David Crow11-Nov-09 4:32
David Crow11-Nov-09 4:32 
GeneralRe: CFileDialog creates problem under unicode standard [modified] Pin
m_mun11-Nov-09 4:34
m_mun11-Nov-09 4:34 
QuestionRe: CFileDialog creates problem under unicode standard Pin
David Crow11-Nov-09 4:42
David Crow11-Nov-09 4:42 
AnswerRe: CFileDialog creates problem under unicode standard Pin
m_mun11-Nov-09 4:46
m_mun11-Nov-09 4:46 
AnswerRe: CFileDialog creates problem under unicode standard Pin
m_mun11-Nov-09 4:55
m_mun11-Nov-09 4:55 
GeneralRe: CFileDialog creates problem under unicode standard Pin
David Crow11-Nov-09 5:14
David Crow11-Nov-09 5:14 
QuestionCreating a expert system and need some help please Pin
akshay174111-Nov-09 4:19
akshay174111-Nov-09 4:19 
AnswerRe: Creating a expert system and need some help please Pin
Richard MacCutchan11-Nov-09 7:48
mveRichard MacCutchan11-Nov-09 7:48 
AnswerRe: Creating a expert system and need some help please Pin
Maximilien11-Nov-09 9:44
Maximilien11-Nov-09 9:44 
QuestionIntercepting the TerminateProcess event Pin
Krischu11-Nov-09 4:09
Krischu11-Nov-09 4:09 
AnswerRe: Intercepting the TerminateProcess event Pin
Covean11-Nov-09 4:23
Covean11-Nov-09 4:23 
GeneralRe: Intercepting the TerminateProcess event Pin
Krischu11-Nov-09 5:50
Krischu11-Nov-09 5:50 
GeneralRe: Intercepting the TerminateProcess event Pin
Covean11-Nov-09 21:19
Covean11-Nov-09 21:19 
GeneralRe: Intercepting the TerminateProcess event Pin
Krischu11-Nov-09 22:02
Krischu11-Nov-09 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.