WxW
asked on
ListView problem #2
Okay next problem about ListView . It seems that there is no notification messages like ListBox'es LBN_SELCHANGE , LBN_DBLCLK or LBN_SETFOCUS . I am most interested in mouse double click , is there a way w/o doing a heavy WM_mouse message processing ?
NM_DBLCLK in form of WM_NOTIFY?
NM_SETFOCUS?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Good all these, but the control won't send any WM_NOTIFY messages...
Do I lack a style ?
Do I lack a style ?
ASKER
Good all these, but the control won't send any WM_NOTIFY messages...
Do I lack a style ?
Do I lack a style ?
I do not know of any styles that keep the parent window from receiving messages. What needs to happen is that the list view control needs to supply the window handle of the desired parent window in it's CreateWindow call. The WM_NOTIFY message response goes in the parent's message procesing function. Also, if you are doing multi-threading the parent and child must be created in the same thread.
ASKER
I have the listview in a dialog box and I process the messages in the dialog box procedure . The Listview has LVS_REPORT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
It won't send any WM_NOTIFY to the parent .
It won't send any WM_NOTIFY to the parent .
I have never created a ListView control as the child of a dialog. But here are the things I would double check.
Are you creating the ListView in the WM_INITDIALOG logic of the dialog? And is the check for the WM_NOTIFY message in that same function?
If this does not work another approach would be to sub-class the dialog and look for the WM_NOTIFY message in the message processing function that you put in place of the dialogs.
Are you creating the ListView in the WM_INITDIALOG logic of the dialog? And is the check for the WM_NOTIFY message in that same function?
If this does not work another approach would be to sub-class the dialog and look for the WM_NOTIFY message in the message processing function that you put in place of the dialogs.
ASKER
I always create subclassed dialog boxes , and the listview is within the resource script , not the WM_INITDIALOG message.
At least you can use Spy to be sure are there needed messages or not.
Is the control in the resource being created with the "SysListView32" class? That is the official class name of the ListView control.
Are you running Windows 98, or NT 4.0 or 95 with IE 3.0 or later? It would appear that some notification messages did not come about until then.
Unfortunately, I'm afraid that I cannot be of any more help to you as far as why you don't get the WM_NOTIFY messages.
Are you running Windows 98, or NT 4.0 or 95 with IE 3.0 or later? It would appear that some notification messages did not come about until then.
Unfortunately, I'm afraid that I cannot be of any more help to you as far as why you don't get the WM_NOTIFY messages.