Search found 712 matches

by Manolo
Tue Feb 05, 2019 1:52 pm
Forum: Compiler / Linking / IDE Related
Topic: OpenGL under WxWidgets in Eclipse
Replies: 12
Views: 1404

Re: OpenGL under WxWidgets in Eclipse

Includes: <gl.h> If you use OGL>3 then also g lext.h . This file can be downloaded from official https://www.khronos.org/registry/OpenGL/index_gl.php . The pyramid sample uses parts of it. I think that if you use glew then you already have that file. Don't forget to compile wxWidgets with USE_OPENGL...
by Manolo
Tue Feb 05, 2019 1:49 pm
Forum: Compiler / Linking / IDE Related
Topic: OpenGL on Eclipese
Replies: 2
Views: 413

Re: OpenGL on Eclipese

by Manolo
Tue Feb 05, 2019 1:41 pm
Forum: C++ Development
Topic: get position after rotating using wxGCDC
Replies: 1
Views: 283

Re: get position after rotating using wxGCDC

I suppose you know the coordinates [cx, cy] of that corner before the rotation.
Then the new coordinates after the rotation can be obtained by

Code: Select all

gcdc->GetGraphicsContext()->GetTransform().TransformPoint(&cx, &cy);
by Manolo
Sun Feb 03, 2019 1:53 pm
Forum: Compiler / Linking / IDE Related
Topic: wxbase312u_gcc.dll was not found
Replies: 2
Views: 686

Re: wxbase312u_gcc.dll was not found

You have built wx with SHARED=1 . This means that the result is some dynamic files ( .dll on Windows). When your executable starts it looks for these files. It searches at system dirs, like %windir%\system32 , but instead of pollute the system, better put your .dll in the same directory as the execu...
by Manolo
Fri Feb 01, 2019 9:07 pm
Forum: Compiler / Linking / IDE Related
Topic: What is *App.cpp for?
Replies: 2
Views: 525

Re: What is *App.cpp for?

If you want to learn wxWidgets I strongly advice studying the samples/minimal at your wx dir. The first thing wx needs is to start the library. It includes not only basic classes, but also the "main" function required to start any app, and the events-loop. This is why you need to derive your own "My...
by Manolo
Fri Feb 01, 2019 6:30 pm
Forum: Compiler / Linking / IDE Related
Topic: OpenGL under WxWidgets in Eclipse
Replies: 12
Views: 1404

Re: OpenGL under WxWidgets in Eclipse

"cube", "isosurf", and "penguin" at samples/opengl folder are examples for old OpenGL 1.1 Modern OpenGL (>=3.2) requires much more setting: context (this has been always required), function pointers retriever, maths. But it's much more powerfull and featured. Speed is also improved if you manage lar...
by Manolo
Fri Feb 01, 2019 6:21 pm
Forum: C++ Development
Topic: How can I catch wxEVT_LEFT_DCLICK on a wxPanel?
Replies: 7
Views: 465

Re: How can I catch wxEVT_LEFT_DCLICK on a wxPanel?

Its not a key event - its a mouse event.
Ooops! You're right.
by Manolo
Fri Feb 01, 2019 1:27 am
Forum: C++ Development
Topic: How can I catch wxEVT_LEFT_DCLICK on a wxPanel?
Replies: 7
Views: 465

Re: How can I catch wxEVT_LEFT_DCLICK on a wxPanel?

A button and other controls fire an event of type wxCommandEvent . If that event is not handled (you don't have a handler for it, or your handler calls event.Skip()) then it's propagated to the parent of the button. You may think that having a handler in the panel it will called for any action on it...
by Manolo
Fri Feb 01, 2019 1:13 am
Forum: C++ Development
Topic: How to hook wxEVT_SHOW for a wxPanel child of a wxDialog
Replies: 2
Views: 251

Re: How to hook wxEVT_SHOW for a wxPanel child of a wxDialog

In all of this I am assuming that child controls of a dialog would fire wxEVT_SHOW whenever they become visible False. From wxShowEvent docs The event is triggered by calls to wxWindow::Show(), and any user action showing a previously hidden window or vice versa. For example, the event is triggered...
by Manolo
Thu Jan 31, 2019 5:14 pm
Forum: C++ Development
Topic: How to use wxTextCtrl->EmulateKeyPress?
Replies: 2
Views: 234

Re: How to use wxTextCtrl->EmulateKeyPress?

Code: Select all

wxKeyEvent keyEvent(wxEVT_CHAR);
by Manolo
Thu Jan 31, 2019 4:51 pm
Forum: C++ Development
Topic: wxDialog size not correct - all controls are not shown
Replies: 7
Views: 390

Re: wxDialog size not correct - all controls are not shown

Can you post some minimal code? It's difficult to guess the fix without knowing its origen.
by Manolo
Thu Jan 31, 2019 4:46 pm
Forum: C++ Development
Topic: How to manually call button.onClick function
Replies: 11
Views: 818

Re: How to manually call button.onClick function

In pseudo code: void MyDongleReceiverCallback(SomeDongleMsgType doMsg) //you do have this, right? { wxString msg = TransformTowxString(doMsg); globalTextCtrlPtr->SetValue(msg); //this is a global pointer ] It can be improved if that callback above is a member of a class that has access to the wxText...
by Manolo
Thu Jan 31, 2019 4:21 pm
Forum: C++ Development
Topic: Using wxWidgets in a Multi-process Architecture
Replies: 8
Views: 739

Re: Using wxWidgets in a Multi-process Architecture

wxWidgets has wxProcess You can show your windows in tabs or whatever, created all of them in the main thread, which is the GUI for your app. The task to do in a particular window (e.g. reacting to some user action) can be done in a separate process. This process can be created by wxProcess or is a ...
by Manolo
Thu Jan 31, 2019 1:05 am
Forum: C++ Development
Topic: wxWidgets 3.1.2 / wxGLCanvas crashes OpenGL-context
Replies: 4
Views: 611

Re: wxWidgets 3.1.2 / wxGLCanvas crashes OpenGL-context

new clsBuffer ( 2, 2, "test 2" ); Nomal C++ should store the object, something like clsBuffer *clsBuf1 = new clsBuffer ( 2, 2, "test 2" ); ...but perhaps you have a rare "new" overloading... I don't think so. You can create two wxGLContext and bind them (IOW, set as current) one for each wxGLCanvas...