) Add the "Create folder" button in the "Browse folder" dialog box generated by "browseinfo ".

Source: Internet
Author: User

In the Browse folder dialog box generated by "browseinfo", we found that the project "create folder" was not found. In my program, you need to create a new folder and save it to the folder you just created. Of course, you can also create a directory in the specified directory and select from here. After all, you have to return the drive letter to the folder where you want to create the folder. It is convenient to create a folder at any time, as shown in the SAVE folder. As a result, the following code can be used for personal needs:

# Define bif_newdialogstyle 0x0040
# Define bif_usenewui (bif_newdialogstyle | bif_editbox)
Void selectfolder (hwnd, cstring & strselectpath)
{
Browseinfo Bi;
Char filename [max_path];

Zeromemory (& BI, sizeof (browseinfo ));
Bi. hwndowner = hwnd;
Bi. pszdisplayname = filename;
Bi. lpsztitle = "select folder ";
Bi. ulflags = bif_usenewui;

Lpitemidlist IDL = shbrowseforfolder (& BI );
If (IDL = NULL)
Return;

Shgetpathfromidlist (IDL, filename );
}

Here is the option for adding new Folder:
# Define bif_usenewui (bif_newdialogstyle | bif_editbox)
In the past, only bif_newdialogstyle was used, and a macro was defined by myself, so that the bifeditbox and the above would be OK. Try it on your own.

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/mafeichao/archive/2008/08/06/2779017.aspx

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.