Solved

CDDS_PREERASE notification in CListCtrl

Posted on 2004-09-06
3
726 Views
Last Modified: 2013-11-20
How can I catch the CDDS_PREERASE notification in a CListCtrl? I am assuming that a return of CDRF_SKIPDEFAULT will stop the CListCtrl from erasing its contents before I start any custom drawing.
0
Comment
Question by:gunaro
3 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 250 total points
ID: 11989473
About Custom Draw Notification Messages
All common controls that support custom draw send NM_CUSTOMDRAW notification messages at specific points during drawing operations. These notifications describe drawing operations that apply to the entire control as well as drawing operations specific to items within the control. Like many notification messages, NM_CUSTOMDRAW notifications are sent as WM_NOTIFY messages.

The lParam parameter of a custom draw notification message will be the address of an NMCUSTOMDRAW structure or a control-specific structure that contains an NMCUSTOMDRAW structure as its first member. The following table illustrates the relationship between the controls and the structures they use.

Structure  Used by
NMCUSTOMDRAW Rebar, trackbar, and header controls
NMLVCUSTOMDRAW  List-view controls
NMTBCUSTOMDRAW  Toolbar controls
NMTTCUSTOMDRAW  ToolTip controls
NMTVCUSTOMDRAW  Tree-view controls


I think what you require is to trap the notify message about custom draw, then in the NMCUSTOMDRAW structure check the dwDrawStage member for being set to CDDS_PREERASE.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 84
Expand LInux Boot partition remotly 3 91
zeroFront challenge 7 100
MaxSpan challenge 9 96
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.

831 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