Click here to Skip to main content
15,881,709 members
Articles / Desktop Programming / MFC

CRichEditControl50W - A VC++ Rich Text Edit 4.1 MFC Control

Rate me:
Please Sign up or sign in to vote.
4.72/5 (15 votes)
13 Mar 20055 min read 240.9K   5.1K   73  
A simple MFC Rich Edit control using version 4.1 in msftedit.dll.
// MainFrm.h : interface of the CMainFrame class
// By Jim Dunne http://www.topjimmy.net/tjs
// topjimmy@topjimmy.net
// copyright(C)2005
// if you use all or part of this code, please give me credit somewhere :)


#pragma once

class CMainFrame : public CFrameWnd
{
	
public:
	CMainFrame();
protected: 
	DECLARE_DYNAMIC(CMainFrame)

// Attributes
public:

// Operations
public:
	void CMainFrame::PrintStringTo50WControl();

// Overrides
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;
	CString m_csMessage;
	CHARRANGE m_crStatus;
	CRichEditControl50W m_REControl50W;

// Generated message map functions
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSetFocus(CWnd *pOldWnd);
	afx_msg void CMainFrame::OnUpdatePopupCopy(CCmdUI* pCmdUI); 
	afx_msg void CMainFrame::OnPopupCopy(); 
	afx_msg void CMainFrame::OnPopupCut(); 
	afx_msg void CMainFrame::OnPopupUndo();
	afx_msg void CMainFrame::OnUpdatePopupUndo(CCmdUI* pCmdUI); 
	afx_msg void CMainFrame::OnPopupPaste(); 
	afx_msg void CMainFrame::OnPopupStatusSelectall();
	afx_msg void CMainFrame::OnPopupCleartext();
	afx_msg void CMainFrame::OnUpdatePopupCleartext(CCmdUI* pCmdUI); 
	DECLARE_MESSAGE_MAP()

public:
	afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);
protected:
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
};


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
My name is Jim Dunne. I'm retired from the US Air Force.

In some of my spare time, I develop some ping/traceroute applications that I first wrote as a Master's in Computer Engineering thesis.

My resume is at http://www.dunnes.net/resume.

Comments and Discussions