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 » CExtColorCtrl::SetupOldColor Collapse All
Subject Author Date
Olaf Baeyens Mar 27, 2003 - 6:53 AM

The examples distributed with PROF-UIS uses modal dialog boxes for showing the colors.

The older color of a CExtColorCtrl in MODE_DIFF is filled in when the dialog box is created.

The problem is that I use modeless dialog boxes so I have no access to m_algorithms[m_eMode]->OnSetOldRGB() so I created one myself:


void CExtColorCtrl::SetupOldColor(COLORREF clr)
{
    m_algorithms[m_eMode]->OnSetOldRGB( m_selClrs.m_clrNew );
    Invalidate();
    UpdateWindow();
}

Sergiy Lavrynenko Mar 28, 2003 - 6:30 AM

Dear Olaf,

Thank you for the good suggestion. But your method just sets old-color value from new one (clr parameter is unused). Here is the method to set user-defined old-color value:

void CExtColorCtrl::SetupOldColor( // suggested by Olaf Baeyens
COLORREF clr
)
{
if( m_selClrs.m_clrPrev == clr )
return;
m_selClrs.m_clrPrev = clr;
m_algorithms[m_eMode]->OnSetOldRGB( m_selClrs.m_clrPrev );
Invalidate();
UpdateWindow();
}

Regards, Sergiy.