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 » Getting the Theme to Show in the Application Title Bar Collapse All
Subject Author Date
Bill Olson Sep 23, 2009 - 7:23 AM

I am currently experimenting with converting an existing application to Prof UIS.  Many things have gone easier than I expected, but I’ve run into one issue I can’t seem to solve.  In the examples, I see that the title bar of the application changes when you change the theme.  No matter what I do, I can’t seem to get the title bar for the application to change from the standard Windows type.  The application is an SDI using Doc-View and the views are CFormViews.


I’m getting the same behavior from a new application created from scratch.


It seems like something that should be simple, but I haven’t been able to find the answer on my own.


Bill

Bill Olson Sep 25, 2009 - 7:28 AM

That did it.  The call in PreTranslateWindow was not using the template.


What’s odd is that I generated a project from scratch with your Visual Studio 2005 wizard, then compiled and ran what the wizard gave me except I experimented with different themes from the default.  That doesn’t have the title bar correct either, but the template class is being called correctly there.


Thanks for the help,


Bill

Bill Olson Sep 23, 2009 - 5:43 PM

Did that.  Here is the class declaration:


class CMainFrame : public CExtNCW < CFrameWnd >


Bill

Technical Support Sep 25, 2009 - 6:38 AM

The class declaration is OK. But if your main frame class has some overridden virtual methods like PreSubclassWindow(), PreTranslateMessage(), WindowProc(), you should check that these methods invoke correct parent class methods. I.e. the CMainFrame::WindowProc() method should invoke the CExtNCW < CFrameWnd > :: WindowProc() parent class method – not the CFrameWnd::WindowProc() method.
Please also note, not all the Prof-UIS paint managers support skinned window non client areas. The Office 2007 and XML skins do have this feature. But they do not skin window non client area if the DWM is running on Windows Vista and Windows 7.

Technical Support Sep 23, 2009 - 10:07 AM

The themed window non-client area is provided by the CExtNCW template class. You should make the main frame class in your project derived from the CExtNCW < CFrameWnd > class.