?? log.cpp
字號:
// Log.cpp : implementation file
//
#include "stdafx.h"
#include "Chat Server.h"
#include "Log.h"
#include "MainSheet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLog property page
IMPLEMENT_DYNCREATE(CLog, CPropertyPage)
CLog::CLog() : CPropertyPage(CLog::IDD)
{
//{{AFX_DATA_INIT(CLog)
//}}AFX_DATA_INIT
}
CLog::~CLog()
{
}
void CLog::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLog)
DDX_Control(pDX, IDC_EDTLOG, m_edtLog);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CLog, CPropertyPage)
//{{AFX_MSG_MAP(CLog)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLog message handlers
BOOL CLog::PreTranslateMessage (MSG* pMsg)
{
// Let the ToolTip process this message.
m_tooltip.RelayEvent(pMsg);
return CPropertyPage::PreTranslateMessage(pMsg);
}
BOOL CLog::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// Create the ToolTip control.
m_tooltip.Create (this);
m_tooltip.Activate (TRUE);
// TODO: Use one of the following forms to add controls:
// m_tooltip.AddTool (GetDlgItem (IDC_<name>), <string-table-id>);
// m_tooltip.AddTool (GetDlgItem (IDC_<name>), _T ("<text>"));
return TRUE;
}
//DEL void CLog::LogMessage(CString msg)
//DEL {
//DEL msg += "\r\n";
//DEL int iTotalLength = m_edtLog.GetWindowTextLength();
//DEL m_edtLog.SetSel(iTotalLength, iTotalLength);
//DEL m_edtLog.ReplaceSel(msg);
//DEL
//DEL }
void CLog::SetOwner(CMainSheet *pSheet)
{
m_pMainSheet = pSheet;
}
BOOL CLog::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
CString strLog = m_pMainSheet->GetLogMessage();
m_edtLog.SetWindowText(strLog);
return CPropertyPage::OnSetActive();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -