I am creating SkinList Ctrl using Create method as shown below
m_pUserListCtrl = new CSkinListCtrl();
DWORD dwStyle = m_pUserListCtrl->GetExtendedStyle()|LVS_EX_FULLROWSELECT|LVS_SHOWSELALWAYS|LVS_EX_SUBITEMIMAGES;
I am facing below listed problems
1) if I use WS_BORDER in Create,If an Item is selected the borders are getting overlapped.
2) If I minimize and maximize the Dialog the List control is not repainted.
(Case: if any item is selected in listcontrol and then the dialog box is minimized and then
maximized this case is causing problem , I used Invalidate(TRUE) in OnCustomDrawList() it was working fine for this case but the CPU useage was going to 100%, I also tried to invalidate the list control during SC_MAXIMIZE and SC_RESTORE of dialog but still it is not working)
Posted by email@example.com
on 05/03/2005 11:31am
I used this in Windows not in dialogs, but its not working as it shud...
I used it like this-
class CMainWindow : public CFrameWnd // <<===
// CColorEdit m_cEdit;
CSkinListCtrl m_SkinList; // <<===
and used all other files as u explained in the article, but sorry, it was not working...only scrollbars were visible no listbox visible there in window..
Any help will be gratefull..
This problem let my hairs grayed, too. The solution is very simple. You should delete the complete PreSubclassWindow() function. Then call a dedicated SubclassWindow() after creation the control. Example:
m_liste.Create(WS_VISIBLE | LVS_REPORT | LVS_SHOWSELALWAYS,CRect(0,0,0,0),this, ID_CLIENT_LIST);
First create the control (m_liste)
Than subclass the Header.
Now it works.
You really think that LoadBitmap, CreateFontIndirect inside of OnPaint can be a kind of something useful?
And the skinning is just a fashion. Instead of abuse the list control you can write your own control from zero with functionalities that you need. And you tried to implement it but with MFC and propose to use it with stupid wizards. Sorry, if I did not understand something.
Excellent work, also an ideal article.
I like the way you create your own ListControl that gives advanced UI. But loading Bitmap took lot of time, so initially while starting application took lot of time.
Also inserting large no. of records with bitmap loading will be a tough job.
Good effort to civilised Microsoft CListCtrl control under
MFC. But the entire code works effectively when control
only configured under design enviornment i.e. List Control
There are further three mode i.e. Icon, Small Icon, List
modes does not supported by this code, and if control
configured then it crash.
There is little extra coding work involve to get around
Article is excellent! I have compiled and ran but did not see how it does that. Skinning is very well but the client color are not having good UI. Please increase readibility by setting fonts and back/fore colors.