Header Item Rectangle

  • Thread starter Thread starter Simon Abolnar
  • Start date Start date
S

Simon Abolnar

I am using VB.NET 2003
Framework 1.1

I can't get header item rectangle of ListView.

HeaderItemHandle = SendMessage (HWnd, HDM_GETITEMRECT, i,
headerItemRectangle)

Problem is in declaration of SendMessage API (lParam can't be of type RECT):

Private Declare Function SendMessage Lib "user32" _
(ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal
lParam As Integer) As IntPtr

How could I get headerItemRectangle?
Please, would you like to post an example?

Thanks all!
 
* "Simon Abolnar said:
I can't get header item rectangle of ListView.

HeaderItemHandle = SendMessage (HWnd, HDM_GETITEMRECT, i,
headerItemRectangle)

Problem is in declaration of SendMessage API (lParam can't be of type RECT):

Private Declare Function SendMessage Lib "user32" _
(ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal
lParam As Integer) As IntPtr

\\\
Public Structure RECT
Public left As Int32
Public top As Int32
Public right As Int32
Public bottom As Int32
End Structure
///

Declare the last param of 'SendMessage' as 'ByRef lParam As RECT'.
 
Back
Top