Announcement

Collapse
No announcement yet.

ListBox_GetItemRect Macro

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ListBox_GetItemRect Macro

    Jose',

    Might of found a typo unless I am using it wrong.

    Code:
    ' ========================================================================================
    ' Gets the dimensions of the rectangle that bounds a list box item as it is currently
    ' displayed in the list box.
    ' ========================================================================================
    #IF %DEF(%USEPBDECL)
    MACRO ListBox_GetItemRect(hwndCtl, index, lprc)=SendMessage(hwndCtl, %LB_GETITEMRECT, index, lprc)
    #ELSE
    FUNCTION Listbox_GetItemRect (BYVAL hListBox AS DWORD, BYVAL index AS LONG, BYREF lpRect AS RECT) AS LONG
       FUNCTION = SendMessage(hListBox, %LB_GETITEMHEIGHT, index, VARPTR(lpRect))
    END FUNCTION
    #ENDIF
    I am thinking that "LB_GETITEMHEIGHT" should be "LB_GETITEMRECT". This is in ListBoxCtrl.inc on Includes III v1.07

    Frank

  • #2
    Yes, it is a typo. Please replace it with LB_GETITEMRECT.
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment

    Working...
    X