Windows List Box Notifications
Windows Predefined Controls – Part 17
Volume - Windows User Interface
Forward: In this part of the series, we look at Windows List Box Notifications.
By: Chrysanthus Date Published: 29 Aug 2012
Introduction
Note: If you cannot see the code or if you think anything is missing (broken link, image absent), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.
Notifications
When a user causes an event on a list box, a message is sent to the window class procedure of the parent window of the list box. Such a message is called a notification. Each of these messages is actually an identifier for a constant. The notification is sent to the procedure in the form of a WM_COMMAND message. To know more about the command message, read the tutorial in this blog titled, Control Messages. I now give you the notification code and their meanings.
LBN_DBLCLK: This code notifies the application that the user has double-clicked an item in a list box. The LOWORD of wParam contains the identifier of the list box. The HIWORD specifies the notification code. The lParam has the handle to the list box.
LBN_ERRSPACE: This code notifies the application that the list box cannot allocate enough memory to meet a specific request. The LOWORD of wParam contains the identifier of the list box. The HIWORD specifies the notification code. The lParam has the handle to the list box.
LBN_KILLFOCUS: This code notifies the application that the list box has lost the keyboard focus. The LOWORD of wParam contains the identifier of the list box. The HIWORD specifies the notification code. The lParam has the handle to the list box.
LBN_SELCANCEL: This code notifies the application that the user has canceled the selection in a list box. The LOWORD of wParam contains the identifier of the list box. The HIWORD specifies the notification code. The lParam has the handle to the list box.
LBN_SELCHANGE: This code notifies the application that the selection in a list box has changed. The user changes the selection by clicking another list item. The LOWORD of wParam contains the identifier of the list box. The HIWORD specifies the notification code. The lParam has the handle to the list box.
LBN_SETFOCUS: This code notifies the application that the list box has received the keyboard focus. The LOWORD of wParam contains the identifier of the list box. The HIWORD specifies the notification code. The lParam has the handle to the list box.
That is it for this part of the series. We stop here and continue in the next part.
Chrys
Related Courses
C++ CourseRelational Database and Sybase
Windows User Interface
Computer Programmer – A Jack of all Trade – Poem
NEXT