📄 identify.cpp
字号:
#include "StdAfx.h"
#include ".\identify.h"
STDMETHODIMP CIdentify::OnClick()
{
if (FALSE==m_IdentifyDlg.get_isShow())
{
HWND hWnd;
m_hookHelper.get_hWnd(&hWnd);
m_IdentifyDlg.Create(hWnd);
m_IdentifyDlg.set_isShow(TRUE);
}
IActiveViewPtr cpActiveView;
GetFocusMapActiveView(&cpActiveView);
m_IdentifyDlg.ShowHelp(cpActiveView);
return S_OK;
}
STDMETHODIMP CIdentify::OnMouseDown(LONG Button, LONG Shift, LONG X, LONG Y)
{
// Update focus map to the place thats clicked on
CMapToolBase::MouseDown(X,Y);
IPointPtr cpStartPoint;
IActiveViewPtr cpActiveView;
GetFocusMapActiveView(&cpActiveView);
ToFocusMapPoint(X,Y, &cpStartPoint);
if (FALSE==m_IdentifyDlg.get_isShow())
{
HWND hWnd;
m_hookHelper.get_hWnd(&hWnd);
m_IdentifyDlg.Create(hWnd);
m_IdentifyDlg.set_isShow(TRUE);
}
m_IdentifyDlg.Show(cpStartPoint,cpActiveView,Shift==1||Shift==3||Shift==7||Shift==5);
return S_OK;
}
STDMETHODIMP CIdentify::OnMouseMove(LONG Button, LONG Shift, LONG X, LONG Y)
{
return S_OK;
}
STDMETHODIMP CIdentify::OnMouseUp(LONG Button, LONG Shift, LONG X, LONG Y)
{
CMapToolBase::MouseUp();
return S_OK;
}
STDMETHODIMP CIdentify::OnKeyDown(LONG keyCode, LONG Shift)
{
if (keyCode == VK_ESCAPE)
{
m_IdentifyDlg.DestroyWindow();
}
return S_OK;
}
STDMETHODIMP CIdentify::OnKeyUp(LONG keyCode, LONG Shift)
{
return S_OK;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -