Click here to Skip to main content
15,885,032 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: reduce size of array Pin
David Crow21-Jul-05 7:06
David Crow21-Jul-05 7:06 
GeneralRe: reduce size of array Pin
Mepho21-Jul-05 19:51
Mepho21-Jul-05 19:51 
GeneralTimer Pin
Halawlaws20-Jul-05 23:03
Halawlaws20-Jul-05 23:03 
GeneralRe: Timer Pin
toxcct21-Jul-05 0:20
toxcct21-Jul-05 0:20 
Generalmail attachment Pin
_tasleem20-Jul-05 22:57
_tasleem20-Jul-05 22:57 
GeneralRe: mail attachment Pin
Alexander M.,21-Jul-05 1:25
Alexander M.,21-Jul-05 1:25 
GeneralRe: mail attachment Pin
David Crow21-Jul-05 3:08
David Crow21-Jul-05 3:08 
GeneralPassing Data Around Custom Draw Message Handler Pin
yccheok20-Jul-05 22:55
yccheok20-Jul-05 22:55 
Hello all, I decide to have a list control, where it will print out the error message in red and the information message in green.

I try to take a look on http://www.codeproject.com/listctrl/lvcustomdraw.asp

The item is colered, based on their position. However, I need a way to store, to indicate whether this item represents error or information message.

Hence, I use the following approach:

In my method which inserting the control list item:

LVITEM lvi
lvi.lParam = ERROR_MESSAGE

In my custom draw method:

NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<nmlvcustomdraw*>( pNMHDR );
if ( (pLVCD->nmcd.lItemlParam) == ERROR_MESSAGE)

However, I always get something else in pLVCD->nmcd.lItemlParam

How I can pass the "error message" information to the custom draw message handler? Can anyone please advice on my implementation?

Thank you.

cheok
GeneralRe: Passing Data Around Custom Draw Message Handler Pin
Blake Miller21-Jul-05 4:53
Blake Miller21-Jul-05 4:53 
GeneralCompile program C++ by Visual C++.NET Pin
SAKURAVN20-Jul-05 22:50
SAKURAVN20-Jul-05 22:50 
GeneralCListCtrl Pin
ditty grail20-Jul-05 22:49
ditty grail20-Jul-05 22:49 
GeneralRe: CListCtrl Pin
Jetli Jerry20-Jul-05 23:37
Jetli Jerry20-Jul-05 23:37 
GeneralNeed Help to Resolve the Problem in Hit test Pin
SivaramanDhamodharan20-Jul-05 22:14
SivaramanDhamodharan20-Jul-05 22:14 
GeneralRe: Need Help to Resolve the Problem in Hit test Pin
Jose Lamas Rios21-Jul-05 3:12
Jose Lamas Rios21-Jul-05 3:12 
GeneralRe: Need Help to Resolve the Problem in Hit test Pin
John R. Shaw21-Jul-05 6:32
John R. Shaw21-Jul-05 6:32 
GeneralRe: Need Help to Resolve the Problem in Hit test Pin
SivaramanDhamodharan21-Jul-05 20:57
SivaramanDhamodharan21-Jul-05 20:57 
Generaltrouble in inserting data to tree control Pin
firebolt7720-Jul-05 21:47
firebolt7720-Jul-05 21:47 
GeneralRe: trouble in inserting data to tree control Pin
Marc Soleda20-Jul-05 22:29
Marc Soleda20-Jul-05 22:29 
GeneralRe: trouble in inserting data to tree control Pin
David Crow21-Jul-05 3:07
David Crow21-Jul-05 3:07 
GeneralRe: trouble in inserting data to tree control Pin
firebolt7721-Jul-05 15:32
firebolt7721-Jul-05 15:32 
GeneralRe: trouble in inserting data to tree control Pin
David Crow22-Jul-05 2:37
David Crow22-Jul-05 2:37 
GeneralRe: trouble in inserting data to tree control Pin
firebolt7724-Jul-05 15:51
firebolt7724-Jul-05 15:51 
GeneralRe: trouble in inserting data to tree control Pin
David Crow25-Jul-05 2:44
David Crow25-Jul-05 2:44 
GeneralRe: trouble in inserting data to tree control Pin
firebolt7725-Jul-05 15:24
firebolt7725-Jul-05 15:24 
GeneralRe: trouble in inserting data to tree control Pin
David Crow25-Jul-05 16:50
David Crow25-Jul-05 16:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.