]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dirdlg.cpp
Ensure that names of saved XPMs are valid C identifiers.
[wxWidgets.git] / src / msw / dirdlg.cpp
index df4e4ddb541d05481fc7b00c4d8a194f5d6e271d..7b29069c559719c24a33904117578721c66c4c95 100644 (file)
@@ -72,11 +72,15 @@ struct IShellItem : public IUnknown
     virtual HRESULT wxSTDCALL Compare(IShellItem*, DWORD, int*) = 0;
 };
 
+#endif // #ifndef __IShellItem_INTERFACE_DEFINED__
+
+// Define this GUID in any case, even when __IShellItem_INTERFACE_DEFINED__ is
+// defined in the headers we might still not have it in the actual uuid.lib,
+// this happens with at least VC7 used with its original (i.e. not updated) SDK
+// and there is no harm in defining the GUID unconditionally.
 DEFINE_GUID(IID_IShellItem,
     0x43826D1E, 0xE718, 0x42EE, 0xBC, 0x55, 0xA1, 0xE2, 0x61, 0xC3, 0x7B, 0xFE);
 
-#endif // #ifndef __IShellItem_INTERFACE_DEFINED__
-
 struct IShellItemFilter;
 struct IFileDialogEvents;
 
@@ -259,7 +263,7 @@ int wxDirDialog::ShowSHBrowseForFolder(WXHWND owner)
 #endif
     bi.ulFlags        = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;
     bi.lpfn           = BrowseCallbackProc;
-    bi.lParam         = (LPARAM)m_path.wx_str(); // param for the callback
+    bi.lParam         = wxMSW_CONV_LPARAM(m_path); // param for the callback
 
     static const int verComCtl32 = wxApp::GetComCtl32Version();
 
@@ -486,7 +490,7 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData)
                     }
 
                     SendMessage(hwnd, BFFM_SETSTATUSTEXT,
-                                0, (LPARAM)strDir.wx_str());
+                                0, wxMSW_CONV_LPARAM(strDir));
                 }
             }
             break;