MFC (How to open a folder/file by clicking Botton)

Source: Internet
Author: User

1. Build an MFC project, type-based dialog box. In the Toolbox, drag a button button, such as.

2. Double-click the Button1 button to enter the code to perform the operation after clicking Button1, write the following code to implement the Web page/folder or file open.

void Cmfcapplication1dlg::onbnclickedbutton1 ()
{
ShellExecute (NULL, _t ("open"), _t ("http://www.cnblogs.com/lize19940412/"), NULL, NULL, SW_SHOWNORMAL);// The underlined place can be the URL or the location of the folder, or the path to the file.
}

3. Build a solution.

4. Find the generated EXE executable and you can use it.

There is only one way not to choose, that is the way to give up, only one way cannot refuse, that is the way of growth.

MFC (How to open a folder/file by clicking Botton)

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.