那为兄弟有MFC上重写CEdit类的代码?最好是wince5.0上能跑的谢谢

jayskycai 2009-03-27 05:02:11
那为兄弟有MFC上重写CEdit类的代码?最好是wince5.0上能跑的谢谢 有的话,能不能帮忙发我邮箱?jayskycai@gmail.com
...全文
166 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
沐雨追风 2009-04-07
  • 打赏
  • 举报
回复
EVC下写吗?
skxq1983 2009-04-06
  • 打赏
  • 举报
回复
MFC里的源代码
skxq1983 2009-04-06
  • 打赏
  • 举报
回复
头文件

class CEdit : public CWnd
{
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();
};
  • 打赏
  • 举报
回复
想用Win32 API 写个 CEdit 一样的类??
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 cnzdgs 的回复:]
你想实现什么?
class CMyEdit : public CEdit
{
};
这就算重写了。
[/Quote]
cnzdgs 2009-03-27
  • 打赏
  • 举报
回复
你想实现什么?
class CMyEdit : public CEdit
{
};
这就算重写了。

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧