The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ragdog on February 07, 2012, 08:30:09 AM

Title: Listview MouseOver cursel
Post by: ragdog on February 07, 2012, 08:30:09 AM
Hi

I color my listview by selected item with  WM_DRAWITEM

    .if ( dis.itemState & ODS_SELECTED )    ; If Selected                                           
        invoke SetTextColor, dis.hdc, [Edi].OLB_ITEM.crTextSel
        FillSolidRect dis.hdc, ADDR rTextRect, [Edi].OLB_ITEM.crBackGrndSel ; Erase Item   
        FillSolidRect dis.hdc, ADDR rNrRect, 00FFFFFFh ; Erase Item   

    .else
        invoke SetTextColor, dis.hdc, [Edi].OLB_ITEM.crText
        FillSolidRect dis.hdc, ADDR rTextRect, [Edi].OLB_ITEM.crBackGrnd
        FillSolidRect dis.hdc, ADDR rNrRect, 00FFFFFFh ; Erase Item   

    .endif


Is this posible to draw the mouse over cursel to a other color?
I have try ODS_FOCUS  without results.


Greets,
Title: Re: Listview MouseOver cursel
Post by: dedndave on February 07, 2012, 03:04:35 PM
cursors are very similar to icons
what you might do is grab the system cursor and alter the bitmap, making your own cursor
Title: Re: Listview MouseOver cursel
Post by: ragdog on February 09, 2012, 10:53:28 PM
No i mean not the courser sorry
I have it solved

Now have i this idea to owner draw the listview columnheader
is this possible ?

My idea is  LoadBitmap and get the Header with LVM_GETHEADER what is the next steps for it
or give for it an example?


Greets,

Title: Re: Listview MouseOver cursel
Post by: ragdog on February 14, 2012, 05:48:32 PM
Hello

I try to draw a Bitmap on the listview header

What is the best way on WM_PAINT or NM_CUSTOMDRAW or WM_DRAWITEM?
and what is the steps about this?


Greets,