#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. stylus 使用小技巧(1)

    mixins.styl $pink_color = #fc566a $yellow_color = #fee246 add(a) a = unit(a, rem) pic_position($widt ...

  2. java端拦截器判断客户的的请求是否是ajax请求

    java端拦截器判断客户的的请求是否是ajax请求 发表于 2014-08-22 23:38:08 普通请求与ajax请求的报文头不一样,通过如下 String requestType = reque ...

  3. Linux直接在通过终端打开图片文件

    为了提高效率,减少使用鼠标,有时候想直接通过终端的命令打开一个图片进行查看.可以使用的命令有: eog filename display filename 再使用Alt+F4就可以关闭窗口,尽量达到手 ...

  4. Android 为点击事件添加震动效果

    Android 点击Button 实现震动效果 学习自:网络 Overview 在Android 的点击效果中,遇到震动效果的还是很多的. 接下来就让我们看一下如何实现震动效果. 所需要的权限 如果我 ...

  5. MySQL常用操作2

    MySQL常用操作2 判断函数 IF(expr, value1, value2)  --  如果表达式expr为true,则返回value1,否则返回value2 IFNULL(value1, val ...

  6. 用php 生成 excel 表格

    //引用新建对象require "../phpexcel/Classes/PHPExcel.php"; $excel = new PHPExcel(); 建表格 //Excel表格 ...

  7. DELPHI常用类型及定义单元

    Controls Application (the variable not a type) Forms Beep SysUtils or Windows (different functions) ...

  8. 2018.12.26 考试(哈希,二分,状压dp)

    T1 传送门 解题思路 发现有一个限制是每个字母都必须相等,那么就可以转化成首尾的差值相等,然后就可以求出\(k-1\)位的差值\(hash\)一下.\(k\)为字符集大小,时间复杂度为\(O(nk) ...

  9. 用C语言实现yield

    用C语言实现yield C/C++中没有yield语法,有的时候想用产生器,自己实现一个循环会感觉很麻烦.C/C++应该如何实现产生器呢? class FibonacciGenerator { pub ...

  10. Awesome Adb——一份超全超详细的 ADB 用法大全

    https://github.com/mzlogin/awesome-adb https://www.cnblogs.com/bravesnail/articles/5850335.html     ...