Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

OWNERDRAWFIXED message in CListCtrl

Posted on 1998-06-08
4
Medium Priority
?
567 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 100 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

660 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