Search found 10 matches

by netrick
Sun Feb 24, 2013 6:47 pm
Forum: Compiler / Linking / IDE Related
Topic: Form builder for wx 2.9
Replies: 2
Views: 1561

Form builder for wx 2.9

There are some drag and drop gui builders for wx, which generate C++ code. However, all that I know generate 2.8 code and don't have support for new 2.9 features. Is there any form builder which supports wx 2.9?

Thanks
by netrick
Sat Feb 09, 2013 12:37 pm
Forum: C++ Development
Topic: How to get window handle for both linux and windows in wx2.9
Replies: 3
Views: 4238

Re: How to get window handle for both linux and windows in w

Thank you. However, I have a problem with this function. On windows it indeed returns HWND, but on linux instead of x11 window handle (which is actually unsigned integer), it returns some kind of gtk widget. How can I get a X11 window handle from that widget?

Thanks in advance
by netrick
Sat Feb 09, 2013 12:02 pm
Forum: C++ Development
Topic: How to get window handle for both linux and windows in wx2.9
Replies: 3
Views: 4238

How to get window handle for both linux and windows in wx2.9

I know there were some ways for it in 2.8, but in 2.9 something with handles have changed and old code doesn't work. What I need to do is to get windows (winapi) and linux (x11) window handle. If there isn't single function for it, I can use #IFDEFs. Remember, I need it for wx 2.9. Hope you can help...
by netrick
Sat Dec 22, 2012 10:43 pm
Forum: Platform Related Issues
Topic: wxFileDialog does leak memory on linux
Replies: 0
Views: 947

wxFileDialog does leak memory on linux

Well, I know that there is problem with false positives from valgrind, but I checked it myself in taskmanager and it leaks. The code: #include <wx/wx.h> class MyApp: public wxApp { public: virtual bool OnInit(); }; bool MyApp::OnInit() { wxFileDialog * dialog = new wxFileDialog(NULL, _("Title"), wxE...
by netrick
Sat Dec 22, 2012 3:19 pm
Forum: C++ Development
Topic: Calling wxApp's OnInit when using wxIMPLEMENT_APP_NO_MAIN
Replies: 8
Views: 3062

Re: Calling wxApp's OnInit when using wxIMPLEMENT_APP_NO_MAI

I will answer my own question. The solution is very simple, instead of messing with macro just do it like that: void threadWithWxDialog(int argc, char **argv) { wxApp* app = new MyApp(); wxApp::SetInstance(app); wxEntry(argc, argv); } And inside your int main(int argc, char **argv) function, bind it...
by netrick
Sat Dec 22, 2012 2:34 pm
Forum: C++ Development
Topic: Calling wxApp's OnInit when using wxIMPLEMENT_APP_NO_MAIN
Replies: 8
Views: 3062

Calling wxApp's OnInit when using wxIMPLEMENT_APP_NO_MAIN

So, the simple wx code that opens a file open dialog and closes when the user closes it/selects a file is: http://pastebin.com/xu8Zinn3 It works great, but I need to call the dialog from non-wx managed window. Here is the code that compiles and runs, but the OnInit function isn't called. The questio...
by netrick
Sat Dec 22, 2012 1:12 pm
Forum: C++ Development
Topic: wxDialog as top-level object doesn't closes process
Replies: 2
Views: 928

wxDialog as top-level object doesn't closes process

Hey, I use wx 2.9. Docs claims that I can use wxDialog as top level object, however when I close the dialog the process is still running.... The code: #include <wx/wx.h> class MyApp: public wxApp { public: virtual bool OnInit(); }; class MyDialog: public wxFileDialog { public: MyDialog(); }; wxIMPLE...
by netrick
Sat Dec 22, 2012 1:09 pm
Forum: C++ Development
Topic: wxFileDialog doesn't appear
Replies: 3
Views: 1063

Re: wxFileDialog doesn't appear

Thanks, it works now.
by netrick
Sat Dec 22, 2012 11:31 am
Forum: C++ Development
Topic: wxFileDialog doesn't appear
Replies: 3
Views: 1063

wxFileDialog doesn't appear

Hi, I'm using wx 2.9.4 on linux. The "dialog" sample that I compiled works flawlessy, however when I took wxfiledialog code from docs it doesn't appear. It is meant to open file dialog when I press about, but nothing is shown. Code: #include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif...