I like the look of eg Outlook Express News Reader more.
When an item is marked and a new item has been downloaded the item is red
and bold. When I've read it it becomes only bold.
Has anyone a piece of code that does the coloring and the bold typeface ?
John Martens
"John Martens" <jco.m...@tref.nl> wrote in message
news:9akfop$4kem1$2...@reader02.wxs.nl...
Try the code below. In it SELF:hBoldFont is the handle to a bold font
created earlier, oDCList is the listview, WinSTLV is the window.
--
Paul
----
Paul Piko
Piko Computing Consultants
Phone: +61 3 9432 1222 Fax: +61 3 9432 1255
Email: pa...@piko.com.au Web: http://www.piko.com.au
METHOD ControlNotify( oEvent ) CLASS WinSTLV
LOCAL pNMCustomDraw AS _WINNMLVCUSTOMDRAW
LOCAL dwDrawStage AS DWORD
LOCAL oLVI AS listviewitem
DO CASE
CASE oEvent:NotifyCode = NM_CUSTOMDRAW
pNMCustomDraw := PTR( _CAST , oEvent:lParam )
dwDrawStage := pNMCustomDraw.nmcd.dwDrawStage
DO CASE
CASE dwDrawStage = CDDS_PREPAINT
SELF:EventReturnValue := CDRF_NOTIFYSUBITEMDRAW
CASE dwDrawStage = CDDS_ITEMPREPAINT
IF pNMCustomDraw.nmcd.hdr.hwndFrom == SELF:oDCList:handle()
oLVI :=
SELF:oDClist:getitemattributes(pNMCustomDraw.nmcd.dwItemSpec+1)
// Put your own test here...
IF oLVI:GetText(#subType) == "Class"
SelectObject(pNMCustomDraw.nmcd.hdc,SELF:hBoldFont)
// Background grey
pNMCustomDraw.clrTextBk := RGB( 192 , 192 , 192 )
// Red text
pNMCustomDraw.clrText := RGB( 255 , 0 , 0 )
ENDIF
SELF:EventReturnValue := CDRF_NEWFONT
ELSE
SELF:EventReturnValue := CDRF_DODEFAULT
ENDIF
OTHERWISE
SELF:EventReturnValue := CDRF_DODEFAULT
ENDCASE
SetWindowLong( SELF:Handle() , DWL_MSGRESULT , SELF:EventReturnValue )
RETURN SELF:EventReturnValue
ENDCASE
RETURN SUPER:ControlNotify(oEvent)
John
Paul Piko <pa...@piko.com.au> schreef in berichtnieuws
DFjz6.7786$Xi1....@news-server.bigpond.net.au...