NX二次开发-UFUN打开选择文件夹对话框UF_UI_create_filebox
#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的更多相关文章
- NX二次开发-弹出选择文件夹对话框
这个UFUN和NOPEN里没有对应的函数和类,要用C++的方法去做. #include "afxdialogex.h"//弹出选择文件夹对话框头文件 #include " ...
- MFC中打开选择文件夹对话框,并将选中的文件夹地址显示在编辑框中
一般用于选择你要将文件保存到那个目录下,此程序还包含新建文件夹功能 BROWSEINFO bi; ZeroMemory(&bi, sizeof(BROWSEINFO)); //指定存放文件的 ...
- NX二次开发-UFUN打开二进制STL文件函数UF_STD_open_binary_stl_file
NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include <u ...
- NX二次开发-UFUN打开本地文本文档uc4504
NX9+VS2012 #include <uf.h> #include <uf_cfi.h> #include <uf_ui.h> using std::strin ...
- NX二次开发-UFUN关闭STL文件函数UF_STD_close_stl_file
NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include <u ...
- NX二次开发-UFUN打开信息窗口UF_UI_open_listing_window()
NX9+VS2012 #include <uf.h> #include <uf_ui.h> UF_initialize(); //方法1(uc1601) uc1601();// ...
- NX二次开发-UFUN参数选择对话框UF_UI_select_parameters
#include <uf.h> #include <uf_ui.h> #include <uf_modl.h> UF_initialize(); //参数选择对话框 ...
- 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 ...
- NX二次开发-UFUN打开工程图UF_DRAW_open_drawing
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize ...
随机推荐
- open source library
{ https://gitee.com/tboox https://github.com/thejinchao/cyclone http://www.drchip.org/astronaut/ssl/ ...
- mybatis中配置文件头
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "- ...
- 深入浅出 Vue.js 第九章 解析器---学习笔记
本文结合 Vue 源码进行学习 学习时,根据 github 上 Vue 项目的 package.json 文件,可知版本为 2.6.10 解析器 一.解析器的作用 解析器的作用就是将模版解析成 AST ...
- JZOI1134 迷宫(maze)
#include <bits/stdc++.h> #define ll long long #define INF 2147483647 #define mem_INF 213906214 ...
- npm install 超时 国内 切换源; npm ERR! code ELIFECYCLE;
install 超时 查看npm源地址 npm config get registry #http://registry.npmjs.org 为国外镜像地址 设置阿里云镜像 npm config se ...
- CSS:目录
ylbtech-CSS:目录 1.返回顶部 1. http://www.runoob.com/css/css-tutorial.html 2. https://www.w3school.com.cn/ ...
- 2、Android自动测试之Monkey工具
Android自动测试之Monkey工具 APP测试工作中经常会听到领导说,APP压力测试做了吗?刚入行时,不知道什么是 APP压力测试,找了半天没找到自己想要的.过了几年,回头想这个问题,发现牵扯了 ...
- 在Linux下编译带调试功能的Bochs
在Linux下使用Bochs参考: http://wangcong.org/articles/bochs.html http://kinglaw05.blog.163.com/blog/static/ ...
- git入门基本命令
第一个命令 git init (repo_dir) 初始化git版本库,如果省略repo_dir的话,那么就把当前目录作为git库进行初始化. 第二个命令 git status 查看版本库状态,随时可 ...
- 记录阿里云ECS搭建Wordpress(Centos7+LAMP)
占位 改变wordpress文件夹属主属组 cd /var/www/html chown -R apache:apache wordpress <VirtualHost *:> Docum ...