How to Make folder browsing display a new interface in VC ++
In VC ++ programming, there are many places to use the folder browsing dialog box, in version5.0 version (Microsoft control version, usually before Windows2000) if you want to add a new folder button in the folder browsing dialog box, you need to program it yourself. Now, after version5.0, you only need to set a parameter and have a context menu. As shown in: (Click here to download the entire sample project. This project can be used only with slight changes.Program. This project can also be used as a beginner's tutorial. Generally, the teaching materials seldom talk about folder browsing Common Dialog Box usage .) MainCodeAs follows:
Void ctestbrowsedlg: onbrowse () {cstring STR; browseinfo Bi; char name [max_path]; zeromemory (& BI, sizeof (browseinfo); bi. hwndowner = getsafehwnd (); bi. pszdisplayname = Name; bi. lpsztitle = "select folder"; bi. ulflags = bif_usenewui; lpitemidlist IDL = shbrowseforfolder (& BI); If (IDL = NULL) return; shgetpathfromidlist (IDL, str. getbuffer (max_path); Str. releasebuffer (); m_path = STR; If (Str. getat (Str. getlength ()-1 )! = ''//'') M_path + = "//"; updatedata (false );}