Friday, December 15

Windows List Box Notifications

Google+ Pinterest LinkedIn Tumblr +

Windows Predefined Controls – Part 17
Volume – Windows User Interface

Introduction
This is part 17 of my series, Windows Predefined Controls. In order to understand this tutorial, you most have read all the previous tutorials of the series. In this part of the series, we look at Windows List Box Notifications.

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.

Notification Code: Meaning
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

To arrive at any of the parts of this series, just type the corresponding title below in the Search Box of this page and click Search (use menu if available):

Static Control Styles
Windows List Box
Windows List Box Styles
Windows List Box Notifications
Windows List Box Messages
Creating a List Box
List Box Functions
 

Share.

About Author

Leave A Reply