I have a C # application that should get a bunch of information from another window written in C ++ using MFC. The C # application is a plugin for a product containing this other window, so they both work in the same process.
This other window contains a number of fields from which I successfully received the lines by calling:
[DllImport( "user32.dll", SetLastError = true )] public static extern uint GetDlgItemText( IntPtr hDlg, int nIDDlgItem, [Out] StringBuilder lpString, int nMaxCount );
But it also contains 2 list controls that can contain multiple rows of data, each of which contains multiple columns.
How to get this data?
Is there another function in user32.dll that I should use?
Can you get a handle to a list control using:
[DllImport( "User32", SetLastError = true )] public static extern IntPtr GetDlgItem( IntPtr hwndParent, int ItemId );
and then somehow injected it into a .NET control to get rows and columns from?
source share