Search found 1185 matches

by PB
Fri May 26, 2017 7:52 am
Forum: C++ Development
Topic: Using std::thread to create GUI
Replies: 2
Views: 43

Re: Using std::thread to create GUI

But i'm facing a crash at t1.join() itself. Any suggestions to avoid this? My suggestion: Make sure that you do not access any instance of GUI-related classes outside of the primary thread. You could prepare the pure data in the secondary thread and send them to the main thread to be consumed by co...
by PB
Thu May 25, 2017 7:14 pm
Forum: Compiler / Linking / IDE Related
Topic: Error: '_waccess' was not declared in this scope
Replies: 20
Views: 251

Re: Error: '_waccess' was not declared in this scope

PB, I do not know what __GNUWIN32__ does, it was autogenerated by the CodeBlocks project creation wizard. I will try some of the steps you mentioned. Do not try SOME steps, do them all, they are related. In particular, make sure that C++ standard option is the same. You cannot set gnu++11 via C:B c...
by PB
Thu May 25, 2017 5:23 am
Forum: Compiler / Linking / IDE Related
Topic: Error: '_waccess' was not declared in this scope
Replies: 20
Views: 251

Re: Error: '_waccess' was not declared in this scope

Did you try what people told you to, i.e., build the library and application with the same C++ flavour and unless you are building 3.1 GIT head that flavour being "gnu++11"? After compiling again, it still doesn't work. Here's what I ran: mingw32-make -f makefile.gcc UNICODE=1 SHARED=0 BUI...
by PB
Wed May 24, 2017 7:11 pm
Forum: Compiler / Linking / IDE Related
Topic: Error: '_waccess' was not declared in this scope
Replies: 20
Views: 251

Re: Error: '_waccess' was not declared in this scope

So do you want to use c++11 features in your application or not? If you do, you need to compile wxWidgets AND your app the same way. In MinGW, the standard used affects a lot of declarations, see e.g. here. . You can build wxWidgets in c++11 mode with mingw32-make -f makefile.gcc UNICODE=1 SHARED=0 ...
by PB
Mon May 22, 2017 12:32 pm
Forum: C++ Development
Topic: Query on wxShell and wxExecute
Replies: 7
Views: 76

Re: Query on wxShell and wxExecute

I found that declaration in \include\wx\utils.h - am using wxwidgets 3.1.0 version in the above file i can see the following declarations // Execute a command in an interactive shell window (always synchronously) // If no command then just the shell WXDLLIMPEXP_BASE bool wxShell(const wxString&...
by PB
Mon May 22, 2017 9:16 am
Forum: C++ Development
Topic: Query on wxShell and wxExecute
Replies: 7
Views: 76

Re: Query on wxShell and wxExecute

Did you actually read my previous messasge? Do you understand the difference between programs that can be created as processes and wxExecute()d (such as ipconfig.exe) and shell commands (such as dir or cd)? Where did you find declaration of wxShell(const wxString& command, wxArrayString& out...
by PB
Mon May 22, 2017 8:39 am
Forum: C++ Development
Topic: Query on wxShell and wxExecute
Replies: 7
Views: 76

Re: Query on wxShell and wxExecute

can i use wxExecute for system commands like cd, dir, mkdir.. ect?? I don't think so, this is for actual executables that exist as files. The commands you listed are internal shell commands I am not sure what you are trying to achieve. Assuming you cannot use the wxWidgets-provided equivalents of t...
by PB
Sat May 20, 2017 7:23 pm
Forum: Compiler / Linking / IDE Related
Topic: Size of executable (linked to wxwidgets dynamically vs. static)
Replies: 10
Views: 147

Re: Size of executable (linked to wxwidgets dynamically vs. static)

I think it is not important where the "bloat" comes from. If you are really interested in that you can look at size of all those {core|base}_*.obj files (assuming you are using MSVC, they are in WXWIN/build/MSW/vc_lib/mswu folder) that comprise the two basic wxWidgets libraries. There's a ...
by PB
Sat May 20, 2017 3:38 pm
Forum: Platform Related Issues
Topic: Trouble loading multiple size ICO embedded resource [SOLVED]
Replies: 8
Views: 274

Re: Trouble loading multiple size ICO embedded resource [SOLVED]

Support for loading icons from MSW resources has been added to wxIconBundle: https://github.com/wxWidgets/wxWidgets/commit/66865ed7145dbfa9c90fa0b77764cd60605b77f4 Here (and attached) is the updated standalone code that can be used to achieve that with older wxWidgets versions: wxIconBundleResLoader...
by PB
Sat May 20, 2017 3:07 pm
Forum: Compiler / Linking / IDE Related
Topic: Size of executable (linked to wxwidgets dynamically vs. static)
Replies: 10
Views: 147

Re: Size of executable (linked to wxwidgets dynamically vs. static)

Wherever it is good or bad, in 2017 no one sane cares about whether the size a desktop applications is 100 kB or 3 MB. The size of "minimal" executable is not a good metric. You need to know the size of the executable with your features in and the "minimal" executable sizes may n...
by PB
Sat May 20, 2017 2:43 pm
Forum: Platform Related Issues
Topic: Compiling wxWidgets
Replies: 11
Views: 4562

Re: Compiling wxWidgets

To prevent any misinformation: While the procedure described RokitanskyAscoff works, it is not the ideal solution. What you need to do when using parallel builds is to build setup_h target first, see. e.g. the code in my answer here . This solution has been recently finally added to the official doc...
by PB
Fri May 19, 2017 11:33 am
Forum: C++ Development
Topic: How can I get values from a Custom wxDialog? [SOLVED]
Replies: 10
Views: 179

Re: How can I get values from a Custom wxDialog? [SOLVED]

FWIW, here is the modified example using validators, with no need for getter/setter methods. This can often simplify such code with added benefit of possible user input validation. #include <wx/wx.h> #include <wx/valtext.h> class LoginDlg : public wxDialog { public: LoginDlg(wxString& user, wxSt...
by PB
Fri May 19, 2017 8:44 am
Forum: C++ Development
Topic: How can I get values from a Custom wxDialog? [SOLVED]
Replies: 10
Views: 179

Re: How can I get values from a Custom wxDialog? [SOLVED]

Actually, it is not complicated at all. It may just look like that, probably because you have not much experience with portable C++ UI frameworks. #include <wx/wx.h> class LoginDlg : public wxDialog { public: LoginDlg() : wxDialog(NULL, wxID_ANY, _("Login")) { wxFlexGridSizer* loginInfoSiz...
by PB
Thu May 18, 2017 3:14 pm
Forum: C++ Development
Topic: How can I get values from a Custom wxDialog? [SOLVED]
Replies: 10
Views: 179

Re: How can I get values from a Custom wxDialog? [SOLVED]

I am Windows only but what you posted in the OP should work and it should work across all supported OSes. EndModal() does not destroy the dialog. BTW, modal dialogs are usually created on stack and not on the heap. If you create them on heap you need to destroy them manually, e.g. dlg->Destroy(), se...
by PB
Wed May 17, 2017 3:50 pm
Forum: Platform Related Issues
Topic: Trouble loading multiple size ICO embedded resource [SOLVED]
Replies: 8
Views: 274

Re: Trouble loading multiple size ICO embedded resource [SOLVED]

I believe that loading wxIconBundle from an MS Windows resource can be useful. I cleaned the code up and I will try to submit it (modified, as a wxIconBundle method) to wxWidgets.

Edit: Deleted the code from this post, the updated version is here.

Go to advanced search