[wxMSW][v3.1.1] - wxListCtrl background is not redrawn after erased Topic is solved

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
tomay3000
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Mon Apr 24, 2017 4:23 am

[wxMSW][v3.1.1] - wxListCtrl background is not redrawn after erased

Post by tomay3000 »

Hello,
Under windows, using wxWidgets v3.1.1, the wxListCtrl background is not being redrawn after erased. As you see in the attached screenshot:
Untitled.png
Untitled.png (11.38 KiB) Viewed 2878 times
What could be the issue?


Thank you for your understanding.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: [wxMSW][v3.1.1] - wxListCtrl background is not redrawn after erased

Post by ONEEYEMAN »

Hi,
Can you show some code of what you are doing?
Can you reproduce the issue with the sample?

Thank you.
tomay3000
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Mon Apr 24, 2017 4:23 am

Re: [wxMSW][v3.1.1] - wxListCtrl background is not redrawn after erased

Post by tomay3000 »

ONEEYEMAN wrote:Hi,
Can you show some code of what you are doing?
Can you reproduce the issue with the sample?

Thank you.
I have used wxFormBuilder v3.6.2 to design the application.

Code: Select all

wxListCtrl* m_listCtrl1;
m_listCtrl1 = new wxListCtrl( m_panel1, wxID_LISTCTRL, wxDefaultPosition, wxDefaultSize, wxLC_REPORT );
The sample one works correctly.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: [wxMSW][v3.1.1] - wxListCtrl background is not redrawn after erased

Post by ONEEYEMAN »

Hi,
You obviously doing something after creating the control.
What is it.
Are you creating inside the aui pane.

Can you try to do exactly what you do in a sample.
Also since you said that the sample works correctly - what do you do differently.

Thank you.
tomay3000
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Mon Apr 24, 2017 4:23 am

Re: [wxMSW][v3.1.1] - wxListCtrl background is not redrawn after erased

Post by tomay3000 »

ONEEYEMAN wrote:Hi,
You obviously doing something after creating the control.
What is it.
Are you creating inside the aui pane.

Can you try to do exactly what you do in a sample.
Also since you said that the sample works correctly - what do you do differently.

Thank you.
I found the origin of the problem, and I think it is a bug.
if you don't include the wxWidgets default resource file:

Code: Select all

#include "wx/msw/wx.rc"
, which in turns includes the .manifest file for the Windows XP Style, then you will get this behavior.
Adding .manifest file with the same name as the executable in the same directory as the executable will also solve the problem.

Is it a bug !
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: [wxMSW][v3.1.1] - wxListCtrl background is not redrawn after erased

Post by ONEEYEMAN »

Hi,
No it is not a bug.
Manifest file contains some very important information.
It is also recommended to start developing with wxWidgets by using one of the samples (possibly minimal) as the template for your own project. The samples do contain the manifest generation and then everything will be in order.

Thank you.
Post Reply