Click here to Skip to main content
15,907,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralContext-sensitive modular HTML Help Pin
Banister7-May-04 8:38
Banister7-May-04 8:38 
GeneralC++ callback __cdecl to __thiscall Pin
greg897-May-04 7:52
greg897-May-04 7:52 
GeneralRe: C++ callback __cdecl to __thiscall Pin
Maarten Kools7-May-04 8:00
professionalMaarten Kools7-May-04 8:00 
GeneralRe: C++ callback __cdecl to __thiscall Pin
greg897-May-04 10:03
greg897-May-04 10:03 
GeneralRe: C++ callback __cdecl to __thiscall Pin
Maarten Kools7-May-04 10:12
professionalMaarten Kools7-May-04 10:12 
GeneralRe: C++ callback __cdecl to __thiscall Pin
John M. Drescher7-May-04 10:31
John M. Drescher7-May-04 10:31 
GeneralRe: C++ callback __cdecl to __thiscall Pin
valikac7-May-04 18:51
valikac7-May-04 18:51 
GeneralNM_CUSTOMDRAW (ListView) Pin
Maarten Kools7-May-04 7:22
professionalMaarten Kools7-May-04 7:22 
Hi,

I have a couple of list views in which I use Custom Draw to get my content on screen. This all works just fine, except for one thing. The uItemState member of the NMCUSTOMDRAW structure is supposed to indicate whether an item is selected or not.

I would test it like:
if( pNMCD->nmcd.uItemState & CDIS_SELECTED)
{
    // ...
}


Except that always ends up being true, even when an item is not selected. So, right now I'm testing the MFC way with GetItemState, and test for the LVIS_SELECTED bit. But am I just using uItemState in a wrong way or anything? Everywhere I look at on the web it's used in such way..

It's not a big thing, I mean, GetItemState does the job. But I am getting curious why it won't work for me.
GeneralRe: NM_CUSTOMDRAW (ListView) Pin
Gary R. Wheeler8-May-04 14:06
Gary R. Wheeler8-May-04 14:06 
GeneralCBitmapButton Pin
dart137-May-04 5:20
dart137-May-04 5:20 
GeneralRe: CBitmapButton Pin
Iain Clarke, Warrior Programmer7-May-04 5:35
Iain Clarke, Warrior Programmer7-May-04 5:35 
GeneralRe: CBitmapButton Pin
Rick York7-May-04 8:05
mveRick York7-May-04 8:05 
GeneralRe: CBitmapButton Pin
dart137-May-04 9:43
dart137-May-04 9:43 
GeneralRe: CBitmapButton Pin
David Crow7-May-04 8:17
David Crow7-May-04 8:17 
GeneralRe: CBitmapButton Pin
Gary R. Wheeler8-May-04 14:10
Gary R. Wheeler8-May-04 14:10 
Questionhow do i get the source code back Pin
Ghadir7-May-04 5:16
Ghadir7-May-04 5:16 
AnswerRe: Two Words ... Pin
Chris Meech7-May-04 5:32
Chris Meech7-May-04 5:32 
AnswerRe: how do i get the source code back Pin
RChin7-May-04 5:37
RChin7-May-04 5:37 
Generalit was deleted by accident, as stated in the original thread Pin
CABS7-May-04 5:41
CABS7-May-04 5:41 
GeneralRe: how do i get the source code back Pin
David Crow7-May-04 8:21
David Crow7-May-04 8:21 
GeneralRe: how do i get the source code back Pin
Steve S7-May-04 8:32
Steve S7-May-04 8:32 
Generallesson learned Pin
CABS7-May-04 9:15
CABS7-May-04 9:15 
AnswerRe: how do i get the source code back Pin
jmkhael7-May-04 5:52
jmkhael7-May-04 5:52 
GeneralRe: how do i get the source code back Pin
CABS7-May-04 6:10
CABS7-May-04 6:10 
Generalyes Pin
CABS7-May-04 6:11
CABS7-May-04 6:11 

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.