📄 geopadview.cpp
字号:
{
// TODO: Add your command update UI handler code here
//pCmdUI->Enable(bOpen);
}
void CGeoPADView::OnFind()
{
// TODO: Add your command handler code here
CFind find;
if(find.DoModal() ==IDOK)
Invalidate();
}
void CGeoPADView::OnFreehMeasure()
{
// TODO: Add your command handler code here
action = 21;
}
void CGeoPADView::OnGoto()
{
// TODO: Add your command handler code here
action = 25;
}
void CGeoPADView::OnIdentify()
{
// TODO: Add your command handler code here
action = 5;
}
void CGeoPADView::OnMeasure()
{
// TODO: Add your command handler code here
action = 20;
}
void CGeoPADView::OnUnit()
{
// TODO: Add your command handler code here
CDistUnit unit;
unit.DoModal();
}
void CGeoPADView::OnPtSelect()
{
// TODO: Add your command handler code here
action = 13;
}
void CGeoPADView::OnRasterOriginal()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD120();
Invalidate();
}
void CGeoPADView::OnRasterLighten()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD108();
Invalidate();
}
void CGeoPADView::OnRasterDarken()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD109();
Invalidate();
}
void CGeoPADView::OnThemetable()
{
// TODO: Add your command handler code here
CThemeTable t;
t.DoModal();
}
void CGeoPADView::OnQuery()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD200())
{
Invalidate();
action = 1000;
}
}
void CGeoPADView::OnQueryresult()
{
// TODO: Add your command handler code here
CQueryResult q;
q.DoModal();
}
void CGeoPADView::OnArrLabel()
{
// TODO: Add your command handler code here
action = 9;
}
void CGeoPADView::OnClearLabel()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD79();
Invalidate();
}
void CGeoPADView::OnAutoLabel()
{
// TODO: Add your command handler code here
CDefLabel l;
l.autoLabel = true;
if(l.DoModal() == IDOK)
Invalidate();
}
void CGeoPADView::OnDefArrLabel()
{
// TODO: Add your command handler code here
CDefLabel l;
l.autoLabel = false;
l.DoModal();
}
void CGeoPADView::OnDefLabel()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD65();
}
void CGeoPADView::OnLabelOnoff()
{
// TODO: Add your command handler code here
}
void CGeoPADView::OnDelLabel()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD78();
Invalidate();
}
void CGeoPADView::OnDelallLabel()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD68())
Invalidate();
}
void CGeoPADView::OnSelLabel()
{
// TODO: Add your command handler code here
action = 11;
}
void CGeoPADView::OnNormal()
{
// TODO: Add your command handler code here
//CPalette p;
editVertex=false;
action = 0;
}
void CGeoPADView::OnRefresh()
{
// TODO: Add your command handler code here
Invalidate();
}
void CGeoPADView::OnRemoveSel()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD21())
Invalidate();
}
void CGeoPADView::OnIdZoomFeature()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD17(zid);
Invalidate();
}
void CGeoPADView::OnIdCenter()
{
// TODO: Add your command handler code here
}
void CGeoPADView::OnAboutGeopad()
{
// TODO: Add your command handler code here
// CDialog *d = new CDialog();
// d->Create(IDD_ABOUTBOX);
// d->ShowWindow(SW_SHOW);
// return;
geoPAD.AboutGeoPAD();
}
void CGeoPADView::OnNewtheme()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD10();
}
void CGeoPADView::OnUpdateNewtheme(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnGpsGpspositionwindow()
{
// TODO: Add your command handler code here
}
void CGeoPADView::OnUpdateGpsGpspositionwindow(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnFeatureProp()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD223();
}
void CGeoPADView::OnUpdateFeatureProp(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnSelect()
{
// TODO: Add your command handler code here
action = 22;
}
void CGeoPADView::OnUpdateSelect(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnEditVertex()
{
// TODO: Add your command handler code here
geoPAD.GeoPAD219();
Invalidate();
// editVertex=true;
}
void CGeoPADView::OnUpdateEditVertex(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
BOOL CGeoPADView::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
// Set brush to desired background color
CBrush backBrush(RGB(255, 255, 255));
// Save old brush
CBrush* pOldBrush = pDC->SelectObject(&backBrush);
CRect rect;
pDC->GetClipBox(&rect); // Erase the area needed
pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(),
PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
return CView::OnEraseBkgnd(pDC);
}
void CGeoPADView::OnZoomSelFea()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD220())
Invalidate();
}
void CGeoPADView::OnUpdateZoomSelFea(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnFpCenteronselectedfeature()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD221())
Invalidate();
}
void CGeoPADView::OnUpdateFpCenteronselectedfeature(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnFpGotoselectedfeature()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD222())
Invalidate();
}
void CGeoPADView::OnUpdateFpGotoselectedfeature(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnUpdateFpDeletefeature(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnFpDeletefeature()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD224())
Invalidate();
}
void CGeoPADView::OnUpdateCenterGps(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnCenterGps()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD225())
Invalidate();
}
void CGeoPADView::OnUpdateGpsGpsactive(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
if(activeGPS)
pCmdUI->SetCheck(1);
else
pCmdUI->SetCheck(0);
}
void CGeoPADView::OnGpsGpsactive()
{
// TODO: Add your command handler code here
CClientDC dc(this);
if(activeGPS)
{
activeGPS = false;
KillTimer(1); // stop Timer thread
geoPAD.GeoPAD226(dc.m_hDC,activeGPS);
}
else
{
activeGPS = true;
if(geoPAD.GeoPAD226(dc.m_hDC,activeGPS))
{
geoPAD.GeoPAD251(&gpsX,&gpsY);
dc.MoveTo(gpsX,gpsY);
SetTimer(1,500,NULL); //Check GPS for 2 Sec.
}
}
}
void CGeoPADView::OnUpdateSelAtGps(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnSelAtGps()
{
// TODO: Add your command handler code here
if(geoPAD.GeoPAD227())
Invalidate();
}
void CGeoPADView::OnUpdateBuffQuery(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
}
void CGeoPADView::OnBuffQuery()
{
// TODO: Add your command handler code here
CBuffUnit buffUnit;
if(buffUnit.DoModal() == IDOK)
action = 1000;
}
void CGeoPADView::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
dc.SetROP2(R2_NOTXORPEN);
dc.MoveTo(gpsX,gpsY);
geoPAD.GeoPAD251(&gpsX,&gpsY);
// gpsX = gpsY+20;
// gpsY = gpsX+40;
dc.LineTo(gpsX,gpsY);
CView::OnTimer(nIDEvent);
}
void CGeoPADView::OnGeopadHelp()
{
// TODO: Add your command handler code here
//Navigate2(_T("http://www.microsoft.com/visualc/"),NULL,NULL);
}
void CGeoPADView::OnSelectEdit()
{
// TODO: Add your command handler code here
}
void CGeoPADView::OnPoint()
{
// TODO: Add your command handler code here
action = 111;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -