The MASM Forum Archive 2004 to 2012

Project Support Forums => IDE Development and Support => Easy Code => Topic started by: BPak on March 23, 2008, 12:24:42 AM

Title: Gridlines display through Text in List View
Post by: BPak on March 23, 2008, 12:24:42 AM
Hi
I have made this small test application in Easy Code using GO.

When clicking on Stock Menu and then Clicking the bottom ListView Scroll Button the List View Scrolls but has the Gridlines going through the Text.

I have a Mainfest File in the folder.  If I remove the Manifest File then the Gridlines display correctly.

Project Code and Image of ListView showing Gridlines attached!

Any idea on what I may need to do to correct this, please?

BPak

[attachment deleted by admin]
Title: Re: Gridlines display through Text in List View
Post by: Ramon Sala on March 23, 2008, 07:25:47 AM
Hi BPak,

Yes, you're right. As the Manifest file just enables the Windows Common controls 6.0,  it seems to be a refresh problem of the new Common controls, so I'm afraid I can do nothing about that. Anyway, I have processed the WM_PAINT of the ListView object (in the ListView procedure) like this:

dlgStocklvStock Frame hWnd, uMsg, wParam, lParam
   Cmp D[uMsg], WM_PAINT
   Jne >
   Invoke InvalidateRect, [hWnd], NULL, FALSE
:  Return (FALSE)
EndF


It is not the best solution as it causes some flickering, but it solves the problem. You can play with updating just the bottom part of the ListView client area.

Ramon

Title: Re: Gridlines display through Text in List View
Post by: BPak on March 23, 2008, 08:15:02 AM
Thanks Ramon.

It works fine. Would need to invalide the whole ListView as the top Button also interferes with the Gridlines display.

Might try some other idea like alternate rows in tinted back color.
Title: Re: Gridlines display through Text in List View
Post by: Ramon Sala on March 24, 2008, 11:01:13 AM
Hi BPak,

I have found the way to avoid flickering in the ListView object when Common controls 6.0 are enabled. Delete all code in the ListView procedure and just write this:

dlgStocklvStock Frame hWnd, uMsg, wParam, lParam
   Cmp D[uMsg], WM_VSCROLL
   Jne >
   LoWord ([wParam])
   Cmp Ax, SB_THUMBPOSITION
   Jge >
   Invoke GetParent, [hWnd]
   Push Eax
   Invoke SendMessage, Eax, WM_SETREDRAW, FALSE, 0
   Invoke CallDefaultProc, [hWnd], [uMsg], [wParam], [lParam]
   Pop Eax
   Invoke SendMessage, Eax, WM_SETREDRAW, TRUE, 0
   Invoke InvalidateRect, [hWnd], NULL, FALSE
   Invoke SendMessage, [hWnd], WM_PAINT, 0, 0
   Return (TRUE)
:  Return (FALSE)
EndF



No flicker at all!

Ramon
Title: Re: Gridlines display through Text in List View
Post by: BPak on March 25, 2008, 12:51:11 AM
Hi Ramon,

Works like a dream  :clap:

Thanks for the time you spent helping me with this solution.

BTW Great Code Editor !!

BPak