Print Page | Close Window

Markup CRichEditCtrl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=10804
Printed Date: 15 November 2025 at 4:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Markup CRichEditCtrl
Posted By: gorski
Subject: Markup CRichEditCtrl
Date Posted: 28 May 2008 at 5:39am
I created my MarkupRichEdit control just as you did it with CMarkupStatic in MarkupSample:

class MarkupRichEdit : public CRichEditCtrl, public CXTPMarkupContext
{
public:
    MarkupRichEdit();
    virtual ~MarkupRichEdit();

    void SetMarkupText(LPCTSTR lpszMarkup);

protected:
    DECLARE_MESSAGE_MAP()
    BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
    afx_msg void OnPaint();

    CXTPMarkupUIElement* m_pUIElement;
};

It looks fine, but:

1. I can't select any text in that control. Is there any way to make a selection of the text in any markup control?

2. When I add something more than control could show, I'd like the control to scroll to the end. How can I force the ScrollViewer to scroll to the end?

3. Can you give me any hints how to print the content of a markup control?





Replies:
Posted By: Oleg
Date Posted: 28 May 2008 at 7:33am

Hi,

Don't mix RichEdit and Markup. it will work weird. use CStatic as host.
 
1. Sorry, now there is no tag that support it.
 
2. If you add in code call pScrollView->SetScrollPos(SB_VERT, pos);
 
3. Check Code of our MarkupPad  sample.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net