//============================================================================== // File: PopupEdit.h // // Description: A subclassed edit control that works as a popup edit // similar to the one used by the ListView control // // Revisions: 12/24/1999 - created // //============================================================================== // Copyright(C) 1999, Tomas Restrepo. All rights reserved //============================================================================== #ifndef _POPUPEDIT_H_ #define _POPUPEDIT_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // // style definitions // #define PE_AUTOHEXPAND 0x8000L ///////////////////////////////////////////////////////////////////////////// // PopupEdit window class PopupEdit : public CEdit { // Construction public: PopupEdit(); virtual ~PopupEdit(); // Attributes public: static const UINT PE_TEXTIN; static const UINT PeExtraSpace; // private stuff private: CRect m_OriginalRect; // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(PopupEdit) public: virtual BOOL Create ( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID ); virtual BOOL PreTranslateMessage(MSG* pMsg); //}}AFX_VIRTUAL // Implementation public: void Show ( const CRect& rc, LPCTSTR InitialText = _T("") ); void ResizeToFit ( void ); // Generated message map functions protected: //{{AFX_MSG(PopupEdit) afx_msg void OnKillfocus(); afx_msg void OnUpdate(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // _POPUPEDIT_H_