Click here to Skip to main content
15,902,492 members
Home / Discussions / C#
   

C#

 
GeneralRe: two xml doubts Pin
Heath Stewart18-Oct-04 7:23
protectorHeath Stewart18-Oct-04 7:23 
QuestionHow to convert VC++ to C# code? Pin
momer18-Oct-04 1:22
momer18-Oct-04 1:22 
AnswerRe: How to convert VC++ to C# code? Pin
Heath Stewart18-Oct-04 7:14
protectorHeath Stewart18-Oct-04 7:14 
GeneralRe: How to convert VC++ to C# code? Pin
momer18-Oct-04 16:51
momer18-Oct-04 16:51 
GeneralText Wrap for ListView in C# Pin
Member 141415918-Oct-04 1:09
Member 141415918-Oct-04 1:09 
GeneralRe: Text Wrap for ListView in C# Pin
Heath Stewart18-Oct-04 7:11
protectorHeath Stewart18-Oct-04 7:11 
GeneralRe: Text Wrap for ListView in C# Pin
Sundar K18-Oct-04 18:52
sussSundar K18-Oct-04 18:52 
GeneralRe: Text Wrap for ListView in C# Pin
Heath Stewart19-Oct-04 5:32
protectorHeath Stewart19-Oct-04 5:32 
Glacial ListView is using the existing List-View common control. Like I wrote previously, most of the controls - including the ListView control - are simply encapsulating the native common controls.

If you'd rather do this yourself, either look at the source for the Glacial ListView (that's why it's posted) or read the reference documentation for the List-View common control at http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/listview/reflist.asp[^]. If you're not familiar with P/Invoke (calling native functions in .NET), read Consuming Unmanaged DLL Functions[^] in the .NET Framework SDK, as well as Marshaling Data with Platform Invoke[^].

Again, if you want examples look at the Glacial ListView. While he isn't started with the ListView defined in the BCL, it really doesn't matter. He's still constrained by the Control class and almost everything implemented in that control you can implement because it's all going back to native code. The owner drawing is what you're interested in (specifically the NM_CUSTOMDRAW (-12) message, which you can read about at http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/listview/notifications/nm_customdraw_listview.asp[^]). All of these messages are sent through the WndProc defined by the Control class and overridden by every control in the .NET BCL to provide hooks (like to fire events or draw ornaments on controls).

Everything you need to know you can find in the article for the Glacial ListView as well as other articles on this site about owner drawing .NET Windows Forms Controls (which really is about owner drawing the common controls - just using managed code). I see no reason to duplicate those rather long articles here in the forums.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Text Wrap for ListView in C# Pin
Member 141415919-Oct-04 13:35
Member 141415919-Oct-04 13:35 
GeneralWebSerivce output xml Pin
jzb18-Oct-04 0:42
jzb18-Oct-04 0:42 
GeneralRe: WebSerivce output xml Pin
Heath Stewart18-Oct-04 7:04
protectorHeath Stewart18-Oct-04 7:04 
GeneralTreeView DragDrop image Pin
dorothyDorothy17-Oct-04 23:39
dorothyDorothy17-Oct-04 23:39 
GeneralRe: TreeView DragDrop image Pin
Heath Stewart18-Oct-04 6:52
protectorHeath Stewart18-Oct-04 6:52 
GeneraldateTime parser Pin
Rob Tomson17-Oct-04 23:27
Rob Tomson17-Oct-04 23:27 
GeneralRe: dateTime parser Pin
J4amieC18-Oct-04 0:28
J4amieC18-Oct-04 0:28 
GeneralTreeView/ListView item selection and context menu Pin
EnkelIk17-Oct-04 21:44
EnkelIk17-Oct-04 21:44 
GeneralRe: TreeView/ListView item selection and context menu Pin
petst17-Oct-04 22:06
petst17-Oct-04 22:06 
GeneralRe: TreeView/ListView item selection and context menu Pin
afinnell18-Oct-04 5:35
afinnell18-Oct-04 5:35 
GeneralRe: TreeView/ListView item selection and context menu Pin
Heath Stewart18-Oct-04 6:41
protectorHeath Stewart18-Oct-04 6:41 
Generalcapturing any window in ur application Pin
Member 143169617-Oct-04 21:18
Member 143169617-Oct-04 21:18 
GeneralRe: capturing any window in ur application Pin
Heath Stewart18-Oct-04 6:32
protectorHeath Stewart18-Oct-04 6:32 
GeneralSending a string to Crystal Report Pin
myNameIsRon17-Oct-04 21:06
myNameIsRon17-Oct-04 21:06 
GeneralRe: trying to write to a log file in destructor Pin
Colin Angus Mackay17-Oct-04 20:56
Colin Angus Mackay17-Oct-04 20:56 
GeneralRe: trying to write to a log file in destructor Pin
Gavin Jeffrey17-Oct-04 21:41
Gavin Jeffrey17-Oct-04 21:41 
GeneralRe: trying to write to a log file in destructor Pin
Colin Angus Mackay17-Oct-04 23:01
Colin Angus Mackay17-Oct-04 23:01 

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.