Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 Tech Support » CRichEdit controls in a CExtTabPageContainerWnd. Collapse All
Subject Author Date
John Kiernan Aug 23, 2006 - 3:59 PM

Hi, I have a strange problem I can’t seem to fix.
I’m using Prof-UIS 2.54 and have a CExtTabPageContainerWnd that contains three (3) RichEdit controls that are used for messages from different parts of the main app.

At first, when text was written to tabs that were not the selected (visible) tab they would paint over the currently selected tab...
Clicking on the tab that the data belonged to made the tabs redraw and look proper.
I added a delayed update like the following:

bool CanDoUpdate(void)
{
    int TabIdx = GetTabIndex();  // index of the current controls tab
    int CurTab = m_TabCtrl->PageSelectionGet(); 
    if (CurTab != TabIdx)
        return false;
    return true
}

if( CanDoUpdate() )
{
    Invalidate();
    UpdateWindow();
} 
else
{
    // Defer update until later
    SetTimer(....)
} 

This works EXCEPT when the application is hidden by another window. After the application gets focus again the currently selected tab contains text that was written to a non-visible tab.

Kind of confusing I know, I hope you can follow what I said.

Do you know what is going on? Do you have any suggestions on how to prevent this?

Technical Support Aug 24, 2006 - 7:52 AM

Please make sure you create the tab page container window and all the rich edit controls with the WS_CLIPCHILDREN|WS_CLIPSIBLINGS standard window styles.

John Kiernan Aug 24, 2006 - 10:11 AM

*sigh* Ok, I knew I was suppost to have those styles...
I’m not sure why I didn’t do it though :(
I hate obvious problems. Thanks for you help!!!

John Kiernan Aug 24, 2006 - 3:55 PM

Hmm...
This did fix the problem of redrawing when regaining focus..
But it seems that I still have another problem.

I have three tabs #1, #2, #3.... Each has richedit control and text is being written to all of them.
I have tab #1 selected (visible) and everything looks fine. However, if I click on tab #3, I see data that _should_ be in tab #2.
If I then click on #2 (data is right there) and then back to #3, the data in #3 is now correct.

I’m very confused now.

Technical Support Aug 25, 2006 - 5:45 AM

Would you send us (at support@prof-uis.com) a project that shows the problem or the source code which creates and manages the tab page container and its child windows so we can help you faster and more effectively?

John Kiernan Sep 13, 2006 - 1:54 PM

I just send a project that kind of demonstrates the problem.

John Kiernan Aug 28, 2006 - 8:06 AM

I will see if I can create a project that reproduces the problem. I’m now on vacation so it will take a week or so. :)