|
Re: ListView BackColor: msg#00036windows.ce.devel
Dennis, What great and specific information. Thanks immensely for the 'leg up'! Steve --- In windowsce-dev@xxxxxxxxxxxxxxx, "dthomsen73" <dennis@...> wrote: > > Steve, > > Your lparam is cast to a NMLVCUSTOMDRAW pointer. > > NMLVCUSTOMDRAW *pcdi = (NMLVCUSTOMDRAW *)lParam; > > pcdi->nmcd.dwItemSpec is your row > pcdi->iSubItem is your column > > Keep in mind that you need to response to the various draw stages > before you will get this message for each cell. > > When dwDrawStage is CDDS_PREPAINT, you have to return CDRF_NOTIFYITEMDRAW. > > When dwDrawState is CDDS_ITEMPREPAINT you have to return > CDRF_NOTIFYPOSTPAINT|CDRF_NOTIFYSUBITEMDRAW. > > When dwDrawState is CDDS_SUBITEM|CDDS_ITEMPREPAINT, then you can paint > your cell. Your return here is also important, or the listview may > paint over what you have done. You can return CDRF_SKIPDEFAULT if you > painted it or CDRF_DODEFAULT if you still want the listview to paint it. > > There are also post paint notifications that you can use to add > something to how the listview paints by default. > > I vaguely remember having trouble with this when the listview was the > child of a dialog, but I'm not really sure. For listviews that are > children of windows I've created with CreateWindow, it has always > worked well. I've used this method in ce.net 4.0, 4.1, 4.2 and I > believe also in earlier revs of the pocket pc (ie 2002). > > Dennis > > --- In windowsce-dev@xxxxxxxxxxxxxxx, "sjspain" <sjspain@> wrote: > > > > Ok, I have looked at the documentation. Without working with it > > just yet, this question seems obvious: when I handle this message, > > how do I know what is sending it? I can get the handle of the > > entire ListView control, but how do I ID the individual elements of > > the control, ie each cell? > > > > In other words, if I want the backcolor of a line to be red if the > > DOB value is <1955 and green if >1955, how do I know which cell or > > item I am handling the message for? > > > > Thanks, > > > > Steve > > > > --- In windowsce-dev@xxxxxxxxxxxxxxx, "dthomsen73" <dennis@> > > wrote: > > > > > > Steve, > > > > > > Take a look at the NM_CUSTOMDRAW message for the listview. By > > > responding properly to these messages, you can custom paint any way > > > you like. You can even custom paint each individual cell. > > > > > > Dennis > > > > > > --- In windowsce-dev@xxxxxxxxxxxxxxx, "sjspain" <sjspain@> wrote: > > > > > > > > Hi, group, > > > > > > > > I am converting a desktop app to the ppc (VS2003.Net). In the > > > > desktop, we use a Listview to keep track of the status of list > > items > > > > by changing each line's back color as that item's status > > changes. > > > > However, we are having trouble implementing the same schema in > > the > > > > windows mobile app. > > > > > > > > It seems the ListView backcolor property is for the whole > > control and > > > > not for each individual line. Is this correct or am I missing > > > > something? Is there a workaround or available opencode > > inherited > > > > control that I can use that will give me the flexibility I need? > > > > > > > > Thanks, > > > > > > > > Steve > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Protect your PC from spy ware with award winning anti spy technology. It's free. http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> Mailing list addresses: Post message: windowsce-dev@xxxxxxxxxxxxxxx Unsubscribe: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx List owner: windowsce-dev-owner@xxxxxxxxxxxxxxx Website: http://groups.yahoo.com/group/windowsce-dev Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/windowsce-dev/ <*> To unsubscribe from this group, send an email to: windowsce-dev-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Popular certification exam training from top vendors: 00036, Sub13 |
|---|---|
| Next by Date: | Online MCSD Tutorial: 00036, microsofttutorial |
| Previous by Thread: | Re: ListView BackColori: 00036, dthomsen73 |
| Next by Thread: | Re: ListView BackColor: 00036, Rick Kozak |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |