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 » Themed CListCtrl II Collapse All
Subject Author Date
George Freewood Aug 2, 2007 - 2:23 AM

Hello,

in another thread with a similar title two questions remained open:

1. If the support of a themed CListCtrl is not possible, would it be at least possible to get a themed CHeaderCtrl in Prof-UIS?
2. You mentioned problems to achieve a "themed background" of a CListCtrl. But what is meant with such themed background?

Technical Support Aug 2, 2007 - 2:13 PM

1. We added the "skinned CExtHeaderCtrl and CListCtrl" item to our TO-DO list. We need to repaint header items using the same APIs which paint report grid’s header cells.

2. We did not mean anything special about skinning the client area of the list view control and just thought you may have some ideas about this.

Hans Bergmeister Jan 11, 2008 - 3:05 AM

Hello,

is there any progress regarding a skinned CExtHeaderCtrl ?

George Freewood Aug 3, 2007 - 2:11 AM

Hello,

re 1.
Many thanks for adding this to your list. In the meantime we helped ourselves with an intermediate solution by using a hidden report grid window with just one cell and calling the CExtPaintManager::ReportGrid_PaintHeaderRowBackground() and CExtReportGridWnd::OnGbwPaintCell() APIs in a custom draw handler of our own version of a themed CHeaderCtrl.

It looks nice, but the implementation would be more perfect and clean, if we could go without the hidden report grid.

re 2.
Now I understand. With "no ideas" you appearently wanted to say, that you don’t know _what_ to do. Originally I understood _how_ to do and couldn’t imagine, that this is a real problem for you expert guys ;-)

Anyway, I can actually provide some ideas: we created a themed CListCtrl, too. It subclasses our own themed CHeaderCtrl. Furthermore it uses g_CExtPaintManager::GetColor(COLOR_3DFACE) as the color to highlight the selection and to draw grid lines in report mode, if any.

Both, the header and the list now perfectly fit to the appearance of our applications.

BTW: if you are doing a themed CListCtrl anyway then it would be a useful enhancement, too, if you offer an option, with which the "sort column" in report view could be specified. If this is done, then the header ctrl should show an arrow in the related item and the column itself should be slightly highlighted - exactly the same way as the Windows Explorers looks like in report view on Windows XP. This feature is missing in the standard CListCtrl.

Technical Support Aug 3, 2007 - 11:13 AM

Thank you for your explanations. The sortable feature in list view controls in the report mode can be easily found on the Internet and we even have our own implementation of this feature in the source code of some old projects. So, we will treat it as the most important requirement for skinned header control and scroll bars. It is not a problem to add sorting to this class. It should be compatible with any custom drawn list view items in scope of your projects

George Freewood Aug 3, 2007 - 1:16 PM

Hello,

sounds great! Many thanks in advance.