Added code to try to figure out the bheavior of WIndows Tables for adding an OnSelected() event.
This commit is contained in:
parent
3422949f15
commit
3b380ea07f
|
@ -25,6 +25,35 @@ static void handle(HWND hwnd, WPARAM wParam, LPARAM lParam, void (*handler)(void
|
||||||
(*handler)(data, ht.iItem, ht.iSubItem);
|
(*handler)(data, ht.iItem, ht.iSubItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct {int code; char *name;} lvnnames[] = {
|
||||||
|
{ LVN_ITEMCHANGING, "LVN_ITEMCHANGING" },
|
||||||
|
{ LVN_ITEMCHANGED, "LVN_ITEMCHANGED" },
|
||||||
|
{ LVN_INSERTITEM, "LVN_INSERTITEM" },
|
||||||
|
{ LVN_DELETEITEM, "LVN_DELETEITEM" },
|
||||||
|
{ LVN_DELETEALLITEMS, "LVN_DELETEALLITEMS" },
|
||||||
|
{ LVN_BEGINLABELEDITA, "LVN_BEGINLABELEDITA" },
|
||||||
|
{ LVN_BEGINLABELEDITW, "LVN_BEGINLABELEDITW" },
|
||||||
|
{ LVN_ENDLABELEDITA, "LVN_ENDLABELEDITA" },
|
||||||
|
{ LVN_ENDLABELEDITW, "LVN_ENDLABELEDITW" },
|
||||||
|
{ LVN_COLUMNCLICK, "LVN_COLUMNCLICK" },
|
||||||
|
{ LVN_BEGINDRAG, "LVN_BEGINDRAG" },
|
||||||
|
{ LVN_BEGINRDRAG, "LVN_BEGINRDRAG" },
|
||||||
|
//{ LVN_ODCACHEHINT, "LVN_ODCACHEHINT" },
|
||||||
|
{ LVN_ODFINDITEMA, "LVN_ODFINDITEMA" },
|
||||||
|
{ LVN_ODFINDITEMW, "LVN_ODFINDITEMW" },
|
||||||
|
{ LVN_ITEMACTIVATE, "LVN_ITEMACTIVATE" },
|
||||||
|
{ LVN_ODSTATECHANGED, "LVN_ODSTATECHANGED" },
|
||||||
|
{ LVN_SETDISPINFOA, "LVN_SETDISPINFOA" },
|
||||||
|
{ LVN_SETDISPINFOW, "LVN_SETDISPINFOW" },
|
||||||
|
//{ LVN_KEYDOWN, "LVN_KEYDOWN" },
|
||||||
|
{ LVN_MARQUEEBEGIN, "LVN_MARQUEEBEGIN" },
|
||||||
|
{ LVN_GETINFOTIPA, "LVN_GETINFOTIPA" },
|
||||||
|
{ LVN_GETINFOTIPW, "LVN_GETINFOTIPW" },
|
||||||
|
{ LVN_BEGINSCROLL, "LVN_BEGINSCROLL" },
|
||||||
|
{ LVN_ENDSCROLL, "LVN_ENDSCROLL" },
|
||||||
|
{ 0, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
static LRESULT CALLBACK tableSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR id, DWORD_PTR data)
|
static LRESULT CALLBACK tableSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR id, DWORD_PTR data)
|
||||||
{
|
{
|
||||||
NMHDR *nmhdr = (NMHDR *) lParam;
|
NMHDR *nmhdr = (NMHDR *) lParam;
|
||||||
|
@ -37,6 +66,7 @@ static LRESULT CALLBACK tableSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
tableGetCell((void *) data, &(fill->item));
|
tableGetCell((void *) data, &(fill->item));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
for(int i=0;lvnnames[i].code!=0;i++)if(lvnnames[i].code==nmhdr->code)printf("%s\n",lvnnames[i].name);
|
||||||
return (*fv_DefSubclassProc)(hwnd, uMsg, wParam, lParam);
|
return (*fv_DefSubclassProc)(hwnd, uMsg, wParam, lParam);
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
handle(hwnd, wParam, lParam, tableSetHot, (void *) data);
|
handle(hwnd, wParam, lParam, tableSetHot, (void *) data);
|
||||||
|
|
Loading…
Reference in New Issue