I created a wxPerl application, which is a simple frame that contains only wxMenuBar, wxPanel, wxTextCtrl and wxStaticBitmap. Development and Deployment Platform - Windows XP and later.
The image is added to the form as follows:
my $logoData = Wx::Bitmap->new(App::Resource::Images::getLogoPath(), wxBITMAP_TYPE_BMP);
my $logo = Wx::StaticBitmap->new($self, -1, $logoData);
I had no problems displaying the image. I made an installer with Inno Setup, which adds an icon to the user's desktop. If the application starts using this shortcut, the window does not draw my wxStaticBitmap. Only when the application loses focus and some other window moves on it, only then will my wxStaticBitmap be drawn.
When I start the application from the Start menu, quickly launch either directly after compilation using wxpar or just using the Perl interpreter, my wxStaticBitmap is displayed.
The only thing that I found is to call Refresh()and Update()my wxFrame. After creating this wxFrame, I call Show(1)and right after that Refresh()and Update(). But still they are out of luck.
Htbaa source
share