Search found 165 matches

by gtafan
Thu Oct 24, 2019 10:46 am
Forum: Compiler / Linking / IDE Related
Topic: problem with wxGLCanvas
Replies: 11
Views: 1120

Re: problem with wxGLCanvas

doublemax wrote:
Tue Oct 22, 2019 12:11 pm
These are inside the native Windows OpenGL library. Add Opengl32.lib to the input libraries. (The name is probably libopengl32.a for you).
OK, thanks it works. Do I also need to add some other .a files if using glu or glut?
by gtafan
Tue Oct 22, 2019 10:20 am
Forum: Compiler / Linking / IDE Related
Topic: problem with wxGLCanvas
Replies: 11
Views: 1120

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? OK, you right, it was not linked, but linking it manually doesn´t make it beter, it bekome even worth: C:\wxWidgets-3.0.2\l...
by gtafan
Tue Oct 22, 2019 10:13 am
Forum: C++ Development
Topic: Use OpenGL like wxDC?
Replies: 23
Views: 5190

Re: Use OpenGL like wxDC?

Hi, This thread is 10-years old. Please create a new thread with the specific question. Also, lok at the OpenGL samples and try to follow their code. Thank you. The example here is at least 1000 times beter than OpenGL samples, which in my opinion complete useles for learning something. My question...
by gtafan
Mon Oct 21, 2019 1:50 pm
Forum: C++ Development
Topic: Use OpenGL like wxDC?
Replies: 23
Views: 5190

Re:

You could do that. Rather than derive classes like I indicated in my post, you could do something like: wxGLCanvas* myCanvas = new wxGLCanvas( ... ); wxGLContext* myContext = new wxGLContext( ... ); // then in OnPaint of some dialog/window/whatever myContext->SetCanvas(myCanvas); // do GL drawing s...
by gtafan
Mon Oct 21, 2019 11:22 am
Forum: Compiler / Linking / IDE Related
Topic: problem with wxGLCanvas
Replies: 11
Views: 1120

problem with wxGLCanvas

My code looks like this: GLFrame::GLFrame(wxWindow* parent,wxWindowID id) { Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id")); BoxSizer1 = new wxBoxSizer(wxHORIZONTAL); int GLCanvasAttributes_1[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE,...
by gtafan
Fri Oct 18, 2019 10:32 am
Forum: General Development
Topic: Why there is no compiled WxWidgets version?
Replies: 22
Views: 4098

Re: Why there is no compiled WxWidgets version?

Hi. Very strange the GCC-4.9.2-TDM is not there. https://b.radikal.ru/b30/1910/10/a44656d9eb07.jpg The problem is that all "wx-3.0.4" links are related to the same page witch was updated each time. And the last time it has been updated, I didn't made the Gcc-4.9.2-TDM Version. So the really correct...
by gtafan
Wed Oct 16, 2019 9:17 am
Forum: General Development
Topic: Why there is no compiled WxWidgets version?
Replies: 22
Views: 4098

Re: Why there is no compiled WxWidgets version?

Very strange the GCC-4.9.2-TDM is not there.

Image
by gtafan
Thu Jan 24, 2019 1:27 pm
Forum: C++ Development
Topic: problem geting values from TextCtrl
Replies: 5
Views: 544

Re: problem geting values from TextCtrl

I am using wxSmith for creating my wxWidget projects, as doing it manually is a huge pain in the as. That huge "pain" will teach you how to do things, and so how wxSmith works. Get rid of "automagic" tools unless you understand the underlaying "magic". MyPanel is the control I am using to get float...
by gtafan
Wed Jan 23, 2019 3:03 pm
Forum: C++ Development
Topic: problem geting values from TextCtrl
Replies: 5
Views: 544

Re: problem geting values from TextCtrl

Hi Sorry, your code is too obfuscated. You don't show how the frame is created, why it contains several wxPanel/MyPanel, etc. If using Connect() or better Bind() , you don't need BEGIN_EVENT_TABLE macros The textctrl with parent=Panel1 seems not to be bound to any message handler. If you want a wxT...
by gtafan
Tue Jan 22, 2019 3:40 pm
Forum: C++ Development
Topic: problem geting values from TextCtrl
Replies: 5
Views: 544

problem geting values from TextCtrl

So here my main code from cpp files: MyPanel implementation //(*IdInit(MyPanel) const long MyPanel::ID_STATICTEXT1 = wxNewId(); const long MyPanel::ID_TEXTCTRL1 = wxNewId(); //*) BEGIN_EVENT_TABLE(MyPanel,wxPanel) //(*EventTable(MyPanel) //*) END_EVENT_TABLE() MyPanel::MyPanel(wxWindow* parent, cons...
by gtafan
Fri Jan 18, 2019 11:56 am
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 2219

Re: Lose focus event for wxTextCtrl?

[quote="PB"][/quote] Sorry a misunderstanding, the problem with tab has nothing to do with my previous one. When I am presing tab on any textCtrl the cursor goes to the next textCtrl and Lose focus event is generated, but on the last textCtrl it´s not worcking, the cursor is not going to the first o...
by gtafan
Wed Jan 16, 2019 2:13 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 2219

Re: Lose focus event for wxTextCtrl?

What do you mean by "problems to acces the textCtrl"? Do you mean that the user cannot set focus to the control with keyboard and/or mouse? Do you call event.Skip() in the wxEVT_KILL_FOCUS handler (see my previous code)? Can you reproduce the issue with the MyDialog code below? #include <wx/wx.h> c...
by gtafan
Tue Jan 15, 2019 3:26 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 2219

Re: Lose focus event for wxTextCtrl?

Since I have more then 1 textCtrl, I am geting problems to acces the textCtrl again once it lost focus. After comenting out this line:

Code: Select all

textCtrl->Bind(wxEVT_KILL_FOCUS, &MyDialog::OnKillFocus, this);
everithing worcks fine again.
by gtafan
Mon Jan 07, 2019 2:32 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 2219

Re: Re:

So it was really Connect(), that cased the problem? No, the problem was as both David and me wrote: You changed the control on which the method (Connect) is called, from wxTextCtrl to (probably) its parent. If you did the same to Bind(), it would be wrong as well. OK, now I see, normaly wxSmith doe...
by gtafan
Mon Jan 07, 2019 1:28 pm
Forum: C++ Development
Topic: Lose focus event for wxTextCtrl?
Replies: 16
Views: 2219

Re: Re:

Seems not to worck for me, the only diference I am using Connect instead of Bind: Connect(ID_TEXTCTRL1,wxEVT_KILL_FOCUS,(wxObjectEventFunction)&MyFrame::OnKillFocus); Actually, it seems you made another important change, which broke the code. You now call Connect() on MyFrame, not on the wxTextCtrl...