{"id":2244,"date":"2010-03-26T00:31:28","date_gmt":"2010-03-25T15:31:28","guid":{"rendered":"http:\/\/mimumimu.net\/blog\/2010\/03\/26\/vista-%e4%bb%a5%e9%99%8d%e3%81%aeos-%e3%81%a7-cfiledialog-%e3%81%8c%e4%bd%bf%e3%81%88%e3%81%aa%e3%81%84%e5%a0%b4%e5%90%88%e3%81%ae%e4%bb%a3%e6%9b%bf%e6%96%b9%e6%b3%95\/"},"modified":"2012-04-21T18:25:19","modified_gmt":"2012-04-21T09:25:19","slug":"vista-%e4%bb%a5%e9%99%8d%e3%81%aeos-%e3%81%a7-cfiledialog-%e3%81%8c%e4%bd%bf%e3%81%88%e3%81%aa%e3%81%84%e5%a0%b4%e5%90%88%e3%81%ae%e4%bb%a3%e6%9b%bf%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/mimumimu.net\/blog\/2010\/03\/26\/vista-%e4%bb%a5%e9%99%8d%e3%81%aeos-%e3%81%a7-cfiledialog-%e3%81%8c%e4%bd%bf%e3%81%88%e3%81%aa%e3%81%84%e5%a0%b4%e5%90%88%e3%81%ae%e4%bb%a3%e6%9b%bf%e6%96%b9%e6%b3%95\/","title":{"rendered":"Vista \u4ee5\u964d\u3067 CFileDialog \u306b\u304a\u3044\u3066 SetTemplate \u304c\u4f7f\u3048\u306a\u3044\u5834\u5408\u306e\u4ee3\u66ff\u65b9\u6cd5"},"content":{"rendered":"<p>Mimura \u3067\u3059\u3002    <br \/>\u5148\u307b\u3069\u3001STEP_M 1.053 \u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u4eca\u56de\u306e\u30cd\u30c3\u30af\u306f CFileDialog \u306b\u304a\u3044\u3066 Vista \u4ee5\u964d\u306e\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u30c0\u30a4\u30a2\u30ed\u30b0\u3067\u306f\u3001    <br \/>SetTemplate \u304c\u4f7f\u7528\u3067\u304d\u306a\u3044\u3053\u3068\u3067\u3057\u305f\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u305d\u3053\u3067\u3001\u79c1\u3082\u3053\u306e\u60c5\u5831\u3092\u898b\u3064\u3051\u308b\u307e\u3067\u306b\u304b\u306a\u308a\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3057\u305f\u306e\u3067\u3001    <br \/>\u30e1\u30e2\u3068\u3057\u3066\u3001\u307e\u305f\u540c\u3058\u60a9\u307f\u3092\u62b1\u3048\u3066\u3044\u308b\u4eba\u306b\u6709\u7528\u306a\u7269\u3068\u306a\u308c\u3070\u3044\u3044\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<p>\uff08\u3042\u3089\u304b\u3058\u3081\u65ad\u3063\u3066\u304a\u304d\u307e\u3059\u3068\u3001\u3042\u3093\u307e\u308aMFC \u3092\u4f7f\u3044\u305f\u304f\u306a\u3044\u4eba\u3067\u3059\u3002\u79c1\u3002\uff09<\/p>\n<p>&#160;<\/p>\n<p>&#160;<\/p>\n<p>SetTemplate \u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u5927\u4f53\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3068\u306a\u3063\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002    <\/p>\n<blockquote>\n<p>CMyFileDialog::CMyFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)       <br \/>{       <br \/>&#160;&#160;&#160; SetTemplate(0, IDD_CUSTOM_FILE_OPEN);       <br \/>}<\/p>\n<\/blockquote>\n<p>\uff08STEP_M \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 MyFileDialog.cpp \u3088\u308a)    <\/p>\n<p>XP,2000 \u3067\u306f\u3053\u306e\u30b3\u30fc\u30c9\u3067\u901a\u308a\u307e\u3059\u304c\u3001<\/p>\n<p>Vista, 7 \u3067\u306f\u300c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u6a5f\u80fd\u3092\u5b9f\u884c\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u3002\u300d    <br \/>\u3068\u3044\u3046\u30a8\u30e9\u30fc\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<p>&#160;<\/p>\n<p>\u305d\u3053\u3067\u8003\u3048\u305f\u304f\u306a\u308b\u306e\u304c\u3001Vista \u4ee5\u964d\u306e\uff2f\uff33\u3067 SetTemplate \u3092\u4f7f\u3046\u65b9\u6cd5\u3067\u3059\u304c\u3001    <br \/>\u73fe\u6642\u70b9\u3067\u306f\u3042\u304d\u3089\u3081\u305f\u65b9\u304c\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<p> <a title=\"Visual C++ Team Blog  Vista-style File Dialogs with MFC\" href=\"http:\/\/blogs.msdn.com\/vcblog\/archive\/2006\/12\/14\/vista-style-file-dialogs-with-mfc.aspx\">Visual C++ Team Blog&#160; Vista-style File Dialogs with MFC<\/a>   <br \/>Microsoft \u793e\u306e Visual C++ Team \u306e\u30d6\u30ed\u30b0\u3067\u3082\u3001    <\/p>\n<blockquote style=\"margin-right: 0px\" dir=\"ltr\">\n<p>the new Vista dialogs <strong>no longer supports hwnd template customization<\/strong>, your CFileDialog object will throw CNotSupportedException if SetTemplate is called on it.&#160; <\/p>\n<\/blockquote>\n<blockquote>\n<p>\u9069\u5f53\u8a33\uff1a[\u82f1\u8a9e\u82e6\u624b\u306a\u306e\u3067\u3001\u3042\u307e\u308a\u306b\u3082\u8a33\u304c\u9055\u3063\u3066\u3044\u305f\u3089\u6307\u6458\u304a\u9858\u3044\u3057\u307e\u3059]      <br \/>Vista \u306e\u65b0\u3057\u3044\u30c0\u30a4\u30a2\u30ed\u30b0\u306f\u3001<strong>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u3088\u308b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u306f\u5bfe\u5fdc\u3057\u307e\u305b\u3093\u3002<\/strong>SetTemplate \u3092 CFileDialog \u3067\u547c\u3073\u51fa\u3057\u305f\u3089\u3001CNotSupportedException \u3092\u30b9\u30ed\u30fc\u3059\u308b\u3088\u30fc\u3002<\/p>\n<\/blockquote>\n<p>\u3068\u3044\u3046\u3088\u3046\u306a\u3053\u3068\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<p>&#160;<\/p>\n<p>\u305d\u308c\u3067\u306f\u3069\u3046\u3059\u308b\u304b\u3067\u3059\u304c\u3001    <br \/>Vista \u4ee5\u964d\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u306b\u306f\u305d\u308c\u306e\u70ba\u306e\u5f04\u308b\u65b9\u6cd5\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<blockquote>\n<p>CMyFileDialog::CMyFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)       <br \/>{<\/p>\n<p>&#160;&#160;&#160; IFileDialogCustomize* custom;      <br \/>&#160;&#160;&#160; custom = this-&gt;GetIFileDialogCustomize();       <br \/>&#160;&#160;&#160; if(custom != NULL){       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \/\/ \u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3002       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; custom-&gt;AddCheckButton(IDC_CH_FILE_ADDPEND,L&quot;\u30dc\u30bf\u30f3\u306e\u3064\u3044\u304b\u3002&quot;,false);       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; custom-&gt;Release();       <br \/>&#160;&#160;&#160; }       <br \/>}<\/p>\n<\/blockquote>\n<p>&#160;<\/p>\n<p>\u629c\u7c8b\u3057\u3066\u66f8\u304d\u307e\u3059\u3068\u4e0a\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>this-&gt;GetIFileDialogCustomize();<\/strong><\/p>\n<p>\u3067 IFileDialogCustomize \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u53d6\u5f97\u3057\u3001    <br \/><strong>custom-&gt;Add****<\/strong><\/p>\n<p>\u306b\u3088\u3063\u3066\u3001\u30dc\u30bf\u30f3\u3084\u30a8\u30c7\u30a3\u30c3\u30c8\u30dc\u30c3\u30af\u30b9\u3001\u30e9\u30d9\u30eb\u3084\u3089\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002   <\/p>\n<p>\u306a\u304a\u3001<strong>IFileDialogCustomize \u7cfb\u306f\u3001WINVER \u304c 0x0600 \u4ee5\u4e0a\u3067\u306a\u3044\u3068\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/strong>    <br \/>StdAfx.h \u7b49\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u65b9\u306f\u3054\u6ce8\u610f\u4e0b\u3055\u3044\u3002    <\/p>\n<p>&#160;<\/p>\n<p>\u8a2d\u7f6e\u3057\u305f\u5185\u5bb9\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u3001\u4e0a\u8a18\u306e\u4f8b\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u884c\u304d\u307e\u3059\u3068\u3001<\/p>\n<p>&#160;<\/p>\n<blockquote>\n<p>IFileDialogCustomize* custom;      <br \/>custom = this-&gt;GetIFileDialogCustomize();       <br \/>custom-&gt;GetCheckButtonState(IDC_CH_FILE_ADDPEND,&amp;checkstate);       <br \/>custom-&gt;Release();<\/p>\n<\/blockquote>\n<p>&#160;<\/p>\n<p>\u4e0a\u8a18\u306b\u3042\u308a\u307e\u3059\u3088\u3046\u306b\u3001   <br \/><strong>custom-&gt;Get****<\/strong><\/p>\n<p>\u306b\u3088\u3063\u3066\u3001\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u3069\u306e\u3088\u3046\u306a\u547d\u4ee4\u304c\u3042\u308b\u304b\u3001\u307e\u305f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u4f7f\u3048\u308b\u304b\u3068\u3044\u3046\u3053\u3068\u306b\u3064\u304d\u307e\u3057\u3066\u306f\u3001<\/p>\n<p><a title=\"IFileDialogCustomize Interface (Windows)\" href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/bb775912(en-us,VS.85).aspx\">IFileDialogCustomize Interface (Windows)<\/a>    <br \/>\u4e0a\u8a18\u30ea\u30f3\u30af\u3092\u53c2\u7167\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>&#160;<\/p>\n<p>\u6700\u5f8c\u306b\u3001XP,2000 \u4e0a\u3067\u3082\u3001Vista \u4ee5\u964d\u306eWindows \u3067\u3082\u3001\u4e21\u65b9\u3067\u52d5\u304f\u3088\u3046\u306b\u3059\u308b\u30bd\u30fc\u30b9\u3067\u3059\u304c\u3001   <\/p>\n<blockquote>\n<p>CMyFileDialog::CMyFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,     <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)      <br \/>{      <br \/>&#160;&#160;&#160; IFileDialogCustomize* custom;       <br \/>&#160;&#160;&#160; custom = NULL;      <br \/>&#160;&#160;&#160; TRY {      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \/\/ Legacy OS [ &#8211; Windows XP]      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; SetTemplate(0,IDC_CH_FILE_ADDPEND);      <br \/>&#160;&#160;&#160; } CATCH (CNotSupportedException,e){      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \/\/ New OS [ Windows Vista &#8211; ]      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; custom = this-&gt;GetIFileDialogCustomize();      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(custom != NULL){      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; custom-&gt;AddCheckButton(IDC_CH_FILE_ADDPEND,L&quot;\u3061\u3047\u3063\u304f\u3002&quot;,false);      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; custom-&gt;Release();      <br \/>&#160;&#160;&#160; }      <br \/>&#160;&#160;&#160; END_CATCH      <br \/>}<\/p>\n<\/blockquote>\n<p>\uff08STEP_M \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 MyFileDialog.cpp \u3088\u308a)    <\/p>\n<p>\u3068\u3044\u3046\u3088\u3046\u306a\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002    <br \/>MFC \u4e0a\u3067\u306f try \u2013 catch \u69cb\u6587\u306f\u4f7f\u3048\u306a\u3044\u3089\u3057\u304f\u3001<strong>TRY \u2013 CATCH \u2013 END_CATCH<\/strong> \u3092\u4f7f\u3046\u3088\u3046\u3067\u3059\u3002    <\/p>\n<p>\u305d\u3053\u3067\u3001\u307e\u305a\u306f SetTemplate \u3092\u52d5\u304b\u3057\u3001    <br \/>\u975e\u5bfe\u5fdc\u30a8\u30e9\u30fc\uff08CNotSupportedException) \u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3063\u305f\u3089\u3001    <br \/>Vista \u4ee5\u964d\u306e IFileDialogCustomize \u3092\u7528\u3044\u305f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3092\u884c\u3046\u3002\u3068\u3044\u3046\u5f62\u3067\u3059\u3002<\/p>\n<p>&#160;<\/p>\n<p>&#160;<\/p>\n<p>\u958b\u767a\u306e\u3054\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5e78\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mimura \u3067\u3059\u3002 \u5148\u307b\u3069\u3001STEP_M 1.053 \u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f\u3002 &#160; \u4eca\u56de\u306e\u30cd\u30c3\u30af\u306f CFileDialog \u306b\u304a\u3044\u3066 Vista \u4ee5\u964d\u306e\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u30c0\u30a4\u30a2\u30ed\u30b0\u3067\u306f\u3001 SetTemplate \u304c\u4f7f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[262,261,264,263],"class_list":["post-2244","post","type-post","status-publish","format-standard","hentry","category-other","tag-cfiledialog","tag-settemplate","tag-vista","tag-263"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts\/2244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/comments?post=2244"}],"version-history":[{"count":0,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/posts\/2244\/revisions"}],"wp:attachment":[{"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/media?parent=2244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/categories?post=2244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mimumimu.net\/blog\/wp-json\/wp\/v2\/tags?post=2244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}