mapgis6.7二次开发vc6_demo 之五(输出VCT函数 总入口)
来源:互联网 发布:数据库access教程下载 编辑:程序博客网 时间:2024/05/16 10:39
mapgis6.7二次开发vc6_demo 之五(输出VCT函数 总入口)
//////////////////////////////////////////////////VCT 导出功能 version=1, topo=0 //vp:hsg//create date:2012-04-20////////////////////////////////////////////////#include "stdafx.h"#include "resource.h"#include <math.h>#include "win_area.h"#include "win_oper.h"#include "map_out.h"//#include "demo.h"//-------------------------------------------------------extern char* AppTitle; //应用程序名称extern AREA_HINST AHInst;extern HWND MainWnd; //主窗口句柄extern HWND GrpWnd; //图形窗口句柄//-------------------------------------------------------//------------------------------------------------------------//define function style Vct_Export.cpp/*void Vct_Export(); //输出VCT函数 总入口*///------------------------------------------------------------//输出VCT函数 总入口void Vct_Export(){_StartClockCursor();_GoingClockCursor();_StartWait();//WriteToLog_f_delete(); //TestGetDiskSpace();//取打开的工作区数 short n=_GetAreaNumber(AHInst); char* n_str=l2cp(n);ShowMsg(n_str);//获取当前可执行文件目录char* curdir=GetCurDir();ShowMsg(curdir);//WriteToLog(curdir);//获取显示工作区表集合 short *ptALst=NULL; if((ptALst=_GetDispAreaListAddr(GrpWnd))!=NULL){ if(ptALst==NULL) return;ShowMsg("工作区表不为空");//short ai,LayerType;//char* Lfilename;char* total_str=i2cp(ptALst[0]);char* tt_str=a2u("工作区表总个数:",total_str); ShowMsg(tt_str);//vct输出char* t_fn="dgx.vct";//getfilename_lc(Lfilename,"\\"); WriteToLog(t_fn);char* tmp_line_path=a2u("c:\\",t_fn);WriteToLog(tmp_line_path);//f_SetFilePath(tmp_line_path);f_OpenFile_w();OutVctHeadBeginEnd(); //1输出VCT文件头段OutVctFeatureCodeBeginEnd(ptALst); //2输出VCT要素代码段OutVctTableStructureBeginEnd(ptALst); //3输出VCT表结构段//ptALst[0]表示总个数//1输出点要素几何图形 OutVctPointBeginEnd(ptALst);//2输出线要素几何图形 OKOutVctLineBeginEnd(ptALst);//3输出面要素几何图形OutVctPloygonBeginEnd(ptALst); //4输出注记要素几何图形OutVctAnnotationBeginEnd(ptALst); //5输出属性表数据OutVctAttributeBeginEnd(ptALst);//f_FlushFile();f_CloseFile();}_EndWait();_EndClockCursor();ShowMsg("生成完毕!");}/*//获取工作区文件名Lfilename=_GetAreaFileName(ai);//-------------------------------//获原文件路径的文件名char* t_dir=getdir_lc(Lfilename,"\\");char* t_f_ext=getfilenameWithEx_lc(Lfilename,"\\");char* t_fname=getfilenameNoExt_lc(Lfilename,"\\");ShowMsg(t_dir);ShowMsg(t_f_ext);ShowMsg(t_fname);//-------------------------------*///获取线层总个数/*_GetLinNum(ai,&i,&ln);f_WriteLine(UnionStr("线总个数:",i2cp(ln)));for(i=1;i<ln;i++){ if(_GetLin(ai,i,&lxy,&len,NULL)<=0) { continue; } WriteToLog(i2cp(i)); //线序号 f_WriteLine(i2cp(i)); for(j=0;j<len;j++,lxy++) //线节点 { //获取窗口坐标 //x=(int)((lxy->x-wxy->x0)*wxy->r); //y=(int)((lxy->y-wxy->y0)*wxy->r); //获取地理坐标 x=lxy->x; y=lxy->y;//写入到文本中char* x_s=d2cp(x);char* y_s=d2cp(y);tmp=a2u(x_s,",");tmp=a2u(tmp,y_s);WriteToLog(tmp);f_WriteLine(tmp); }}*///删除线图层的所有要素//_GetLin(lai,&logN,&n);//for(i=1;i<n;i++) /*编者注:图元实体号应从1开始*/// _DelLin(lai,i); /*应该是for(i=1;i<=n;i++)*///走钟光标//void WINAPI _StartClockCursor(void);//void WINAPI _GoingClockCursor(void);//void WINAPI _EndClockCursor(void);//void WINAPI _StartWait(void); //开始显示等待光标//void WINAPI _EndWait(void); //结束显示等待光标---the---end---
---vp:hsg
---create date:2012-04-20
- mapgis6.7二次开发vc6_demo 之五(输出VCT函数 总入口)
- mapgis6.7二次开发vc6_demo 之五(输出VCT函数之点图层)
- mapgis6.7二次开发vc6_demo 之五(输出VCT函数之线图层)
- mapgis6.7二次开发vc6_demo 之五(输出VCT函数之面图层)
- mapgis6.7二次开发vc6_demo 之五(输出VCT函数之表属性段)
- mapgis6.7二次开发vc6_demo 之四(VCT导出之 version=1,topo=0)
- mapgis6.7二次开发vc6_demo 之三(文件操作通用函数)
- mapgis6.7二次开发vc6_demo 之六(mapgis公用函数二次封装库)
- mapgis6.7二次开发vc6_demo 之二(主窗体回调函数)
- mapgis6.7二次开发vc6_demo 之一(主窗体构架)
- vct输出思想
- 二次开发之 自定义函数
- 使用mapgis6.7进行工程输出为JPEG图片,弹出内存不足或者内存警告问题的解决方案
- 谈谈UG二次开发程序入口
- ReactJS分析之入口函数render
- VS2015动态库编程之入口函数
- Mapgis6.7 林相图自动注记
- MapGIS6.7破解狗含卸载
- PL/SQL学习(复合数据类型与游标)
- java调用C++ dll(已有dll,没有lib)
- Android开发指南-用户界面-事件处理
- 选择排序法
- SQL语句游标For.Loop与Open.Close比较
- mapgis6.7二次开发vc6_demo 之五(输出VCT函数 总入口)
- jq的each和toggle
- 黑马程序——异常总结(黑马我来了之八)
- Dwr的Reverse Ajax初步技术实现
- 平面坐标系变换公式
- java并发编程之synchronization初试
- usb-skeleton分析
- DOJO-dijit.form.FilteringSelect(扩展下拉菜单,封装了刷新函数)
- air file 系统中文件或目录的指针