My previous posts was mainly consirned with creating an XP styled listview, and i would like to thank any1 who had help me. I would like to ask a question though. I want to know how possible is it to create a button similar to the "Welcome to Windows XP" screen. I thought that a ListView is part of it and the other is the drawing functions and hottracking of the toolbar.

The Listview is done, but the toolbar actions aren't. I have been trying to play with GDI and GDI+ with little to no success. To make it very simple is all i wish to have is this (image) without the item selected whenthe mouse is over it (setting LVN_HOTTRACK to 1 doesn't work).

I know this is a lot to ask and all i can ask really is for some guidence and advice.

Thank you.
Black iCE
Posted on 2004-07-12 18:14:31 by Black iCE
LVN_HOTTRACK is a notification message. You have to set the extended style using LVS_EX_TRACKSELECT then process the LVN_HOTTRACK message which comes in the form of a WM_NOTIFY notification:



cmp [uMsg], WM_NOTIFY

jne >.NXTMSG
mov edi,[lParam]
cmp D[edi+NMHDR.code], LVN_HOTTRACK
; process your hottracking here

Posted on 2004-07-12 21:10:47 by donkey
Thank you donkey, but i have already coded that. I was just a bit consirned about the hover select function,


Return Value

Return zero to allow the list view to perform its normal track select processing. If the application returns nonzero, the item will not be selected.

Now all i am trying to do is to draw a rect and make it opiac or alpha blended but so far no success.:(

Black iCE
Posted on 2004-07-12 21:15:26 by Black iCE
Hi Black iCE,

mostly it depends on whether it is a dialog or a window that the listview is on. You would normally draw the stuff you want then return non-zero. However if it is a dialog, even returning non-zero will still return 0 to the listview, you must use Set WindowLong to specify a non-zero return:

invoke SetWindowLong, [hDlg], DWL_MSGRESULT, 1

mov eax,TRUE
Posted on 2004-07-12 22:01:43 by donkey
Thank you Donkey! i'll give it a try... i am using a window.

On another note... i am trying very hard to draw a rect with FrameRect but as i am going about it, it keeps on drawing the default colour which is white!

DrawLVMenuHiLight proc iIndex:DWORD


invoke RtlZeroMemory,ADDR rc,sizeof RECT
mov eax,100
mov rc.bottom,eax
mov rc.right,eax

mov hBrush,eax
invoke GetDC,g_hWndLVMenu
mov hDC,eax
invoke FrameRect,hDC,ADDR rc,hDC

invoke ReleaseDC,g_hWndLVMenu,hDC
;Look at frameRect & FillRect & InvertRect & GetSysColorBrush
DrawLVMenuHiLight endp

This is primarilay a test routine so that i can place the rect @ the right location and have it interact with the mouse....
Posted on 2004-07-12 22:06:33 by Black iCE