在sdi rich编辑中有疑问 [英] doubt in sdi rich edit

查看:85
本文介绍了在sdi rich编辑中有疑问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个应用程序sdi,但编辑器部分将是丰富的编辑控件。我从CWnd我的丰富编辑控件派生。



class CRichEditControl50W:public CWnd

{

DECLARE_DYNAMIC(CRichEditControl50W)

}



i写了我所有的函数,如:



void SetSel50W(long nStartChar,long nEndChar);

BOOL SetDefaultCharFormat50W(DWORD dwMask,COLORREF crTextColor,DWORD dwEffects,LPTSTR szFaceName,LONG yHeight,COLORREF crBackColor);

void SetTextTo50WControl(CString csText,int nSTFlags,int nSTCodepage) ;

void LimitText50W(int nChars);

void SetOptions50W(WORD wOp,DWORD dwFlags);

DWORD SetEventMask50W(DWORD dwEventMask);

void GetTextRange50W(int ncharrMin,int ncharrMax);



我怀疑如何从该丰富的编辑控件获取文本。它是sdi不是对话?

I created an application sdi but the editor part will be rich edit control. i derived from CWnd my rich edit control.

class CRichEditControl50W : public CWnd
{
DECLARE_DYNAMIC(CRichEditControl50W)
}

i wrote all my functions own like:

void SetSel50W(long nStartChar, long nEndChar);
BOOL SetDefaultCharFormat50W(DWORD dwMask, COLORREF crTextColor, DWORD dwEffects, LPTSTR szFaceName, LONG yHeight, COLORREF crBackColor);
void SetTextTo50WControl(CString csText, int nSTFlags, int nSTCodepage);
void LimitText50W(int nChars);
void SetOptions50W(WORD wOp, DWORD dwFlags);
DWORD SetEventMask50W(DWORD dwEventMask);
void GetTextRange50W(int ncharrMin, int ncharrMax);

my doubt is how to get the text from that rich edit control .it is sdi not dialog ?

推荐答案

你在某种程度上是在错误的轨道。丰富的编辑控件是Windows中自己的类。阅读有关它的文档



我的建议是,使用资源编辑器为你的sdi文档模板创建这样的控件,而不是为它创建一个实例。这是一个示例项目
You are somehow on the "wrong track". A rich edit control is an own class in Windows. Read the documentation about it.

My advice would be, to create such a control with the resource editor for your sdi document template and than create an instance for it. Here is a sample project for it.


这篇关于在sdi rich编辑中有疑问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆