Problem with wxListView on Windows

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Nick_Hofstetter
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Sep 21, 2017 9:36 am

Problem with wxListView on Windows

Post by Nick_Hofstetter »

I have two applications that both use wxListView's in wxLC_REPORT mode using headers. One works fine on Linux Mint and Windows 7. The second one works fine on Mint but not on Windows 7. The failing application is our main product and has far more panels and layers than the simpler one that works. I have tracked the problem down to the header on the ListView. If I add the wxLC_NO_HEADER style to the wxListView the application works correctly.

I have checked the application using Visual Studio Spy++ and the parent windows are all correct. When monitoring the Messages that are being sent to the ListView, it is in a hard loop sending WM_PAINT, WM_NOTIFY, LVM_GETHEADER, LVM_GETHEADER, WM_NOTIFY, LVM_GETHEADER, LVM_GETHEADER in that order and then sequence repeats so the application does not paint correctly as the ListView is using 100% of the CPU.

The parent windows of the ListView are wxPanel, wxSplitter, wxPanel, wxPanel, wxNotebook, wxPanel, wxPanel, wxListCtrl. I have checked the event processing of the parent windows and cannot see any errors. Any help or pointers where to look would be appreciated.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem with wxListView on Windows

Post by doublemax »

I have a faint memory that there is a depth limit to the window hierarchy in Windows (not wxWidgets) that's pretty low, around 7 or 8. Unfortunately i couldn't find a source to back that up.

But i would still try to redesign the layout so that you get a smaller hierarchy depth.
Use the source, Luke!
Post Reply