- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I don't understand how to process messages in a dialog based application. Specifically, I want to pick up and work with a WM_NOTIFY message from a list view control and go on to use the lparam of that message. It's the sort of thing that's done easily in a pure Win32 application, but I can find no examples and no hints as to how it should be done in a simple dialog based application.
Many thanks in advance for any help,
Mike
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
uselly a source like the one below will help.
integer*4 function DataInputProc( hDlg, message, uParam, lParam )Frank
integer hDlg ! window handle of the dialog box integer message ! type of message integer uParam ! message-specific information integer lParam
include 'resource.fd' select case (message)
case(WM_NOTIFY)
if( lParam == IDC_DataInputList) then
.....
DataInputProc = 0 return
end if ! or if( loword(lParam) == IDC_DataInputList) then
.....
DataInputProc = 0 return
end if end select
DataInputProc = 0 ! Didn't process the message return end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) Subclass the dialog, as in MenuDialog sample, and proceed with a combination of Frank's and my code in the dialog procedure.
2) Download and install Xeffort, and replace USE IFLOGM with USE XFLOGM; the rest of the code should be compilable and running, possibly with minor tweaks. It has native support for list-view controls (see the docs), and, even if it's not enough, you can easily install all WM_COMMAND/WM_NOTIFY callbacks (e.g. for a TreeView) using XSetCommand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Guys, that stuff about Subclassing was exactly what I needed to know. My program now works fine.
But this kind of thing highlights a frequent problem of mine - how do I find out about these more esoteric functions and is there a book or online resource where I can actually learn about the way Windows works?
Thanks again
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page