Which dialog classes can function without a top-level frame?

Sean Tolstoyevski <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CAJkz5poqq4On93V8_=JTHRZiHMKudXr0ihcxvZ3Pq+T2EFJwWg@mail.gmail.com>
Hi wxwidgets community.

I am writing to seek clarification on using dialog classes within a library
I am developing. My goal is to create helper functions that utilize various
dialog types, but I've encountered some confusion regarding their proper
usage.
Specifically, I have the following questions:

1. Which dialog classes can operate without a top-level frame (i.e.,
without a parent panel)? I understand that wxMessageBox falls into this
category. However, in my experiments, wxAboutDialogInfo doesn't seem to
behave as expected. The dialog appears briefly (for about 10-20
milliseconds) and then immediately closes. I am using MinGW, and it appears
that certain wxWidgets classes are causing segmentation faults in this
context.

2. Is there a reliable way to determine whether a specific dialog class
requires a parent window? I have been unable to find clear guidance on this
matter in the documentation.

For reference, here is a snippet of the code I am using:

```c++
#define BIGA_EXPORTS

#include "biga/ui/native/message_box.hpp"

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

#include "wx/aboutdlg.h"
#include "wx/app.h"

#include "biga/internal/log.hpp"
#include "wx/button.h"
#include "wx/msgdlg.h"

namespace biga::ui::native
{

BIGA_EXPORT
void NativeAboutBox(const std::string programName,
          const std::string &proVversion,
          const std::string &progDescription,
          const std::string &copyright,
          const std::string &licence, const std::string &webSite)
{
 SPDLOG_DEBUG("called");
 wxAboutDialogInfo info;
 info.SetName(programName);
 info.SetVersion(proVversion);
 info.SetDescription(progDescription);
 info.SetCopyright(copyright);
 info.SetWebSite(webSite);
 info.SetLicence(licence);

 wxAboutBox(info, nullptr);
 SPDLOG_DEBUG("end");
}
}  // namespace biga::ui::native
```

usage code *(main.cpp):
```c++
#include <iostream>

#include "biga/ui/native/about_box.hpp"

int main()
{
 biga::ui::native::NativeAboutBox(
  "Biga", "v b1.4", "this is a description",
  "copyright seantolstoyevski and all contrubitors.", "",
  "https://github.com/seantolstoyevski");
 return 0;
}
```

Thank you for your time and assistance in resolving this issue.
Sincerely,

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CAJkz5poqq4On93V8_%3DJTHRZiHMKudXr0ihcxvZ3Pq%2BT2EFJwWg%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.