I have dialog box with two controls: tree view and list box.
I also have message handler for my dialog box.
case WM_NOTIFY:
{
switch(LOWORD(wParam))
{
case IDC_LIST1: //we NEVER comes here
if(((LPNMHDR)lParam)->code == NM_CLICK)
{
//do some work;
return (INT_PTR)TRUE;
}
break;
case IDC_TREE1:
if(((LPNMHDR)lParam)->code == NM_DBLCLK)
{
//do some work;
return (INT_PTR)TRUE;
}
break;
}
}
break;
So, I can’t understand why notifications from tree box comes succesfully, but notifications from list box never comes, despite the fact that in the properties of list box’ control Notify value is set TRUE.
Thank you.
Let’s check the documentation.
List Box Styles:
LBN_SELCHANGE:
LBN_DBLCLK:
LBN_SELCANCEL:
Conclusion: List boxes use
WM_COMMANDto notify the parent, notWM_NOTIFY.