Solved

OWNERDRAWFIXED message in CListCtrl

Posted on 1998-06-08
4
556 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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…
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

624 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