📄 calendar_edit.h
字号:
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - -
// - File: calendar_edit.h. -
// - -
// - Contents: Interface of class CCalEdit. -
// - -
// - Purpose: A rich edit based class specially made for calendar usage. -
// - -
// - Remarks: - -
// - -
// - Originator: Michael Mogensen, MM-IT Consult 2003. -
// - -
// - Compiler: MS Visual C++ ver6.0. -
// - -
// - Period: 29.04.03 - 00.00.00. -
// - -
// - Version: 1.00. -
// - -
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - Miscellaneous. -
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - Header(s). -
// ------------------------------------------------------------------------------------------------------------------------------------------------------
#pragma once
#include "calendar.rh"
#include "fileinfo.hpp"
#include "geometryex.hpp"
#include "windowex.hpp"
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - Miscellaneous. -
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - CCalEdit. -
// ------------------------------------------------------------------------------------------------------------------------------------------------------
class CCalEdit : public CRichEditCtrl
{
public:
// 4. Slaves. (alphabetical).
const void Clear();
//COLORREF GetBackgroundColor();
const CString GetText();
inline const int GetPos_Left()
{ return m_ipTopLeft.x; }
inline const int GetPos_Top()
{ return m_ipTopLeft.y; }
inline const int GetPos_Right()
{ return(m_ipTopLeft.x + CRectEx(GetWindowRectEx(this)).Width()); }
inline const int GetPos_Bottom()
{ return(m_ipTopLeft.y + CRectEx(GetWindowRectEx(this)).Height()); }
inline const bool IsEmpty()
{ return(GetTextLength() == 0); }
inline const void Pos_Set(const int iX, const int iY)
{ m_ipTopLeft.Set(iX, iY); }
const bool Load(const CString&);
const bool Save(const CString&);
//virtual void SetBackgroundColor(BOOL, COLORREF);
const void SetDefaultCharFormat(const bool bJustRetainItEx = false);
const void SetText(const CString&);
protected:
// 2. Event's. (alphabetical).
virtual afx_msg BOOL OnMouseWheel(UINT, short, CPoint);
virtual afx_msg void OnNcPaint();
virtual BOOL PreTranslateMessage(MSG*);
// 4. Slaves. (alphabetical).
static DWORD CALLBACK StreamCallback_In(DWORD, LPBYTE, LONG, LONG*);
static DWORD CALLBACK StreamCallback_Out(DWORD, LPBYTE, LONG, LONG*);
private:
// 0. Data. (alphabetical).
CPointEx m_ipTopLeft;
// 2. Event's. (alphabetical).
virtual afx_msg int OnCreate(LPCREATESTRUCT);
virtual afx_msg void OnDestroy();
// 4. Slaves. (alphabetical).
const void Init();
const void UnInit();
// 5. Other. (alphabetical).
DECLARE_MESSAGE_MAP()
};
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - -
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// 0. Data. (alphabetical).
// 1. Object. (alphabetical).
// 2. Event's. (alphabetical).
// 3.0. Menu choice. (menu order).
// 3.1. Menu choice, enablers. (menu order).
// 4. Slaves. (alphabetical).
// 5. Other. (alphabetical).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -