Working on a superclassed Listbox control.
I tried to trap this message in the parent window and send a user message on to the child control so that it could provide the MEASUREITEMSTRUCT.ItemHeight value:
Of course, it didn't work:
Is there ANY OTHER WAY of telling windows what this value should be,
I tried to trap this message in the parent window and send a user message on to the child control so that it could provide the MEASUREITEMSTRUCT.ItemHeight value:
Code:
CASE %WM_MEASUREITEM ' pass the message on to the superclassed LB control sendmessage (hlist, %WM_USER + %our_MEASUREITEM, wparam, lparam)
MSDN says: The system sends the WM_MEASUREITEM message to the owner window of combo boxes and list boxes created with the OWNERDRAWFIXED style before sending the WM_INITDIALOG message. As a result, when the owner receives this message, the system has not yet determined the height and width of the font used in the control; function calls and calculations requiring these values should occur in the main function of the application or library.
- based upon the font actually used in the Listbox control
- which can be done by the Listbox control itself?
Comment