// VRMSTView.cpp : CVRMSTView 类的实现
//
#include "stdafx.h"
#include "VRMST.h"
#include "VRMSTDoc.h"
#include "VRMSTView.h"
#include ".\vrmstview.h"
#include "vg.h"
#include "pf.h"
#include "vgutil.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
vgPicker *g_Picker = NULL;
vgObserver *g_obs = NULL;
vgChannel *g_chan = NULL;
vgEnv *g_env = NULL;
vgWindow *g_win = NULL;
vgGfx *g_gfx = NULL;
vgScene *g_scene = NULL;
vgPart *pick = NULL;
void SetSystemPointers()
{
/* ########################################## */
/* # Local Function # */
/* # Set pointers to the sytems components # */
/* # must be called after vgConfigSys() # */
/* ########################################## */
g_win = vgGetWin( 0 );
g_obs = vgGetObserv( 0 );
g_chan = vgGetObservChan( g_obs, 0 );
g_gfx = vgGetObservGfx( g_obs );
g_env = vgGetEnv( 0 );
g_scene = vgGetScene(0);
}
void CreatePicker_none()
{
/* ######################################## */
/* # Local Function # */
/* # Create an instance of vgPicker # */
/* ######################################## */
// *********************************
// * Create the new Terrain picker *
// *********************************
g_Picker = vgNewPicker();
ASSERT( g_Picker );
vgName( g_Picker, "example_picker" );
/* ******************************************** */
/* * we use the default scene 0 and channel 0 * */
/* ******************************************** */
vgPickerScene( g_Picker, g_scene );
vgPickerChannel( g_Picker, g_chan );
vgPickerHighLightColor( g_Picker, 1.0f, 0.0f, 0.0f );
vgProp( g_Picker, VGPICK_TRANSFORM, VGPICK_TRANSLATE );
vgProp( g_Picker, VGPICK_TRANSCOORDS, VGPICK_OBJECT_AXES );
vgProp( g_Picker, VGPICK_HL_LEVEL, VGPICK_GEODE );
vgProp( g_Picker, VGPICK_HL_STYLE, VGPICK_HL_NONE );
vgProp( g_Picker, VGPICK_CLAMP, VGPICK_CLAMP_Z );
vgProp( g_Picker, VGPICK_TERRAIN_CLAMP, VG_OFF );
vgProp( g_Picker, VGPICK_TRANSOVERRIDE, VG_OFF );
vgProp( g_Picker, VGPICK_DISPLAY_STDOUT, VG_OFF );
vgProp( g_Picker, VGPICK_MULTIPLE_PICKS, VG_OFF);
vgProp( g_Picker, VGPICK_AUTOTRANSFORM, VG_OFF );
vgProp( g_Picker, VGPICK_TRACKPLANE, VGPICK_TRACK_XY );
vgProp( g_Picker, VGPICK_AUTOTRACKPLANE, VG_OFF );
vgProp( g_Picker, VGPICK_RENDER_ISECT, VG_OFF );
vgPickerClampIsector( g_Picker, 0xffffffff );
vgPickerIsector( g_Picker, 0xffffffff );
vgProp( g_Picker, VGCOMMON_ENABLED, VG_ON );
}
void CreatePicker_lines()
{
/* ######################################## */
/* # Local Function # */
/* # Create an instance of vgPicker # */
/* ######################################## */
// *********************************
// * Create the new Terrain picker *
// *********************************
g_Picker = vgNewPicker();
ASSERT( g_Picker );
vgName( g_Picker, "example_picker" );
/* ******************************************** */
/* * we use the default scene 0 and channel 0 * */
/* ******************************************** */
vgPickerScene( g_Picker, g_scene );
vgPickerChannel( g_Picker, g_chan );
vgPickerHighLightColor( g_Picker, 1.0f, 0.0f, 0.0f );
vgProp( g_Picker, VGPICK_TRANSFORM, VGPICK_TRANSLATE );
vgProp( g_Picker, VGPICK_TRANSCOORDS, VGPICK_OBJECT_AXES );
vgProp( g_Picker, VGPICK_HL_LEVEL, VGPICK_GEODE );
vgProp( g_Picker, VGPICK_HL_STYLE, VGPICK_HL_LINES );
vgProp( g_Picker, VGPICK_CLAMP, VGPICK_CLAMP_Z );
vgProp( g_Picker, VGPICK_TERRAIN_CLAMP, VG_OFF );
vgProp( g_Picker, VGPICK_TRANSOVERRIDE, VG_OFF );
vgProp( g_Picker, VGPICK_DISPLAY_STDOUT, VG_OFF );
vgProp( g_Picker, VGPICK_MULTIPLE_PICKS, VG_OFF);
vgProp( g_Picker, VGPICK_AUTOTRANSFORM, VG_OFF );
vgProp( g_Picker, VGPICK_TRACKPLANE, VGPICK_TRACK_XY );
vgProp( g_Picker, VGPICK_AUTOTRACKPLANE, VG_OFF );
vgProp( g_Picker, VGPICK_RENDER_ISECT, VG_OFF );
vgPickerClampIsector( g_Picker, 0xffffffff );
vgPickerIsector( g_Picker, 0xffffffff );
vgProp( g_Picker, VGCOMMON_ENABLED, VG_ON );
}
void doPick()
{
/* ################################################### */
/* # Local Function # */
/* # Perform the a pick action if we are already # */
/* # have a valid pick picking it will unpick it # */
/* ################################################### */
static vgPosition *pos = NULL;
//float range,x,y,z;
if( pos == NULL )
{
pos = vgNewPos();
ASSERT( pos );
}
// *****************************************
// * We need to get the observers position *
// *****************************************
vgGetPos( g_obs, pos );
// ********************************************************
// * Do the interection test if we have a valid hit with *
// * the an item then process it otherwise do nothing *
// * This takes the Eye ( observer ) position and fires a *
// * LOS isector throught the Eye and mouse position *
// ********************************************************
vgPerformPickProcessing( g_Picker, pos) ;
}
// CVRMSTView
IMPLEMENT_DYNCREATE(CVRMSTView, CBaseVega)
BEGIN_MESSAGE_MAP(CVRMSTView, CBaseVega)
// 标准打印命令
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
ON_WM_SIZE()
ON_WM_CREATE()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_COMMAND(ID_DLGSHOW, OnDlgshow)
ON_COMMAND(ID_POINT, OnPoint)
ON_COMMAND(ID_ATTRIBUTE, OnAttribute)
ON_WM_RBUTTONDOWN()
END_MESSAGE_MAP()
// CVRMSTView 构造/析构
CVRMSTView::CVRMSTView()
: m_WinSizeX(0)
, m_WinSizeY(0)
, m_coordinateFlag(0)
, m_attributeFlag(0)
{
// TOD 在此处添加构造代码
m_controldlg=new CControlDlg(this);
CString os="ODBC;DSN=GJC";
m_database.Open(NULL,FALSE,FALSE,os);
m_recordset = new CODBCRecordset(&m_database);
}
CVRMSTView::~CVRMSTView()
{
delete m_controldlg;
delete m_recordset ;
m_database.Close();
}
BOOL CVRMSTView::PreCreateWindow(CREATESTRUCT& cs)
{
// TOD 在此处通过修改 CREATESTRUCT cs 来修改窗口类或
// 样式
return CBaseVega::PreCreateWindow(cs);
}
// CVRMSTView 绘制
void CVRMSTView::OnDraw(CDC* /*pDC*/)
{
//CVRMSTDoc* pDoc = GetDocument();
//ASSERT_VALID(pDoc);
//if (!pDoc)
// return;
// TOD 在此处为本机数据添加绘制代码
}
// CVRMSTView 打印
//BOOL CVRMSTView::OnPreparePrinting(CPrintInfo* pInfo)
//{
// // 默认准备
// return DoPreparePrinting(pInfo);
//}
//void CVRMSTView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
//{
// // TOD 打印前添加额外的初始化
//}
//void CVRMSTView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
//{
// // TOD 打印后添加清除过程
//}
// CVRMSTView 诊断
#ifdef _DEBUG
void CVRMSTView::AssertValid() const
{
CBaseVega::AssertValid();
}
void CVRMSTView::Dump(CDumpContext& dc) const
{
CBaseVega::Dump(dc);
}
CVRMSTDoc* CVRMSTView::GetDocument() const // 非调试版本是内联的
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVRMSTDoc)));
return (CVRMSTDoc*)m_pDocument;
}
#endif //_DEBUG
// CVRMSTView 消息处理程序
const char* CVRMSTView::getAdfName(void)
{
CVRMSTDoc* doc = (CVRMSTDoc*)GetDocument();
const char* adfName = doc->GetPathName() ;
// If the filename was not given open "VegaWin.adf".
if ( strlen( adfName ) == 0 )
return "town.adf";
else
return adfName;
}
void CVRMSTView::postDefine(void)
{
vgWindow* win = vgGetWin(0);
vgWinSize( win, 0, m_WinSizeX, 0, m_WinSizeY );
}
void CVRMSTView::OnSize(UINT nType, int cx, int cy)
{
CBaseVega::OnSize(nType, cx, cy);
m_WinSizeX=cx;
m_WinSizeY=cy;
// TOD 在此处添加消息处理程序代码
}
int CVRMSTView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CBaseVega::OnCreate(lpCreateStruct) == -1)
return -1;
// TOD 在此添加您专用的创建代码
return 0;
}
void CVRMSTView::OnInitialUpdate()
{
CBaseVega::OnInitialUpdate();
runVega();
// TOD 在此添加专用代码和/或调用基类
}
void CVRMSTView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TOD 在此添加消息处理程序代码和/或调用默认值
if(g_Picker!=NULL)
{
vgPickerUnPick(g_Picker);
}
if(m_coordinateFlag)
{
float range,x,y,z;
SetSystemPointers();
CreatePicker_none();
doPick();
vgGetPickerIntersection(g_Picker, &range, &x, &y, &z);
if(x>0&&y>0)
{
char strx[20];
char stry[20];
char strz[20];
sprintf(strx,"%.3f",x);
sprintf(stry,"%.3f",y);
sprintf(strz,"%.3f",z);
m_controldlg->SetDlgItemText(IDC_EDITX,strx);
m_controldlg->SetDlgItemText(IDC_EDITY,stry);
m_controldlg->SetDlgItemText(IDC_EDITZ,strz);
}
else
{
m_controldlg->SetDlgItemText(IDC_EDITX,"");
m_controldlg->SetDlgItemText(IDC_EDITY,"");
m_controldlg->SetDlgItemText(IDC_EDITZ,"");
AfxMessageBox("没有拾取到交叉点位");
}
}
if(m_attributeFlag)
{
SetSystemPointers();
CreatePicker_lines();
doPick();
pick=vgGetPickerPickedPart(g_Picker);
char str[50];
vgGetName( pick, str );
CString addstr(str,strlen(str));
if(!m_recordset->IsOpen())
m_recordset->Open();
m_recordset->MoveFirst();
while(!m_recordset->IsEOF())
{
if(m_recordset->m_ID==addstr)
{
m_controldlg->SetDlgItemText(IDC_EDITID, m_recordset->m_ID);
m_controldlg->SetDlgItemText(IDC_EDITMCH, m_recordset->column1);
m_controldlg->SetDlgItemText(IDC_EDITCSH, m_recordset->column2);
m_controldlg->SetDlgItemText(IDC_EDITSSH, m_recordset->column3);
}
m_recordset->MoveNext();
}
}
CBaseVega::OnLButtonDown(nFlags, point);
}
void CVRMSTView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TOD 在此添加消息处理程序代码和/或调用默认值
CBaseVega::OnLButtonUp(nFlags, point);
}
void CVRMSTView::OnDlgshow()
{
// TOD 在此添加命令处理程序代码
m_controldlg->Create(IDD_DIALOG1);
m_controldlg->ShowWindow(SW_RESTORE);
}
//坐标提取标志
void CVRMSTView::OnPoint()
{
// TOD 在此添加命令处理程序代码
m_coordinateFlag=1;
}
//属性提取标志
void CVRMSTView::OnAttribute()
{
// TOD 在此添加命令处理程序代码
m_attributeFlag=1;
}
void CVRMSTView::OnRButtonDown(UINT nFlags, CPoint point)
{
// TOD 在此添加消息处理程序代码和/或调用默认值
m_coordinateFlag=0;
CBaseVega::OnRButtonDown(nFlags, point);
}
//
#include "stdafx.h"
#include "VRMST.h"
#include "VRMSTDoc.h"
#include "VRMSTView.h"
#include ".\vrmstview.h"
#include "vg.h"
#include "pf.h"
#include "vgutil.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
vgPicker *g_Picker = NULL;
vgObserver *g_obs = NULL;
vgChannel *g_chan = NULL;
vgEnv *g_env = NULL;
vgWindow *g_win = NULL;
vgGfx *g_gfx = NULL;
vgScene *g_scene = NULL;
vgPart *pick = NULL;
void SetSystemPointers()
{
/* ########################################## */
/* # Local Function # */
/* # Set pointers to the sytems components # */
/* # must be called after vgConfigSys() # */
/* ########################################## */
g_win = vgGetWin( 0 );
g_obs = vgGetObserv( 0 );
g_chan = vgGetObservChan( g_obs, 0 );
g_gfx = vgGetObservGfx( g_obs );
g_env = vgGetEnv( 0 );
g_scene = vgGetScene(0);
}
void CreatePicker_none()
{
/* ######################################## */
/* # Local Function # */
/* # Create an instance of vgPicker # */
/* ######################################## */
// *********************************
// * Create the new Terrain picker *
// *********************************
g_Picker = vgNewPicker();
ASSERT( g_Picker );
vgName( g_Picker, "example_picker" );
/* ******************************************** */
/* * we use the default scene 0 and channel 0 * */
/* ******************************************** */
vgPickerScene( g_Picker, g_scene );
vgPickerChannel( g_Picker, g_chan );
vgPickerHighLightColor( g_Picker, 1.0f, 0.0f, 0.0f );
vgProp( g_Picker, VGPICK_TRANSFORM, VGPICK_TRANSLATE );
vgProp( g_Picker, VGPICK_TRANSCOORDS, VGPICK_OBJECT_AXES );
vgProp( g_Picker, VGPICK_HL_LEVEL, VGPICK_GEODE );
vgProp( g_Picker, VGPICK_HL_STYLE, VGPICK_HL_NONE );
vgProp( g_Picker, VGPICK_CLAMP, VGPICK_CLAMP_Z );
vgProp( g_Picker, VGPICK_TERRAIN_CLAMP, VG_OFF );
vgProp( g_Picker, VGPICK_TRANSOVERRIDE, VG_OFF );
vgProp( g_Picker, VGPICK_DISPLAY_STDOUT, VG_OFF );
vgProp( g_Picker, VGPICK_MULTIPLE_PICKS, VG_OFF);
vgProp( g_Picker, VGPICK_AUTOTRANSFORM, VG_OFF );
vgProp( g_Picker, VGPICK_TRACKPLANE, VGPICK_TRACK_XY );
vgProp( g_Picker, VGPICK_AUTOTRACKPLANE, VG_OFF );
vgProp( g_Picker, VGPICK_RENDER_ISECT, VG_OFF );
vgPickerClampIsector( g_Picker, 0xffffffff );
vgPickerIsector( g_Picker, 0xffffffff );
vgProp( g_Picker, VGCOMMON_ENABLED, VG_ON );
}
void CreatePicker_lines()
{
/* ######################################## */
/* # Local Function # */
/* # Create an instance of vgPicker # */
/* ######################################## */
// *********************************
// * Create the new Terrain picker *
// *********************************
g_Picker = vgNewPicker();
ASSERT( g_Picker );
vgName( g_Picker, "example_picker" );
/* ******************************************** */
/* * we use the default scene 0 and channel 0 * */
/* ******************************************** */
vgPickerScene( g_Picker, g_scene );
vgPickerChannel( g_Picker, g_chan );
vgPickerHighLightColor( g_Picker, 1.0f, 0.0f, 0.0f );
vgProp( g_Picker, VGPICK_TRANSFORM, VGPICK_TRANSLATE );
vgProp( g_Picker, VGPICK_TRANSCOORDS, VGPICK_OBJECT_AXES );
vgProp( g_Picker, VGPICK_HL_LEVEL, VGPICK_GEODE );
vgProp( g_Picker, VGPICK_HL_STYLE, VGPICK_HL_LINES );
vgProp( g_Picker, VGPICK_CLAMP, VGPICK_CLAMP_Z );
vgProp( g_Picker, VGPICK_TERRAIN_CLAMP, VG_OFF );
vgProp( g_Picker, VGPICK_TRANSOVERRIDE, VG_OFF );
vgProp( g_Picker, VGPICK_DISPLAY_STDOUT, VG_OFF );
vgProp( g_Picker, VGPICK_MULTIPLE_PICKS, VG_OFF);
vgProp( g_Picker, VGPICK_AUTOTRANSFORM, VG_OFF );
vgProp( g_Picker, VGPICK_TRACKPLANE, VGPICK_TRACK_XY );
vgProp( g_Picker, VGPICK_AUTOTRACKPLANE, VG_OFF );
vgProp( g_Picker, VGPICK_RENDER_ISECT, VG_OFF );
vgPickerClampIsector( g_Picker, 0xffffffff );
vgPickerIsector( g_Picker, 0xffffffff );
vgProp( g_Picker, VGCOMMON_ENABLED, VG_ON );
}
void doPick()
{
/* ################################################### */
/* # Local Function # */
/* # Perform the a pick action if we are already # */
/* # have a valid pick picking it will unpick it # */
/* ################################################### */
static vgPosition *pos = NULL;
//float range,x,y,z;
if( pos == NULL )
{
pos = vgNewPos();
ASSERT( pos );
}
// *****************************************
// * We need to get the observers position *
// *****************************************
vgGetPos( g_obs, pos );
// ********************************************************
// * Do the interection test if we have a valid hit with *
// * the an item then process it otherwise do nothing *
// * This takes the Eye ( observer ) position and fires a *
// * LOS isector throught the Eye and mouse position *
// ********************************************************
vgPerformPickProcessing( g_Picker, pos) ;
}
// CVRMSTView
IMPLEMENT_DYNCREATE(CVRMSTView, CBaseVega)
BEGIN_MESSAGE_MAP(CVRMSTView, CBaseVega)
// 标准打印命令
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
ON_WM_SIZE()
ON_WM_CREATE()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_COMMAND(ID_DLGSHOW, OnDlgshow)
ON_COMMAND(ID_POINT, OnPoint)
ON_COMMAND(ID_ATTRIBUTE, OnAttribute)
ON_WM_RBUTTONDOWN()
END_MESSAGE_MAP()
// CVRMSTView 构造/析构
CVRMSTView::CVRMSTView()
: m_WinSizeX(0)
, m_WinSizeY(0)
, m_coordinateFlag(0)
, m_attributeFlag(0)
{
// TOD 在此处添加构造代码
m_controldlg=new CControlDlg(this);
CString os="ODBC;DSN=GJC";
m_database.Open(NULL,FALSE,FALSE,os);
m_recordset = new CODBCRecordset(&m_database);
}
CVRMSTView::~CVRMSTView()
{
delete m_controldlg;
delete m_recordset ;
m_database.Close();
}
BOOL CVRMSTView::PreCreateWindow(CREATESTRUCT& cs)
{
// TOD 在此处通过修改 CREATESTRUCT cs 来修改窗口类或
// 样式
return CBaseVega::PreCreateWindow(cs);
}
// CVRMSTView 绘制
void CVRMSTView::OnDraw(CDC* /*pDC*/)
{
//CVRMSTDoc* pDoc = GetDocument();
//ASSERT_VALID(pDoc);
//if (!pDoc)
// return;
// TOD 在此处为本机数据添加绘制代码
}
// CVRMSTView 打印
//BOOL CVRMSTView::OnPreparePrinting(CPrintInfo* pInfo)
//{
// // 默认准备
// return DoPreparePrinting(pInfo);
//}
//void CVRMSTView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
//{
// // TOD 打印前添加额外的初始化
//}
//void CVRMSTView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
//{
// // TOD 打印后添加清除过程
//}
// CVRMSTView 诊断
#ifdef _DEBUG
void CVRMSTView::AssertValid() const
{
CBaseVega::AssertValid();
}
void CVRMSTView::Dump(CDumpContext& dc) const
{
CBaseVega::Dump(dc);
}
CVRMSTDoc* CVRMSTView::GetDocument() const // 非调试版本是内联的
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVRMSTDoc)));
return (CVRMSTDoc*)m_pDocument;
}
#endif //_DEBUG
// CVRMSTView 消息处理程序
const char* CVRMSTView::getAdfName(void)
{
CVRMSTDoc* doc = (CVRMSTDoc*)GetDocument();
const char* adfName = doc->GetPathName() ;
// If the filename was not given open "VegaWin.adf".
if ( strlen( adfName ) == 0 )
return "town.adf";
else
return adfName;
}
void CVRMSTView::postDefine(void)
{
vgWindow* win = vgGetWin(0);
vgWinSize( win, 0, m_WinSizeX, 0, m_WinSizeY );
}
void CVRMSTView::OnSize(UINT nType, int cx, int cy)
{
CBaseVega::OnSize(nType, cx, cy);
m_WinSizeX=cx;
m_WinSizeY=cy;
// TOD 在此处添加消息处理程序代码
}
int CVRMSTView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CBaseVega::OnCreate(lpCreateStruct) == -1)
return -1;
// TOD 在此添加您专用的创建代码
return 0;
}
void CVRMSTView::OnInitialUpdate()
{
CBaseVega::OnInitialUpdate();
runVega();
// TOD 在此添加专用代码和/或调用基类
}
void CVRMSTView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TOD 在此添加消息处理程序代码和/或调用默认值
if(g_Picker!=NULL)
{
vgPickerUnPick(g_Picker);
}
if(m_coordinateFlag)
{
float range,x,y,z;
SetSystemPointers();
CreatePicker_none();
doPick();
vgGetPickerIntersection(g_Picker, &range, &x, &y, &z);
if(x>0&&y>0)
{
char strx[20];
char stry[20];
char strz[20];
sprintf(strx,"%.3f",x);
sprintf(stry,"%.3f",y);
sprintf(strz,"%.3f",z);
m_controldlg->SetDlgItemText(IDC_EDITX,strx);
m_controldlg->SetDlgItemText(IDC_EDITY,stry);
m_controldlg->SetDlgItemText(IDC_EDITZ,strz);
}
else
{
m_controldlg->SetDlgItemText(IDC_EDITX,"");
m_controldlg->SetDlgItemText(IDC_EDITY,"");
m_controldlg->SetDlgItemText(IDC_EDITZ,"");
AfxMessageBox("没有拾取到交叉点位");
}
}
if(m_attributeFlag)
{
SetSystemPointers();
CreatePicker_lines();
doPick();
pick=vgGetPickerPickedPart(g_Picker);
char str[50];
vgGetName( pick, str );
CString addstr(str,strlen(str));
if(!m_recordset->IsOpen())
m_recordset->Open();
m_recordset->MoveFirst();
while(!m_recordset->IsEOF())
{
if(m_recordset->m_ID==addstr)
{
m_controldlg->SetDlgItemText(IDC_EDITID, m_recordset->m_ID);
m_controldlg->SetDlgItemText(IDC_EDITMCH, m_recordset->column1);
m_controldlg->SetDlgItemText(IDC_EDITCSH, m_recordset->column2);
m_controldlg->SetDlgItemText(IDC_EDITSSH, m_recordset->column3);
}
m_recordset->MoveNext();
}
}
CBaseVega::OnLButtonDown(nFlags, point);
}
void CVRMSTView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TOD 在此添加消息处理程序代码和/或调用默认值
CBaseVega::OnLButtonUp(nFlags, point);
}
void CVRMSTView::OnDlgshow()
{
// TOD 在此添加命令处理程序代码
m_controldlg->Create(IDD_DIALOG1);
m_controldlg->ShowWindow(SW_RESTORE);
}
//坐标提取标志
void CVRMSTView::OnPoint()
{
// TOD 在此添加命令处理程序代码
m_coordinateFlag=1;
}
//属性提取标志
void CVRMSTView::OnAttribute()
{
// TOD 在此添加命令处理程序代码
m_attributeFlag=1;
}
void CVRMSTView::OnRButtonDown(UINT nFlags, CPoint point)
{
// TOD 在此添加消息处理程序代码和/或调用默认值
m_coordinateFlag=0;
CBaseVega::OnRButtonDown(nFlags, point);
}