???? ID: 310294 - ????? ???????: 03 ?????? 2010 - ??????: 2.0 ?????????? ?? ????????? ???? ????? C++ ?? ????? ?? ??? ????? ?? ???????? ???? ?? Windows XP ????????? ????? ?? ??? ???? ????
???????????? ???? ??? ????????? ?? ???? ??????? ???? ?? ???? ??? ??????? ??.. ????????? ???? ?? ???? ????????? ?? ??????? ???? ?? ???? ???? ??? ?? ?? ???? ??.. ????????? ???? ?? ??? ?????? ??? ?? ???? ????????? ?? ???????????? ???? ??? ??.. ????????? ?? ??? ?? ????, ???????????? ????, ?? ??????? ???? ?? ???? ??? ???? ????? ?? ???, ????? ???? ?????? ?? ????? ?? ???? ?? Microsoft ???????? ??? ?????:: 322756
(http://support.microsoft.com/kb/322756/
)
??? ?? ???? ?? Windows ??? ????????? ?? ???????????? ???? ???? ???:Microsoft Visual C++ .NET 2002, Microsoft Visual C++ .NET 2003, Microsoft Visual C++ 2005, ?? Microsoft Visual C++ 2008 Microsoft .NET Framework ?????? ??? ?? ??? ?? ???????? ???? ?? ????????? ??? Microsoft Windows ??? ???? ?? ??? ??????? ?? ???? ??? ?? ?? ??????? ???? ????????? ????? C++ ??? ?? ??? ???? ???? ???? ????? ????????????????? ??????????? ?? ?? ?????? ?? ??? ?????: ?????????? ????? ?? ?? ?? ?? ?? ?? ????????? ????? ??? ???? ????????? ?? ????? ???? ?????SHGetFolderPath??? ?????? ?????????? ?? ????????? ?? ??? ??????? ?? ?? ???? ?? ???????? ???? ?? ??? ????? ?????? ????? ??????? ???? ?? ??? ??? ?? ?? ?? ???????? ?? ????? ?? ??? ??? ?? ?????? ???????????? ?? ?????? ?? ??? ?? ????? ?? ????? ???? ?? ??? ???????????? ?? ????? ???? ?? ??? Windows XP ??????????? ?? ??? ?????? ??? ?? ???? ????? ???? ?? ?? ?????????? ???? ?? ????? ????? ??? ??? ????? ?? ???????? ???? ?? ??? ???? ????:
??????????????? ???? outlines ???????? ?????????, ??????????, ??????? ??????, ????, ???????, ?? ???? ???? ???:
?? Win32 ????????? ?????Visual Studio ??????? ????, ?? ??? ??? Win32 ????????? SavingData ??? ??????
????? ???? ?? ' ?????? ?? ??? ??? ?????? ???? ?? ?????
??? ????? ?? ??? ???? ???? ?????? ????? ????? ??? ??????? ?? ????? ?????? ??? ?????????? ??? ????????? ?????????????? ??????(?????? ?????) ?????????? ?? ???? ????????? ??????? (?? ???? ?????????, ???? ??? ??? ???? ?? ??? ???? ????? ?? ???? ????? ?? ??? ????? ??????? ?? ?? descendant) ?? ??? ????? ????? ??? ???? ???, ????? ????? ?? ??? ??????? ???? ????????:: ?? ?????? ????? ??? ???? ??? ??? ?? ???? ????????? ??? ??????? ?? ?????? ?? ?? ???? ??? ??? ? ?? ???? ????? ?????? ?????? ?? ???, ???? ?????????? ?? ???? ??????? ????? ???? ????????? ??????? relocate ?? ???? ???
??????? ???? ?????? ????? ?? ???? ????
???????? ????? ??? ??? ?????? ?????? ????? ?? ???????? ??????(?????? ?????) ????? ????? ???, ?? ???????? ?? ?? ?????????? ?? ??? ??????? ????? ????? ???? ?? ????? ????????? ?? ??? ?? ????????? ??????? ????? ?????? ?? ????OPENFILENAME?????? ?? ???,GetSaveFileName(??GetOpenFileName) ???? ????????? ????????? ????????,???? ?????????? ????? ???, ?? ???? ????????? ??????? ?? ????? ???? ??? ???? ??? ??, ??? ?????????? ?? ????? ?? ????? ?????? ??? ?? ?? ????? ?? ?? ???-??????? ?????? ???? ??, ?? ?????? ???? ?? ??????? ?????? ???? ?? ????? ???? ?? ???? To support the recommended best practice of targeting a specific folder location (such as My Pictures) the first time a user saves or loads a file, and to subsequently default to the user's previously selected location, you should use a Boolean variable to track whether this is the first time the user has performed the Save or Open operation.
Verify the User's Previous Selection
Classify Application DataYou should not store application-specific data (such as temporary files, user preferences, application configuration files, and so on) in the My Documents folder. Instead, use either an appropriate location in the Windows Registry (for data that does not exceed 64 kilobytes) or an application-specific file that is located in a valid Application Data folder.????????? ???? corrupting ?? ??-????? ?? ???? ?? ???????? ?? ???????? ???? ?? ???? ?? ?? ???????? ?? ????? ???? ?? ??? ?? ????? ?? ?????? ???? ?? ??? ??? ????? ?? ???????? ???? ?? ??? ?????????? ??? ???? ????????? ???? ?? ??? ???? ??????? ????? ????????, ???? ???? classify ???? ?? ??? ????? ????????? ?? ????? ????:
????????? ???? ?????? ????? ????????? ?? ????? ????SHGetFolderPath????????? ???? ?? ??? ??????? ?? ??????? ???? ?? ??? ????? ????? ?? ?????? ??? ????????? ???? ???????? ???? ????? Instead, use thePathAppendfunction to append a subfolder to the path thatSHGetFolderPath???? ??? Make sure that you use the following convention:Company Name\Product Name\Product Version For example, the resultant full path may appear as follows:\Documents and Settings\All Users\Application Data\My Company\My Product\1.0 To locate the correct Application Data folder, pass the
appropriateCSIDLvalue, based on the category of your application data.
Use the Registry Judiciously???????????? ???, ????, ?? ????? ?? ????????? ?? ??????? ???? ?? ??? ????? ????? ??? ???? ???????, ??? ?? ????????? ?? ??? ??? ?? ??????? ???? ??? ?? ????? ???????? ??????? ?? ???? ???.. ?????, ????????? ???? ?? ?? ?? ????? ?? ??????????? ???? ???? ???.. ?????? ??????? ?? ???, ????????? ?? ??????? ???? ?? ???? ???? ??? ?? ???.. ???, ??? ??? ?????? ??????? ???? ?? ?? ?? ????????? ?? ???????????? ?? ???? ???.. ????????? ?? ??? ?? ???? ?? ???????????? ???? ?? ????? ?? ???? ??? ???? ??????? ?? ???, Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ????? ????::322756
(http://support.microsoft.com/kb/322756/
)
??? ?? ???? ?? Windows ??? ????????? ?? ???????????? ???? ???? You can also use the registry to store small amounts of application data. For data that exceeds 64 kilobytes (KB), you must use an Application Data folder. Observe the following guidelines when you use the registry to store application data:
?????? ??????
??????For other top-hit Visual C++ .NET Microsoft Knowledge Base
articles, visit the Visual C++ .NET Support Center at the following Microsoft
Web site: Visual C++ .NET (2002) Support Center For more general information about Visual C++ .NET, visit the
following Microsoft Usenet newsgroup:http://support.microsoft.com/default.aspx?xmlid=fh%3BEN-US%3Bvcnet (http://support.microsoft.com/default.aspx?xmlid=fh%3BEN-US%3Bvcnet) Microsoft.public.dotnet.languages.VC
(http://msdn.microsoft.com/newsgroups/default.aspx?query=Microsoft.public.dotnet.languages.vc&dg=&cat=en-us-msdn&lang=en&cr=US&pt=&catlist=774F24A2-F71F-425F-AC2B-DC48AB0DA5C9&dglist=&ptlist=&exp=&sloc=en-us)
For more information about the complete set of folders thatSHGetFolderPathcan identify, see the following Microsoft Platform Software
Development Kit (SDK) documentation:CSIDL For more information about shell programming in general, see the
following Microsoft Developer Network (MSDN) Web site:http://msdn.microsoft.com/en-us/library/bb762494.aspx (http://msdn.microsoft.com/en-us/library/bb762494.aspx) Shell Programmers Guide http://msdn2.microsoft.com/en-us/library/bb776778.aspx (http://msdn2.microsoft.com/en-us/library/bb776778.aspx) ???? ???? ???? ??:
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??. ?????????? ?? ??????? ????????? ??????? ??:310294
(http://support.microsoft.com/kb/310294/en-us/
)
| ???? ?????? ???? ?????? ??????
????????? ?????? ??????? ???????? ??????
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

????? ?? ???? ????
