📄 formitemstring.h
字号:
// FormItemString.h: interface for the CFormItemString class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FORMITEMSTRING_H__98B2BAAD_5273_4EE5_AEB8_E704936F7669__INCLUDED_)
#define AFX_FORMITEMSTRING_H__98B2BAAD_5273_4EE5_AEB8_E704936F7669__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "FormItem.h"
#include "CeEdit.h"
#include "StrUtil.h"
class CFormItemString : public CFormItem
{
public:
CFormItemString();
virtual ~CFormItemString();
void Set(const CString &strVal) {m_strVal = strVal;}
void Set(LPCTSTR pszVal) {m_strVal = pszVal;}
void Get(CString &strVal) {strVal = m_strVal;}
void Get(WCHAR* pszBuf, size_t nBuf) {StrCopyN(pszBuf, m_strVal, nBuf);}
/// Render the data as a string.
virtual LPCTSTR RenderData(LV_DISPINFO *pDispInfo);
/// Checks if the data is valid.
virtual BOOL ValidateData();
/// Gets data from the edit control.
virtual void GetControlData();
/// Shows or hides the editor window.
virtual BOOL ShowEditor (CFormListCtrl* pForm, BOOL bShow, int iItem, int iSubItem);
/// Selects the editor and shows it
virtual BOOL Select (CFormListCtrl* pForm, BOOL bSelect, int iItem);
/// Moves the editor window to a new position.
virtual void MoveEditor(const RECT &rcItem);
/// Handles command messages for the editor.
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
protected:
CString m_strVal; ///< String data
CCeEdit m_wndEdit; ///< Edit control
};
#endif // !defined(AFX_FORMITEMSTRING_H__98B2BAAD_5273_4EE5_AEB8_E704936F7669__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -