📄 infowindowdlg.h
字号:
// InfoWindowDlg.h : 僿僢僟乕 僼傽僀儖
//
#pragma once
#include "Factory.h"
#include "WordFactory.h"
// CInfoWindowDlg 僟僀傾儘僌
class CInfoWindowDlg : public CDialog
{
// 僐儞僗僩儔僋僔儑儞
public:
CInfoWindowDlg(CWnd* pParent = NULL); // 昗弨僐儞僗僩儔僋僞
// 僟僀傾儘僌 僨乕僞
enum { IDD = IDD_INFOWINDOW_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 僒億乕僩
// 幚憰
protected:
HICON m_hIcon;
CFont m_font;
IFactory* m_pFactory;
CWordFactory m_WordFactory;
CWordFactory m_GrammarFactory;
CString m_strContent;
BOOL m_bPause;
BOOL m_bMostTop;
int m_iTransparent;
int m_iSec;
int m_iLine;
CToolTipCtrl m_ToolTipCtrl;
// 惗惉偝傟偨丄儊僢僙乕僕妱傝摉偰娭悢
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSetting();
afx_msg void OnPopPause();
afx_msg void OnPopPrev();
afx_msg void OnPopNext();
afx_msg void OnClose();
afx_msg void OnAaAa2();
afx_msg void OnPopContentWord();
afx_msg void OnPopContentGrammar();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnSetFocus(CWnd* pOldWnd);
protected:
void SaveParam();
void LoadParam();
void SetTransparent(int nPos);
void resize( CSize size );
void pause( BOOL bPause = TRUE );
virtual void OnOK();
virtual void OnCancel();
void Generate(bool bDir);
};
///////////////////////////////////////////////////////////////////////////////
inline BOOL CreateGeneralFont( CFont &Font )
{
LPCTSTR pszFace = _T("System");
int nSize = 10;
BYTE bCharSet = ANSI_CHARSET;
HFONT hFont = (HFONT)::GetStockObject( DEFAULT_GUI_FONT );
if (hFont == NULL)
{
hFont = (HFONT)::GetStockObject( SYSTEM_FONT );
}
LOGFONT lf;
if (hFont != NULL)
{
if (::GetObject( hFont, sizeof(LOGFONT), &lf ) != 0)
{
pszFace = lf.lfFaceName;
nSize = lf.lfHeight;
bCharSet = lf.lfCharSet;
}
}
if( Font.CreateFont( nSize, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, bCharSet,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DONTCARE, pszFace ) == FALSE )
{
return FALSE;
}
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -