Search found 14078 matches

by doublemax
Tue Oct 22, 2019 4:59 pm
Forum: C++ Development
Topic: wxwidget structure understanding
Replies: 2
Views: 29

Re: wxwidget structure understanding

You can't transfer a console application to a GUI application 1:1. A GUI app is not purely sequential as a console app. You do your initialization in wxApp::OnInit or the constructor of any Window and then wait for a user event, e.g. a button click. Then you do some work in the event handler. There ...
by doublemax
Tue Oct 22, 2019 4:46 pm
Forum: C++ Development
Topic: Focus problem
Replies: 15
Views: 109

Re: Focus problem

Thanks, that looks fine. How does the MyFramebearb::Onsetf method look like?
by doublemax
Tue Oct 22, 2019 2:57 pm
Forum: C++ Development
Topic: Focus problem
Replies: 15
Views: 109

Re: Focus problem

These single line code snippets don't help much. I still can't see in which context the wxTextCtrl construction is executed.
by doublemax
Tue Oct 22, 2019 12:14 pm
Forum: C++ Development
Topic: Focus problem
Replies: 15
Views: 109

Re: Focus problem

What's the context of the code? It only works if "this" points to an instance of MyFramebearb
This code assumes that it runs in the MyFramebearb constructor
by doublemax
Tue Oct 22, 2019 12:11 pm
Forum: Compiler / Linking / IDE Related
Topic: problem with wxGLCanvas
Replies: 3
Views: 66

Re: problem with wxGLCanvas

These are inside the native Windows OpenGL library. Add Opengl32.lib to the input libraries. (The name is probably libopengl32.a for you).
by doublemax
Mon Oct 21, 2019 6:54 pm
Forum: C++ Development
Topic: Focus problem
Replies: 15
Views: 109

Re: Focus problem

wxFocusEvent does not derive from wxCommandEvent. This means that it doesn't propagate upwards in the window hierarchy. You need to catch the event at the control that generates the event. In the loop where you create the wxTextCtrls: wxTextCtrl *tc = new wxTextCtrl(...); tc->Bind( wxEVT_SET_FOCUS, ...
by doublemax
Mon Oct 21, 2019 3:45 pm
Forum: C++ Development
Topic: wxClientDc of a wxPanel in a frame constructor doesn't draw
Replies: 1
Views: 38

Re: wxClientDc of a wxPanel in a frame constructor doesn't draw

Everything you draw onto a wxClientDC will be overwritten by the next "normal" paint event. In general, never use wxClientDC except for very special cases where performance is important. Do all your custom drawing in a paint event handler.
https://wiki.wxwidgets.org/Drawing_on_a_panel_with_a_DC
by doublemax
Mon Oct 21, 2019 1:51 pm
Forum: General Development
Topic: Is there any chance that wxWidgets will use its own renderer to draw its own controls like Qt in the future!?
Replies: 1
Views: 71

Re: Is there any chance that wxWidgets will use its own renderer to draw its own controls like Qt in the future!?

The "Universal" port does exactly that, but it's not well maintained and only very simple themes exist for it. But if someone was willing to put some effort into this, it would be possible. But it's unlikely that any of the current core developers will do it.
by doublemax
Mon Oct 21, 2019 1:49 pm
Forum: Compiler / Linking / IDE Related
Topic: problem with wxGLCanvas
Replies: 3
Views: 66

Re: problem with wxGLCanvas

I cheked the wxwidgets folder and _gl.a file is there, but posibly some other .a file is necesary?
The file being there is not enough. Do you also link it to your application?
by doublemax
Sun Oct 20, 2019 7:48 pm
Forum: C++ Development
Topic: Child frame sends parent main frame back after Hide() if a wcColourPickerCtrl has been opened
Replies: 2
Views: 33

Re: Child frame sends parent main frame back after Hide() if a wcColourPickerCtrl has been opened

I don't think you did anything wrong. I noticed that the issue goes away if you remove the wxFRAME_FLOAT_ON_PARENT. So it might be a bug in wxWidgets.

Try opening a bug report at http://trac.wxwidgets.org
by doublemax
Sun Oct 20, 2019 5:05 pm
Forum: C++ Development
Topic: Application randomly reset and loads new windows
Replies: 23
Views: 239

Re: Application randomly reset and loads new windows

Code: Select all

int MyApp::FilterEvent(wxEvent &event)
{
  if(event.GetEventType()==wxEVT_CHAR || event.GetEventType()==wxEVT_LEFT_DOWN ) {
    m_timer.Start(5*60*60);
    wxLogMessage("hey");
  }
  return -1;
}
You must overwrite that method in the wxApp class, it doesn't work in a frame.
by doublemax
Sun Oct 20, 2019 4:48 pm
Forum: C++ Development
Topic: Application randomly reset and loads new windows
Replies: 23
Views: 239

Re: Application randomly reset and loads new windows

Is it OK to make ShowPage() public and not private in the Isola02Frame class?
Yes, the method must be public.

But

Code: Select all

wxSimplebook* notebook;
(and all other variables) should be protected.