Item's problem of states and action
-
Q1: if(action&ODA_FOCUS) { CBrush brush(RGB(255,0,0)); pDC->FrameRect(&rectItem,&brush); } I wonder why I do this in DrawItem,when I ran the program and clicked the item which is not the first one,the first item's edge turned red too? Q2: What is difference between ODA_FOCUS and ODA_SELECT? Q3: As I click an item in a listbox,and then I click another control,does combination of (state & ODS_SELECTED)&& !(action&ODA_FOCUS) correspond to the item I clicked firstly?
-
Q1: if(action&ODA_FOCUS) { CBrush brush(RGB(255,0,0)); pDC->FrameRect(&rectItem,&brush); } I wonder why I do this in DrawItem,when I ran the program and clicked the item which is not the first one,the first item's edge turned red too? Q2: What is difference between ODA_FOCUS and ODA_SELECT? Q3: As I click an item in a listbox,and then I click another control,does combination of (state & ODS_SELECTED)&& !(action&ODA_FOCUS) correspond to the item I clicked firstly?
No one is interested in this problem?~~~:sigh: