Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: Best C# IRC Channel? Pin
Marlun4-May-04 6:27
Marlun4-May-04 6:27 
GeneralRe: Best C# IRC Channel? Pin
Heath Stewart4-May-04 8:02
protectorHeath Stewart4-May-04 8:02 
GeneralRe: Best C# IRC Channel? Pin
Marlun4-May-04 10:08
Marlun4-May-04 10:08 
GeneralRe: Best C# IRC Channel? Pin
eggie54-May-04 15:54
eggie54-May-04 15:54 
GeneralRe: Best C# IRC Channel? Pin
Marlun4-May-04 20:23
Marlun4-May-04 20:23 
GeneralRe: Best C# IRC Channel? Pin
eggie55-May-04 2:01
eggie55-May-04 2:01 
Generalusing API in C# Pin
nthevu3-May-04 20:18
professionalnthevu3-May-04 20:18 
GeneralRe: using API in C# Pin
Heath Stewart4-May-04 3:46
protectorHeath Stewart4-May-04 3:46 
Why are you even P/Invoking anything? What you want is already possible using the ListView class and the ListViewItem class. The ListViewItem.Text property gets the text of the ListViewItem, which you can get by enumerating through the ListView.Items or using ListView.SelectedItems or something similar. If you want a particular item's region, then you can use ListView.GetItemRect, which can retrieve information about several parts of a ListViewItem.

Besides, you don't need an unsafe context and your SendMessage declaration is wrong. The wParam should be an IntPtr since it will be 32 bits on a 32-bit OS and 64 bits on a 64-bit OS (which is dependent on the processor). The last member of your struct should also be just an IntPtr.

Seriously, though, don't waste your time doing this. Everything you're trying to do according to your post is easy using what's provided in the .NET FCL (namely, the System.Windows.Forms.dll assembly).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: using API in C# Pin
nthevu4-May-04 5:15
professionalnthevu4-May-04 5:15 
GeneralRe: using API in C# Pin
Heath Stewart4-May-04 8:00
protectorHeath Stewart4-May-04 8:00 
GeneralRe: using API in C# Pin
nthevu4-May-04 18:18
professionalnthevu4-May-04 18:18 
GeneralAbout WebServer Pin
Moon Boy3-May-04 13:24
Moon Boy3-May-04 13:24 
GeneralRe: About WebServer Pin
TigerNinja_3-May-04 17:39
TigerNinja_3-May-04 17:39 
GeneralRe: About WebServer Pin
Heath Stewart4-May-04 3:40
protectorHeath Stewart4-May-04 3:40 
GeneralHuge Inout problem Pin
yomna-eltawil3-May-04 13:28
yomna-eltawil3-May-04 13:28 
GeneralRe: Huge Inout problem Pin
Heath Stewart4-May-04 3:38
protectorHeath Stewart4-May-04 3:38 
GeneralRe: Huge Inout problem Pin
leppie4-May-04 6:59
leppie4-May-04 6:59 
GeneralStrong-Named Assemblies Pin
Anders Molin3-May-04 12:59
professionalAnders Molin3-May-04 12:59 
GeneralRe: Strong-Named Assemblies Pin
Anders Molin3-May-04 13:09
professionalAnders Molin3-May-04 13:09 
Generalusing signcode.exe Pin
Anders Molin3-May-04 13:14
professionalAnders Molin3-May-04 13:14 
GeneralRe: using signcode.exe Pin
Nick Parker3-May-04 17:25
protectorNick Parker3-May-04 17:25 
GeneralRe: using signcode.exe Pin
Heath Stewart4-May-04 3:19
protectorHeath Stewart4-May-04 3:19 
GeneralRe: using signcode.exe Pin
Anders Molin4-May-04 4:26
professionalAnders Molin4-May-04 4:26 
GeneralRe: using signcode.exe Pin
Heath Stewart4-May-04 4:39
protectorHeath Stewart4-May-04 4:39 
GeneralRe: Strong-Named Assemblies Pin
Heath Stewart4-May-04 3:23
protectorHeath Stewart4-May-04 3:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.