zoukankan      html  css  js  c++  java
  • MFC CFileDialog用法例子。

     Set it to TRUE to construct a File Open dialog box. Set it to FALSE to construct a File Save As dialog box.

    void CCompFileDlg::OnDirbrowser()

    {

        // TODO: Add your control notification handler code here

        CFileDialog fileDialog(TRUE);

        if (fileDialog.DoModal() == IDOK) {

            CString pathName = fileDialog.GetPathName();

            int index = pathName.ReverseFind('\');

            if (index == -1) {

                AfxMessageBox(L"The Directory is not correct!");

                return;

            }

            m_DirPathString = pathName.Left(index);

            UpdateData(FALSE);

        }

    }

     

    void CCompFileDlg::OnFilebrowser()

    {

        // TODO: Add your control notification handler code here

        CFileDialog fileDialog(FALSE);

        if (fileDialog.DoModal() == IDOK) {

            m_FilePathString = fileDialog.GetPathName();

            UpdateData(FALSE);

        }

    }

     

  • 相关阅读:
    app-授权登录插件配置
    微信公众号-公众号设置-功能设置
    Java变量
    Java数据类型
    计算机存储单元
    Java常量
    k8s
    第一个Java程序
    旋转木马
    tools
  • 原文地址:https://www.cnblogs.com/time-is-life/p/5764605.html
Copyright © 2011-2022 走看看