|
-
October 26th, 1999, 11:40 AM
#1
How can I detect when user click on ListView's item ?
Hello,
I use Win32 simple application withough MFC support. It's only ListView control. It is create by CreateWindowEx(). What can I get message when user click on some item in this ListView. I tried to get WM_NOTIFY but it failed. I try this:
MSG msg;
HWND hWnd = CreateWindowEx(...);
while(::GetMessage(&msg, hWnd, 0, 0))
{
switch (msg.message)
{
case WM_NOTIFY:
{
MessageBox("User send NOTIFY message");
break;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
The problem is that I never see this MessageBox().
When I tried with other messages like WM_KEYDON, WM_CHAR, WM_CLOSE everythig is OK. So I wrong something in WM_NOTIFY code, but WHERE??
Please help me !!
Thank you in advance.
Regards: Drago
-
October 26th, 1999, 12:56 PM
#2
Re: How can I detect when user click on ListView's item ?
Have you tried WM_COMMAND? I don't know if the listview was part of Win 3.1 in any form, but I believe the older controls continue to respond to WM_COMMAND messages. Just a thought...
-
October 26th, 1999, 03:15 PM
#3
Re: How can I detect when user click on ListView's item ?
Hi,
Thats right but in MFC implementation most ListView messages are send with WM_NOTIFY.
But I'll try WM_COMMAND.
Reagrds: Drago
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|