May 11, 2024, 08:13:20 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Listview Line Problem

Started by LarryMc, August 22, 2009, 11:08:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

The attached image shows a problem with lines in a listview.

In the top portion of the LV the lines are missing. 
In the bottom portion the lines are mis-aligned.

The problem is caused by the application that contains the listview having a manifest file.

Deleting the manifest files results in the LV lines displaying correctly.
Adding the manifest file back causes the line problems to reappear.

Does anyone know of a fix for the problem other than not using a manifest file?

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ficko

Hi Larry! :)

I don't want to disappoint you but the manifest file forces windows to use "ComCtl32.dll version 6".
If you take it out it uses "ComCtl32.dll version 5"

Therefore to go around any kind of problem, which lead back to the different type of dlls requires that you programatically select between the two different versions.

Like you wanna use the "anim control" in a dialoge with the "new" look simultaneous is extramelly difficult.

Ficko

LarryMc

Ficko

Thanks for the info.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ZeroDog

cant you just modify the manifest file to use version 5 instead of 6?  isnt that what the manifest file is for? so you can specify what version of the common controls you wish to use?

Ficko

Quote
cant you just modify the manifest file to use version 5 instead of 6?  isnt that what the manifest file is for?

Even if that would work he propably not want it because he would have the "old look" before XP.

So you have to call routines in the same program from 2 different versions of dlls to fix such type of problems. :(

Allan

Larry,

I had this problem when working with GoAsm and Ramon Sala gave me a solution to use with his brilliant Editor.

I changed it to EBasic code and it works fine for me.

Subclass the ListView. Message handler below...

' Message handler for the subclassed listview control
' NOTE: This sub class is to fix Windows redraw problem with
' Manifest version 6 for controls where it redraws lines
' through the text.
SUB myLVHandler(hwnd:int,uMsg:int,wParam:int,lParam:pointer),int
UINT x, n
n=0
SELECT uMsg
Case WM_VSCROLL
x = GetParent(hwnd)
SendMessage x, WM_SETREDRAW, 0, 0
CallWindowProcA(origfp,hwnd,uMsg,wParam,lParam)
SendMessage x, WM_SETREDRAW, 1, 0
_InvalidateRect(hwnd, *<WINRECT>n, FALSE)
SendMessage x, WM_PAINT, 0, 0
return 1
ENDSELECT
RETURN CallWindowProcA(origfp,hwnd,uMsg,wParam,lParam)
ENDSUB


Allan