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 General Discussion » Black buttons in CExtResizableDialog dialogboxes Collapse All
Subject Author Date
Olaf Baeyens Jan 22, 2003 - 6:56 AM

I still have this strange problem that my buttons in a dialog box inherited from CExtResizableDialog does not get painted on some machines (99% XP) They are just black.

The funny thing is that if you select the button, and gets the input focus the it is drawn correctly, but if you have 2 buttons in that one dialog box, and select the other, then the one that loses the focus gets black again, and the one with the input focus gets now drawn.

It doesn’t matter if I use the CButton or the PROF_UIS version.

Both the commercial and free version has this problem.

Any tips?

Sergiy Lavrynenko Jan 23, 2003 - 2:58 AM

Dear Olaf,

I never received any information about this bug. Please let me know WindowsXP version and non-XP-Windows version where you came across with this bug. Please, sent me your test project or short description how and where you used CExtResizableDialog (child or popup, project type, VisualStudio version). I will try to find and fix this bug as soon as possible.

Best regards,
Sergiy Lavrynenko.

Olaf Baeyens Jan 23, 2003 - 4:30 AM

Thanks for the reply, I just sent everything I had about this problem (screendumps, exe, important project files)

(But I did not recieve any email from you (yet)).

Sergiy Lavrynenko Jan 23, 2003 - 7:36 AM

Dear Olaf,

You have typed "skycan.be", but may be your correct e-mail domain name is "skyscan.be" :-)

Regards, Sergiy.

Sam Contapay Oct 19, 2004 - 12:23 AM

Can I please get the resolution to this? I currently have the same problem but can’t see where the problem lies. I am on Windows XP SP2 using version 2.23 and have a CExtResizableDialog with two buttons. When displayed they are both black. I do not know why. It works fine with just a CDialog but then I can’t use anchors to resize the list box I have in there to fit the entire panel.

If there was a fix please let me know what it was, as it was disussed awhile ago.

Technical Support Oct 19, 2004 - 5:34 AM

This bug was fixed in Prof-UIS 2.24. Please download and use the latest version.

Sam Contapay Oct 19, 2004 - 10:38 AM

I’m sorry I should have been more clear. I am using the commercial version of 2.23. My 90 day support on it has expired, the reason I’m using the general forum. So in essence the 2.23 version I am currently using and paid for is "broken"? There is no fix for it and I can not use it to its fullest potential?

Technical Support Oct 20, 2004 - 5:27 AM

Dear Sam,

Your technical support is expired. Of course, it would be better for you and for us if you renewed the support and upgraded to newer versions in which this bug is fixed.

Please try to modify the body of the CExtPaintManager::stat_DefIsHwndNeedsDirectRepaint method to:

 
bool CExtPaintManager::stat_DefIsHwndNeedsDirectRepaint(
            HWND hWndChild
            )
{
DWORD dwChildStyle =
                        DWORD( GetWindowLong(hWndChild,GWL_STYLE) );
/*
            if( (dwChildStyle&WS_CHILD) == 0 )
                        return true;
            else if( (dwChildStyle&WS_CLIPSIBLINGS) != 0 )
                        return false;
 
/// -DY (2.25)
 
HWND hWndParent = ::GetParent( hWndChild );
            if( hWndParent != NULL )
            {
                        DWORD dwParentStyle =
                                   DWORD( GetWindowLong(hWndParent,GWL_STYLE) );
                        if( (dwParentStyle&WS_CLIPCHILDREN) != 0 )
                                   return false;
            } // if( hWndParent != NULL )
*/
CExtSafeString sClassName;
            ::GetClassName(
                        hWndChild,
                        sClassName.GetBuffer( _MAX_PATH+1 ),
                        _MAX_PATH
                        );
            sClassName.ReleaseBuffer();
            sClassName.MakeLower();
            if( sClassName == LPCTSTR( _T("static") ) )
                        return true;
            if( sClassName == LPCTSTR( _T("systabcontrol32") ) )
                        return true;
            if( sClassName == LPCTSTR( _T("msctls_trackbar32") ) )
                        return true;
            if(                     sClassName == LPCTSTR( _T("button") )
                        &&       (           g_PaintManager.m_bUxValidColorsExtracted
                                   ||          (dwChildStyle&0x0F) == BS_DEFPUSHBUTTON
                                   ||          (dwChildStyle&0x0F) == BS_PUSHBUTTON
                                   ||          (dwChildStyle&0x0F) == BS_CHECKBOX
                                   ||          (dwChildStyle&0x0F) == BS_AUTOCHECKBOX
                                   ||          (dwChildStyle&0x0F) == BS_RADIOBUTTON
                                   ||          (dwChildStyle&0x0F) == BS_3STATE
                                   ||          (dwChildStyle&0x0F) == BS_AUTO3STATE
                                   ||          (dwChildStyle&0x0F) == BS_GROUPBOX
                                   ||          (dwChildStyle&0x0F) == BS_AUTORADIOBUTTON
                                   )
                        )
                        return true;
            return false;
}
This should fix the problem.

Sam Contapay Oct 20, 2004 - 10:44 AM

Understood!


Thanks for the help. I’m looking to up and renew support, but I sent several emails and I’m waiting for a response. Can you please tell me if you recieved my emails, and what the answer to them is? Thanks.

Technical Support Oct 20, 2004 - 11:27 AM

We have not received any e-mail from you, which you mentioned in the forum. We updated you account so that you can renew the technical support by one year starting from now.

Sam Contapay Oct 20, 2004 - 2:04 PM

I sent the email from scontapay@gmail.com apparently SBC is blocking a lot of my emails to you, which I just found out I have been sending messages for months now expecting a response but not getting any. It was my providers problem not yours.

But I resent to support@fossware.com, support@prof-uis.com, and info@prof-uis.com from my gmail account please let me know if this works.