Click here to Skip to main content
15,908,264 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ help for arrays...average a value Pin
PJ Arends29-Apr-07 17:32
professionalPJ Arends29-Apr-07 17:32 
GeneralRe: C++ help for arrays...average a value Pin
wertyou29-Apr-07 17:42
wertyou29-Apr-07 17:42 
Questionhow to get temp folder path Pin
near2world29-Apr-07 5:04
near2world29-Apr-07 5:04 
AnswerRe: how to get temp folder path Pin
#realJSOP29-Apr-07 6:15
professional#realJSOP29-Apr-07 6:15 
GeneralRe: how to get temp folder path [modified] Pin
near2world30-Apr-07 3:16
near2world30-Apr-07 3:16 
GeneralRe: how to get temp folder path Pin
#realJSOP30-Apr-07 13:05
professional#realJSOP30-Apr-07 13:05 
GeneralRe: how to get temp folder path Pin
near2world1-May-07 0:19
near2world1-May-07 0:19 
AnswerRe: how to get temp folder path Pin
Mark Salsbery29-Apr-07 7:57
Mark Salsbery29-Apr-07 7:57 
In the "old days" the "TEMP" or "TMP" environment variable was used.

The GetTempPath() API will get you that path.

For new apps, I highly recommend following the OS guidelines for storing application data.
It can save a lot of headaches in the newer, more secure, OSs (ie Vista).

The best document I've found for this is the XP logo specs, section 3 (more specifically, 3.2).
Here's an excerpt:

From "Designed for Microsoft Windows XP” Application Specification

This section identifies the valid file folders and the valid registry locations that applications
must use for this data, and gives guidance on how to choose which of these locations are best
used in different circumstances. The choice of valid locations to use is left to the software
developer.
Classify application data into the following categories:
• Per user, roaming
• Per user, non-roaming
• Per computer (non-user specific and non-roaming)
NOTE There may be more than one category for the different application data stored by your
application.
For applications not intended to be used in a domain environment (most games and home products
for example), classifying the application data as per user, non-roaming might be an appropriate
choice.
It is best to use application data file folders rather than the registry for storing application
data in excess of 64K. The registry is an acceptable choice for small amounts of data. At
installation time, try to store less than a total of 128K across HKEY_CURRENT_USER (HKCU) and
HKEY_LOCAL_MACHINE (HKLM).
To comply with this specification, store application data files appropriately as either common or
per-user. That is:
• In a subfolder of either the common application folder (identified by
CSIDL_COMMON_APPDATA), or
• In the user profile folders: application data (CSIDL_APPDATA) or local application data
(CSIDL_LOCAL_APPDATA).

The subfolder to create to store user data files in is:
[company name]\[product name]\[version].


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

GeneralRe: how to get temp folder path Pin
near2world30-Apr-07 3:19
near2world30-Apr-07 3:19 
GeneralRe: how to get temp folder path Pin
Mark Salsbery30-Apr-07 6:13
Mark Salsbery30-Apr-07 6:13 
GeneralRe: how to get temp folder path Pin
near2world1-May-07 0:18
near2world1-May-07 0:18 
AnswerRe: how to get temp folder path Pin
Nibu babu thomas29-Apr-07 17:37
Nibu babu thomas29-Apr-07 17:37 
GeneralRe: how to get temp folder path Pin
near2world30-Apr-07 3:21
near2world30-Apr-07 3:21 
GeneralRe: how to get temp folder path Pin
Nibu babu thomas2-May-07 17:16
Nibu babu thomas2-May-07 17:16 
AnswerRe: how to get temp folder path Pin
Michael Dunn29-Apr-07 20:53
sitebuilderMichael Dunn29-Apr-07 20:53 
GeneralRe: how to get temp folder path Pin
near2world30-Apr-07 3:22
near2world30-Apr-07 3:22 
GeneralRe: how to get temp folder path Pin
Michael Dunn30-Apr-07 12:43
sitebuilderMichael Dunn30-Apr-07 12:43 
GeneralRe: how to get temp folder path Pin
near2world1-May-07 0:02
near2world1-May-07 0:02 
QuestionHow to Add jpeg image as a dialog formp's backgroung Pin
gsheladia29-Apr-07 4:23
gsheladia29-Apr-07 4:23 
AnswerRe: How to Add jpeg image as a dialog formp's backgroung Pin
#realJSOP29-Apr-07 6:16
professional#realJSOP29-Apr-07 6:16 
AnswerRe: How to Add jpeg image as a dialog formp's backgroung Pin
Paresh Chitte29-Apr-07 19:19
Paresh Chitte29-Apr-07 19:19 
QuestionUnresolved Externals [SOLVED] Pin
#realJSOP29-Apr-07 3:34
professional#realJSOP29-Apr-07 3:34 
AnswerRe: Unresolved Externals Pin
Mark Salsbery29-Apr-07 8:04
Mark Salsbery29-Apr-07 8:04 
GeneralRe: Unresolved Externals Pin
#realJSOP29-Apr-07 11:08
professional#realJSOP29-Apr-07 11:08 
AnswerRe: Unresolved Externals Pin
Cedric Moonen29-Apr-07 8:07
Cedric Moonen29-Apr-07 8:07 

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.