Solved

OWNERDRAWFIXED message in CListCtrl

Posted on 1998-06-08
4
521 Views
Last Modified: 2013-11-20
I'm using LVS_OWNERDRAWFIXED style in CListCtrl Create function. But frame work does not call my DrawItem function. I'm unable to find solution for this. Your help is highle appreciated.
The code I have written is as follows:
BOOL CMyListCtrl::Create()
{
style=WS_CHILD|LVS_REPORT|LVS_SINGLESEL|LVS_OWNERDRAWFIXED | LVS_SORTASCENDING;
BOOL bRet = CListCtrl::Create(style,rect,pParentWnd,nID);
if(bRet)
{

}
..............
return bRet
}

void CMyListCtrl::DrawItem( LPDRAWITEMSTRUCT dis )/*virtual*/
{
................
}
0
Comment
Question by:lganesh
4 Comments
 
LVL 1

Expert Comment

by:Andy_Keys
ID: 1316247
You are actually adding somthing to the list aren't you!!??
0
 
LVL 4

Expert Comment

by:piano_boxer
ID: 1316248
Take a look at the ROWLIST sample included in Visual C++
0
 

Author Comment

by:lganesh
ID: 1316249
Yes. I'm adding at runtime. I verified that Framework is not calling drawitem when I say InsertColumn and SetItemText.
I would like to add some additional information to my question.
In my project, application loads a DLL. Dll creates the list control and adds items at runtime. Do i have to subclass the class derived from list control to get messages.
0
 
LVL 3

Accepted Solution

by:
shaig earned 50 total points
ID: 1316250
How about adding to the Create flags the window style reffering to owner drawing?
I don't remmember the exact name, i think it was WS_OWNERDRAW ( it could also be an extended window style ).
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sameEnds challenge 3 133
dog bark java program 15 87
My project did see openJDK that I installed. What could be the problem 7 120
wordcount challenge 11 102
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short film showing how OnPage and Connectwise integration works.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now