#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. 创建TCP服务器和TCP客户端

    import sockethost='127.0.0.1'port=8080web=socket.socket()web.bind((host,port))web.listen(5)# 设置最多连接数 ...

  2. Windows cmd 打开面板

    { 打开控制面板的命令是:“control”  打开控制面板  命令: rundll32.exe shell32.dll,Control_RunDLL  结果: 显示控制面板窗口.  例子:  Cal ...

  3. 【NOI2011】兔农(循环节)

    我居然没看题解瞎搞出来了? 题解: 不难想到找到每次减1的位置,然后减去它对最终答案的贡献. 假设有一个地方是\(x,1(mod~k)\) 那么减了1后就变成了\(x,0\). 然后可以推到\(x,0 ...

  4. 思维+双指针+环——cf1244F

    /* 可以发现一个性质:连续两个相同色块永远不会变色 继而可以发现,这个色段每次迭代都向左向右拓展长度1,直到撞上其他扩张的色段 所以预处理出所有连续色段,然后对于所有不在色段里的点,我们可以预测其最 ...

  5. (转)JMS事务

    转:http://blog.csdn.net/jixiuffff/article/details/5780834 事务         session = conn.createQueueSessio ...

  6. Java简单从文件读取和输出

    Java简单从文件读取和输出 用Scanner输入,用PrintStream输出 功能:从in.txt读入,输出到out.txt 代码: package ioTest; import java.io. ...

  7. html 视频播放器

    html  视频播放器 <html> <script> /** *视频播放 *参数说明 u - 媒体URL w - 媒体宽度width h - 媒体高度height */ // ...

  8. PAT 1010 Radix(X)

    1010 Radix (25 分)   Given a pair of positive integers, for example, 6 and 110, can this equation 6 = ...

  9. continuation line under-indented for visual indent

    continuation line under-indented for visual indent 问题:使用flake8检验代码规范时报错:continuation line under-inde ...

  10. super_blocks没有导出

    在模块中,通过查询super_blocks列表,来遍历系统中的所有super_block,但是出现与下面类似的错误: http://stackoverflow.com/q/5051111/941650 ...