Solved

OWNERDRAWFIXED message in CListCtrl

Posted on 1998-06-08
4
539 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 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