Files
envi-code/SourceCode/Code2026/inc/PropItemEdit.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

91 lines
2.2 KiB
C++

#if !defined(__CPropITEMEDIT_H__)
#define __CPropITEMEDIT_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PropTreeItemEdit.h : header file
//
// Copyright (C) 1998-2001 Scott Ramsay
// sramsay@gonavi.com
// http://www.gonavi.com
//
// This material is provided "as is", with absolutely no warranty expressed
// or implied. Any use is at your own risk.
//
// Permission to use or copy this software for any purpose is hereby granted
// without fee, provided the above notices are retained on all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided the above notices are retained, and a notice that the code was
// modified is included with the above copyright notice.
//
// If you use this code, drop me an email. I'd like to know if you find the code
// useful.
class THVAC_UIAPI CPropItemEdit : public CEdit, public CPropItem
{
public:
CPropItemEdit(CString* pText);
CPropItemEdit(double* pDouble);
CPropItemEdit(int* pInt);
virtual ~CPropItemEdit();
public:
CString GetValueText();
void SetValueText(CString csValue);
// The attribute area needs drawing
virtual void DrawAttribute(CDC* pDC, const RECT& rc);
// virtual LPARAM GetItemValue();
// Set the item's attribute value
// virtual void SetItemValue(LPARAM lParam);
// Called when attribute area has changed size
virtual void OnMove();
// Called when the item needs to refresh its data
virtual void OnRefresh();
// Called when the item needs to commit its changes
virtual void OnCommit();
// Called to activate the item
virtual void OnActivate();
// Set to specifify format of SetItemValue/GetItemValue
// void SetValueFormat(ValueFormat nFormat);
// Set to TRUE for to use a password edit control
void SetAsPassword(BOOL bPassword);
protected:
void InitVariable();
protected:
CString* m_pText;
double* m_pDouble;
int* m_pInt;
BOOL m_bPassword;
//{{AFX_VIRTUAL(CPropItemEdit)
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CPropItemEdit)
afx_msg UINT OnGetDlgCode();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKillfocus();
afx_msg void OnEditChanged();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
#endif // !defined(__CPropITEMEDIT_H__)