📄 listviewinfo.cpp
字号:
// ListViewInfo.cpp : implementation file
//
#include "stdafx.h"
#include "LeoBlock2004.h"
#include "ListViewInfo.h"
#include "LRegistry.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CListViewInfo
IMPLEMENT_DYNCREATE(CListViewInfo, CView)
CListViewInfo::CListViewInfo()
{
m_iFontHeight=10;
//m_strFontName="Times New Roman";
m_strFontName="MS Sans Serif";
m_FontText.CreateFont(m_iFontHeight,0,0,0,0,0,0,0,0,0,0,0,0,m_strFontName);
}
CListViewInfo::~CListViewInfo()
{
}
BEGIN_MESSAGE_MAP(CListViewInfo, CView)
//{{AFX_MSG_MAP(CListViewInfo)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CListViewInfo drawing
void CListViewInfo::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CListViewInfo diagnostics
/*#ifdef _DEBUG
void CListViewInfo::AssertValid() const
{
CView::AssertValid();
}
void CListViewInfo::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG*/
/////////////////////////////////////////////////////////////////////////////
// CListViewInfo message handlers
void CListViewInfo::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CRect rRect;
GetClientRect(rRect);
rRect.left+=1;
rRect.top+=1;
rRect.right-=1;
rRect.bottom-=1;
DWORD dwStyle=WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP|LBS_NOINTEGRALHEIGHT;
m_pListBoxInfo.Create(dwStyle,rRect,this,IDC_LISTBOXSOCINFO);
m_pListBoxInfo.SetFont(&m_FontText);
m_pListBoxInfo.ShowWindow(SW_HIDE);
//Add Leo Install Path
CLRegistry dllRegistry;
HKEY dllKey=HKEY_LOCAL_MACHINE;
LPTSTR dllKeyPath="Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Leo2005_is1";
dllRegistry.Open(dllKey,dllKeyPath);
dllRegistry.Read("InstallLocation",m_SetupPath);
//m_SetupPath=m_SetupPath.Left(m_SetupPath.GetLength()-1);
// TODO: Add your specialized code here and/or call the base class
CString Urlss;
Urlss="file://";
m_SetupPath+="default.htm";
Urlss+=m_SetupPath;
m_SetupPath=Urlss;
m_pInternetViewBBB.Create(AfxRegisterWndClass(0),NULL,WS_VISIBLE|WS_CHILD,rRect,this,AFX_IDW_PANE_FIRST);
m_pInternetViewBBB.Navigate((LPCTSTR)m_SetupPath);
}
void CListViewInfo::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
if(m_pListBoxInfo && (m_pInternetViewBBB))
{
CRect rRect;
GetClientRect(rRect);
rRect.left+=1;
rRect.top+=1;
rRect.right-=1;
rRect.bottom-=1;
m_pListBoxInfo.MoveWindow(&rRect);
m_pInternetViewBBB.MoveWindow(&rRect);
Invalidate();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -