[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== SendMessage working with ListBox (OpenInsight 32-bit Specific) ==== === At 24 FEB 2004 04:37:49PM Kevin Bolitho wrote: === {{tag>"OpenInsight 32-bit Specific"}} I am trying to determine the row height of a listbox I see in the Borland Windows.H file "#define LB_GETITEMHEIGHT (WM_USER+34)" This is what I am trying to do... hWnd=Get_Property(BubCtrl,"HANDLE") RowHeight=SendMessage(hWnd,1058,1,0) ;* 1058=1024 + 34 Result is hWnd is returned with a number that looks resonable. RowHeight is always returned as 0 rather than the number of pixels. If anyone else has done this then my error may be obvious. Thanks for responses in advance. ---- === At 24 FEB 2004 07:38PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Kevin, Was that a 16 bit windows.h file perchance? The Win32 header files state: #define LB_GETITEMHEIGHT 0x01A1 Which returns the correct value when used with SendMessage on my OI system. Basically MS changed a lot of message IDs in Win32 so make sure you have the correct headers... [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 24 FEB 2004 11:00PM Pat McNerthney wrote: === Kevin, The documentation on [url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listboxes/listboxreference/listboxmessages/lb_getitemheight.asp]here[/url] on LB_GETITEMHEIGHT says the following about the wParam parameter (the third parameter of SendMessage): "Specifies the zero-based index of the list box item. This index is used only if the list box has the LBS_OWNERDRAWVARIABLE style; otherwise, it must be zero." Your code is passing one in this parameter. Pat [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=C2790864E208853785256E440076D1C0|View this thread on the forum...]]