那为兄弟有MFC上重写CEdit类的代码?最好是wince5.0上能跑的谢谢 有的话,能不能帮忙发我邮箱?[email protected]
解决方案 »
- 请问应用CSocket类,提示的一点问题,请大家定位下问题的原因
- RecordSet执行存储过程出错
- TextWriter 类 谁能给一个例子
- 2000下进程隐藏的新思路
- 用GetPixel在液晶(LCD)显示器和纯平(CRT)显示器上截取同样画面的像素值竟然不一样!焦急万分~
- 我遇到和adamw一样的问题!
- 高分求教 MultiThread 知识!
- 能在VC中让当前运行的WORD执行一个粘贴操作吗?成功的话再加500分,说一不二!
- 很简单的问题,请高手们指教了。
- win32 project和MFC project兼容的问题
- 为什么我用OpenGL画的正方体是透明的...
- VC++2005,为什么托管C++中窗体设计时出现的动态辅助线在MFC中就没有呢
class CMyEdit : public CEdit
{
};
这就算重写了。
{
DECLARE_DYNAMIC(CEdit)// Constructors
public:
CEdit();
BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);// Attributes
BOOL CanUndo() const;
int GetLineCount() const;
BOOL GetModify() const;
void SetModify(BOOL bModified = TRUE);
void GetRect(LPRECT lpRect) const;
DWORD GetSel() const;
void GetSel(int& nStartChar, int& nEndChar) const;
HLOCAL GetHandle() const;
void SetHandle(HLOCAL hBuffer);
#if (WINVER >= 0x400)
void SetMargins(UINT nLeft, UINT nRight);
DWORD GetMargins() const;
void SetLimitText(UINT nMax);
UINT GetLimitText() const;
CPoint PosFromChar(UINT nChar) const;
int CharFromPos(CPoint pt) const;
#endif // NOTE: first word in lpszBuffer must contain the size of the buffer!
int GetLine(int nIndex, LPTSTR lpszBuffer) const;
int GetLine(int nIndex, LPTSTR lpszBuffer, int nMaxLength) const;// Operations
void EmptyUndoBuffer();
BOOL FmtLines(BOOL bAddEOL); void LimitText(int nChars = 0);
int LineFromChar(int nIndex = -1) const;
int LineIndex(int nLine = -1) const;
int LineLength(int nLine = -1) const;
void LineScroll(int nLines, int nChars = 0);
void ReplaceSel(LPCTSTR lpszNewText, BOOL bCanUndo = FALSE);
void SetPasswordChar(TCHAR ch);
void SetRect(LPCRECT lpRect);
void SetRectNP(LPCRECT lpRect);
void SetSel(DWORD dwSelection, BOOL bNoScroll = FALSE);
void SetSel(int nStartChar, int nEndChar, BOOL bNoScroll = FALSE);
BOOL SetTabStops(int nTabStops, LPINT rgTabStops);
void SetTabStops();
BOOL SetTabStops(const int& cxEachStop); // takes an 'int' // Clipboard operations
BOOL Undo();
void Clear();
void Copy();
void Cut();
void Paste(); BOOL SetReadOnly(BOOL bReadOnly = TRUE);
int GetFirstVisibleLine() const;
TCHAR GetPasswordChar() const;// Implementation
public:
virtual ~CEdit();
};