speedview.h

来自「测量被试的阅读速度」· C头文件 代码 · 共 43 行

H
43
字号
// SpeedView.h : interface of the CSpeedView class
//
/////////////////////////////////////////////////////////////////////////////

#pragma once

class CSpeedView : public CWindowImpl<CSpeedView, CEdit>,
	public CEditCommands<CSpeedView>
{
public:
	DECLARE_WND_SUPERCLASS(NULL, CEdit::GetWndClassName())

	BOOL PreTranslateMessage(MSG* pMsg);

	BEGIN_MSG_MAP(CSpeedView)
		MESSAGE_HANDLER(WM_CREATE, OnCreate)
		MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
		MSG_OCM_CTLCOLORSTATIC(OnCtlColorStatic)
		COMMAND_ID_HANDLER(ID_EDIT_FONT, OnEditFont)
		COMMAND_ID_HANDLER(ID_EDIT_FONT_LARGE, OnEditFontLarge)
		COMMAND_ID_HANDLER(ID_EDIT_FONT_SMALL, OnEditFontSmall)
		CHAIN_MSG_MAP_ALT(CEditCommands<CSpeedView>, 1)	
		DEFAULT_REFLECTION_HANDLER()
	END_MSG_MAP()

// Handler prototypes (uncomment arguments if needed):
//	LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
//	LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
//	LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
    LRESULT OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCtlColorStatic(HDC hdc, HWND hwnd);
	LRESULT OnEditFont(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnEditFontLarge(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnEditFontSmall(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

    void SetFontPoint(int pt);
	void SetDefaultFont();
private:
	CFont m_font;
	CFont m_fontText;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?