How to Make folder browsing display a new interface in VC ++

Source: Internet
Author: User

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 );}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.