#include <uf.h>
#include <uf_ui.h>
#include <string> using namespace std; string OpenDirectionDialog(char* lpszDefault)
{
//去除字符串末尾的\;
int nlast = strlen(lpszDefault) - ;
string strDefault = lpszDefault;
if (strDefault.at(nlast) == '\\')
strDefault.at(nlast) = '\0'; int nResponse = ;
char lpszDefaultFile[] = "";
char lpszFileFiter[] = "Direction";
char lpszFilePath[] = "";
//设置初始目录;
sprintf_s(lpszDefaultFile, , "%s\\%ss", strDefault.c_str(), lpszFileFiter);
UF_UI_create_filebox("选择一个目录", "目录浏览器", lpszFileFiter, lpszDefaultFile, lpszFilePath, &nResponse); string strPath, strPathSel;
if (nResponse == UF_UI_OK)
{
strPath = lpszFilePath;
//去除Direction;
int nPos = strPath.rfind("\\");
strPathSel = strPath.substr(, nPos);
}
else
{
strPathSel = "";
} return strPathSel;//选择文件夹返回值为路径,没选择文件夹返回值为空
}

NX二次开发-UFUN打开选择文件夹对话框UF_UI_create_filebox的更多相关文章

  1. NX二次开发-弹出选择文件夹对话框

    这个UFUN和NOPEN里没有对应的函数和类,要用C++的方法去做. #include "afxdialogex.h"//弹出选择文件夹对话框头文件 #include " ...

  2. MFC中打开选择文件夹对话框,并将选中的文件夹地址显示在编辑框中

    一般用于选择你要将文件保存到那个目录下,此程序还包含新建文件夹功能 BROWSEINFO bi; ZeroMemory(&bi, sizeof(BROWSEINFO));  //指定存放文件的 ...

  3. NX二次开发-UFUN打开二进制STL文件函数UF_STD_open_binary_stl_file

    NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include <u ...

  4. NX二次开发-UFUN打开本地文本文档uc4504

    NX9+VS2012 #include <uf.h> #include <uf_cfi.h> #include <uf_ui.h> using std::strin ...

  5. NX二次开发-UFUN关闭STL文件函数UF_STD_close_stl_file

    NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include <u ...

  6. NX二次开发-UFUN打开信息窗口UF_UI_open_listing_window()

    NX9+VS2012 #include <uf.h> #include <uf_ui.h> UF_initialize(); //方法1(uc1601) uc1601();// ...

  7. NX二次开发-UFUN参数选择对话框UF_UI_select_parameters

    #include <uf.h> #include <uf_ui.h> #include <uf_modl.h> UF_initialize(); //参数选择对话框 ...

  8. NX二次开发-UFUN单对象选择对话框UF_UI_select_with_single_dialog

    #include <uf.h> #include <uf_ui.h> ], void* user_data, UF_UI_selection_p_t select) { if ...

  9. NX二次开发-UFUN打开工程图UF_DRAW_open_drawing

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize ...

随机推荐

  1. 安装配置oh-my-zsh

    1.下载安装iterm:https://www.iterm2.com/ 2.安装zsh 查看系统当前使用的shell $ echo $SHELL /bin/bash 查看系统是否安装了zsh $ ca ...

  2. 【原理】RabbitMQ架构图

    Broker:它提供一种传输服务,它的角色就是维护一条从生产者到消费者的路线,保证数据能按照指定的方式进行传输, Exchange:消息交换机,它指定消息按什么规则,路由到哪个队列. Queue:消息 ...

  3. Comet OJ - Contest #11 E ffort(组合计数+多项式快速幂)

    传送门. 题解: 考虑若最后的总伤害数是s,那么就挡板分配一下,方案数是\(C_{s-1}^{n-1}\). 那么问题在于总伤害数很大,不能一个一个的算. \(C_{s-1}^{n-1}\)的OGF是 ...

  4. PHP ftp_nb_continue() 函数

    定义和用法 ftp_nb_continue() 函数连续获取/发送文件.(无阻塞) 该函数返回下列值之一: FTP_FAILED(发送/获取失败) FTP_FINISHED(发送/获取成功) FTP_ ...

  5. HDU - 1712 (分组背包模板)

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1712 题意:给你n个课程,每个课程有很多种学习方法,用的时间和取得的效果都不一样,现在你只有m天时间用来学 ...

  6. (转)OpenFire源码学习之五:用户登录

    转:http://blog.csdn.net/huwenfeng_2011/article/details/43413377 登陆 登陆认证,客户端发送认SASL证消息: <auth mecha ...

  7. 12、jquery的tree组件

    1. <!--jquery 的主文件...--> <script type="text/javascript" src="../../js/jquery ...

  8. 调试口:JTAG与SW-Debug Port

  9. Day 16 : Python 时间模块[time,]datetime[]及第三方模块的下载与安装

    在进行python程序开发时,除了可以使用python内置的标准模块外,还右许多第三方模块使用,可以在python官网找到. 在使用第三方模块时,需要下载并安装此模块,然后就可以使用标准模块一样导入并 ...

  10. python去除rpm仓库中同名低版本的包

    编程思路1 遍历目标路径的rpm包并保存特性包列表: 2 利用python模块rpmUtils提取RPM包的特征信息:包名  版本号 架构 3 遍历特性列表中存在重复包名的rpm, 将低版本的rpm包 ...