📄 hexdlg.cpp
字号:
//-------------------------------------------------------------------------------------
// Quick Hex Shell extension
// Copyright (c) 2000 by Shanker.C
// All rights reserved
// Author's consent required if this program is to be used for commercial purposes
// No warranty of any kind, expressed or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the user.
// Please send comments/suggestions/criticisms to: Shanker@xlprint.com
// March 7, 2000
//-------------------------------------------------------------------------------------
#include "stdafx.h"
#include "hexdlg.h"
//--------------------------------------------------------------------------------------------
BEGIN_MESSAGE_MAP(CHexDlg, CDialog)
END_MESSAGE_MAP()
//-------------------------------------------------------------------------------------
BOOL CHexDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(AfxGetApp()->LoadIcon(HEXICON), FALSE);
HDC hDC;
hDC = ::GetDC(NULL);
int height = MulDiv(8, ::GetDeviceCaps(hDC, LOGPIXELSY), 72);
m_Font.CreateFont(-height, 0, 0, 0, FW_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0, _T("fixedsys"));
::ReleaseDC(NULL, hDC);
m_MyListCtrl.SubclassDlgItem(IDC_VLIST, this);
m_MyListCtrl.SetFont(&m_Font);
WIN32_FIND_DATA FindFileData;
FindFirstFile(m_szPath, &FindFileData);
int nFileSize = FindFileData.nFileSizeLow;
CString strTitle = "Quick Hex [";
strTitle += m_szPath;
strTitle += "]";
SetWindowText(strTitle);
m_MyListCtrl.LoadFile(m_szPath, nFileSize);
return TRUE;
}
//-------------------------------------------------------------------------------------
void CHexDlg::OnOK()
{
DestroyWindow();
}
//-------------------------------------------------------------------------------------
void CHexDlg::OnCancel()
{
DestroyWindow();
}
//-------------------------------------------------------------------------------------
void CHexDlg::PostNcDestroy()
{
--_Module.m_nLockCnt;
delete this;
}
//-------------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -