Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Trying to Get Prof UIS to Work With CRichEditCtrl Collapse All
Subject Author Date
Bill Olson Nov 14, 2009 - 7:07 PM

I’ve been trying to get Prof UIS working with a CRichEditCtrl and I’m getting asserts.  This is a control created at run time rather than created in the resource editor.

I have done:

In class declaration:

    CExtNCSB <CRichEditCtrl> m_RichEdit;

In OnInitDialog:



When I started, the last argument was IDC_STATIC.  I changed this to IDC_HELPTEXT but it still asserts on the .Create call.

I read on the forum that CExtNCSB works with CRichEditCtrl with versions 2.83 and later.  I’m using 2.85.



Bill Olson Nov 19, 2009 - 4:22 AM

I finally figured out what was going on.  I tried commenting out manipulations of the control after creation and found that this line:


was what was preventing the control from skinning.  For some odd reason after commenting this out, my resizing code started behaving oddly, though it skinned the scroll bar from initialization.  After some tweaking of the resize code it looks like everything works OK without SetOptions, so I will just leave it out.  I’m not sure why it caused a problem, but it did.

Thanks for the help,



Technical Support Nov 19, 2009 - 1:52 PM

The behavior of the rich edit control depends on its ECO_*** options and sometimes it may eat or not send the scrolling messages which the CExtNCSB template class expects to intercept for synchronizing and updating the state of the CExtScrollBar windows.

Technical Support Nov 18, 2009 - 6:50 AM

We have the rich editor based log view in the date browser dialog page in the ProfUIS_Controls sample application and it works OK. We suspect the problem with scroll bars in your app may be related to the rich edit control initialization or set of its styles you are using. Please provide us with the source code which creates and initializes the rich edit control in your project. Please also note, the scroll bars are skinned only if the currently installed paint manager supports skinned scroll bars (Office 2007/2010 and ProfSkin).

Bill Olson Nov 17, 2009 - 2:54 AM

OK, I derived a class with the above code.  The scroll bar skins OK when I click on something in the dialog or move the mouse over the scroll bar, but it doesn’t skin when it is initially drawn.


Technical Support Nov 16, 2009 - 1:24 PM

You should use the delayed initialization of themed scroll bars provided by the CExtNCSB template class:

class CMyRichEditCtrl : public CExtNCSB < CRichEditCtrl >
            CMyRichEditCtrl() : CExtNCSB < CRichEditCtrl > ( true ) { }