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 » How to change the colour of the border of a CExtNCW < CMDIFrameWnd > Collapse All
Subject Author Date
Andreas Spachtholz Mar 29, 2012 - 12:53 PM

Hi,
I would like to change the colour of the border of the main fram of our application.
Exactly I would like to let the colour change between two colours every second.

I already searched the forum and played around with WM_NCPAINT, but didn’t find the correct way.

Could you please help me !

Thanks a lot.

BR,
Andreas

Technical Support Apr 2, 2012 - 2:42 PM

You should start a timer and send the WM_NCPAINT message from your timer handler. The WM_NCPAINT message should draw what you need into the window device context with an excluded client area rectangle. You should also disable the window glass provided by DWM when running on Windows Vista or 7. This can be done using the DwmSetWindowAttribute() API invocation (you can see how we did this in the CExtNcFrameImpl::NcFrameImpl_AdjustVistaDwmCompatibilityIssues() method).

But ... You can simply use the standard FlashWindow() Win32 API which does what you need using system defined colors and style.