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

C#

 
GeneralRe: [COM]DrCOM-Monitor Tool and more?[COM] Pin
kenokabe22-Feb-04 14:18
kenokabe22-Feb-04 14:18 
GeneralRe: [COM]DrCOM-Monitor Tool and more?[COM] Pin
Mazdak22-Feb-04 19:01
Mazdak22-Feb-04 19:01 
GeneralRe: [COM]DrCOM-Monitor Tool and more?[COM] Pin
kenokabe22-Feb-04 19:16
kenokabe22-Feb-04 19:16 
GeneralDataGrid, DataSet with DataTable and Sort Pin
gatemaster9922-Feb-04 1:40
gatemaster9922-Feb-04 1:40 
GeneralRe: DataGrid, DataSet with DataTable and Sort Pin
gatemaster9922-Feb-04 22:31
gatemaster9922-Feb-04 22:31 
GeneralRe: DataGrid, DataSet with DataTable and Sort Pin
Gigiwig23-Feb-04 11:56
Gigiwig23-Feb-04 11:56 
QuestionListViewItem.SubItems.BackColor ??? Pin
sps-itsec4622-Feb-04 0:54
sps-itsec4622-Feb-04 0:54 
AnswerRe: ListViewItem.SubItems.BackColor ??? Pin
ian mariano22-Feb-04 10:59
ian mariano22-Feb-04 10:59 
This Codeproject article, http://www.codeproject.com/listctrl/selectentirerow.asp?target=LVS%5FOWNERDRAWFIXED[^], shows some of what you need, but it's in C++/MFC, not C#!

Basically you need to add the LVS_OWNERDRAWFIXED style to your derived ListView, and handle the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/comboboxes/comboboxreference/comboboxmessages/wm_drawitem.asp" target="_blank">WM_DRAWITEM</a> windows message and the corresponding DRAWITEMSTRUCT, which contains the iItemID of the item to draw.

You can add the style to by overriding the ListView's CreateParams property and intercept the WM_DRAWITEM in your overriden DefWndProc. The MSDN says this about LVS_OWNERDRAWFIXED:
"The owner window can paint items in report view. The list-view control sends a WM_DRAWITEM message to paint each item; it does not send separate messages for each subitem. The iItemData member of the DRAWITEMSTRUCT structure contains the item data for the specified list-view item. "

Ian Mariano - http://www.ian-space.com/


"We are all wave equations in the information matrix of the universe" - me

GeneralWeb request coding problem Pin
Niels Penneman22-Feb-04 0:14
Niels Penneman22-Feb-04 0:14 
Generalgetting common directory Pin
Rob Tomson21-Feb-04 23:56
Rob Tomson21-Feb-04 23:56 
GeneralGetting a unique system identifier Pin
mablebee21-Feb-04 22:18
mablebee21-Feb-04 22:18 
GeneralRe: Getting a unique system identifier Pin
Mazdak22-Feb-04 4:05
Mazdak22-Feb-04 4:05 
GeneralSelect Random Pin
Anonymous21-Feb-04 20:06
Anonymous21-Feb-04 20:06 
GeneralRe: Select Random Pin
Mazdak21-Feb-04 20:15
Mazdak21-Feb-04 20:15 
GeneralRe: Select Random Pin
Anonymous22-Feb-04 19:09
Anonymous22-Feb-04 19:09 
GeneralRe: Select Random Pin
turbochimp25-Feb-04 11:31
turbochimp25-Feb-04 11:31 
GeneralCustom Control Problem Pin
Guinness4Strength21-Feb-04 19:59
Guinness4Strength21-Feb-04 19:59 
GeneralRe: Custom Control Problem Pin
Dan_P21-Feb-04 22:02
Dan_P21-Feb-04 22:02 
GeneralRe: Custom Control Problem Pin
Guinness4Strength22-Feb-04 5:21
Guinness4Strength22-Feb-04 5:21 
GeneralSetting visibility of parent form from child. Pin
POnfri21-Feb-04 12:58
POnfri21-Feb-04 12:58 
GeneralRe: Setting visibility of parent form from child. Pin
POnfri21-Feb-04 15:09
POnfri21-Feb-04 15:09 
GeneralRe: Setting visibility of parent form from child. Pin
partyganger22-Feb-04 4:22
partyganger22-Feb-04 4:22 
Generaloverride vrs Event capturing Pin
Anonymous21-Feb-04 10:54
Anonymous21-Feb-04 10:54 
GeneralRe: override vrs Event capturing Pin
Charlie Williams21-Feb-04 11:18
Charlie Williams21-Feb-04 11:18 
GeneralRe: override vrs Event capturing Pin
Heath Stewart21-Feb-04 11:57
protectorHeath Stewart21-Feb-04 11:57 

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.