wxDirDialog doesnt show window instead pauses the program
Re: wxDirDialog doesnt show window instead pauses the program
Hi,
Can you show the full event handler code and how do you catch it?
Thank you.
Can you show the full event handler code and how do you catch it?
Thank you.
Re: wxDirDialog doesnt show window instead pauses the program
I followed the official instructions and it still didnt work
Re: wxDirDialog doesnt show window instead pauses the program
Sorry, but this is useless. You were asked to provide full minimal reproducible code example, to make sure the whole code is correct, something simple like this:
Code: Select all
#include <wx/wx.h>
#include <wx/dirdlg.h>
class MyDialog : public wxDialog
{
public:
MyDialog() : wxDialog(nullptr, wxID_ANY, "Test")
{
new wxButton(this, wxID_ANY, "Click me to show wxDirDialog...");
Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { wxDirDialog(this).ShowModal(); });
}
};
class MyApp : public wxApp
{
public:
bool OnInit() override
{
MyDialog().ShowModal();
return false;
}
}; wxIMPLEMENT_APP(MyApp);
You did not provide any information about the vcpkg install procedure, i.e., vcpkg and wxWidgets versions including port, the triplet, the compiler, whether you integrated the vcpgk install nor whether you had any previous wxWidgets installation. You even did not tell if you were running the Debug (can provide useful information in case of an issue) or Release configuration.
Moreover, you were also told that if there is an issue, i.e., you actually had a reproducible case, it must be reported to the vcpkg team as the vcpkg package is not maintained by the wxWidgets team.
With no information provided, except a suspect (modal dialog created on heap instead on stack) code fragment, you cannot realistically expect to be helped even if people tried their hardest.
Re: wxDirDialog doesnt show window instead pauses the program
@PB @ONEEYEMAN
Okay , I am back and this time I have a reproducable example :
Compile this with /clr (Common Lanaguage Runtime) or else is won't be reproduced ( I think I should've mentioned I was programming with C++ /CLI )
The reason why the error wasn't showing up for you was because you didn't compile the program with /clr (Nodoby even knows C++ CLI with wxWidgets exists)
This was coded with wxWidgets 3.1.5 using Visual Studio 2022 on Windows 11.
For Those Of You who don't know what C++ /CLI is :
https://docs.microsoft.com/en-us/cpp/do ... w=msvc-170
Okay , I am back and this time I have a reproducable example :
Compile this with /clr (Common Lanaguage Runtime) or else is won't be reproduced ( I think I should've mentioned I was programming with C++ /CLI )
The reason why the error wasn't showing up for you was because you didn't compile the program with /clr (Nodoby even knows C++ CLI with wxWidgets exists)
This was coded with wxWidgets 3.1.5 using Visual Studio 2022 on Windows 11.
For Those Of You who don't know what C++ /CLI is :
https://docs.microsoft.com/en-us/cpp/do ... w=msvc-170
Re: wxDirDialog doesnt show window instead pauses the program
Although i have no experience with this, i would guess that you also need to rebuild the wx libraries with that setting.
Use the source, Luke!
Re: wxDirDialog doesnt show window instead pauses the program
I guess I can't use vcpkg's pre-built libraries then.
For A second I thought you were gonna say "wxWidgets doesnt support C++ CLI"
For A second I thought you were gonna say "wxWidgets doesnt support C++ CLI"
Re: wxDirDialog doesnt show window instead pauses the program
Like i said, i know absolutely nothing about it. And what i suggested was only a guess. But worth trying.
Use the source, Luke!
Re: wxDirDialog doesnt show window instead pauses the program
Okay
I have already installed the pre-built libraries with vcpkg.
How Do I Install the source code as well as the pre-built libraries. Isn't the "wx/" include header gonna have a duplicate??
Last edited by ibrahim on Wed May 18, 2022 4:29 pm, edited 1 time in total.
Re: wxDirDialog doesnt show window instead pauses the program
The source doesn't get "installed". Just extract the archive somewhere, build it and use the included "minimal" sample for a test. That won't change anything anywhere else.
Build without changing the clr setting first. Just so that you know everything works fine.
Use the source, Luke!
Re: wxDirDialog doesnt show window instead pauses the program
I've got the source and ran the "dialogs" sample , the dialogs is made natively ?? They don't look blurry like they do in my application
Re: wxDirDialog doesnt show window instead pauses the program
Hi,
Yes, the dialog is native and it uses Manifest in order to support HighDPI.
Guess you program does not include the Manifest...
I also presume you tried 3.1.6 unmodified source, correct?
Thank you.
Yes, the dialog is native and it uses Manifest in order to support HighDPI.
Guess you program does not include the Manifest...
I also presume you tried 3.1.6 unmodified source, correct?
Thank you.
Re: wxDirDialog doesnt show window instead pauses the program
Yes , how do I use manifest too.
Re: wxDirDialog doesnt show window instead pauses the program
Either add <wxdir>/include/wx/msw/wx.rc to your project, or in VS, under Solution properties -> Manifest Tool -> Input and Output -> DPI Awareness
Use the source, Luke!
Re: wxDirDialog doesnt show window instead pauses the program
I have upgraded to 3.1.6 from vcpkg so I can try out the DPI stuff and it works with the samples !!
Last edited by ibrahim on Thu May 19, 2022 11:26 am, edited 2 times in total.