Header Item Rectangle

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!
 
H

Herfried K. Wagner [MVP]

* "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'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top