www.pudn.com > ThemedRichEdit_Redis.zip > MainWnd.cpp
// MainWnd.cpp
#include "stdafx.h"
#include "MainWnd.h"
//Step 1: include the header file of the RichEditThemed class
#include "RichEditThemed.h"
//
///////////////////////////////////////////////////////////////
CMainWnd::CMainWnd()
{
}
//
///////////////////////////////////////////////////////////////
CMainWnd::~CMainWnd()
{
}
//
///////////////////////////////////////////////////////////////
LRESULT CMainWnd::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
//Step 2: attach your richedit control with one call to the CRichEditThemed class.
//... there's no step 3! everything will clean-up on its own when the control is destroyed
HWND hRichEdit = GetDlgItem(IDC_RICHEDIT_WITH);
CRichEditThemed::Attach(hRichEdit);
return 1;
}
//
///////////////////////////////////////////////////////////////
LRESULT CMainWnd::OnClose(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
EndDialog(IDCANCEL);
return 0;
}