Search found 704 matches

by Manolo
Thu Feb 07, 2019 7:04 pm
Forum: C++ Development
Topic: Program Received signal SIGSEGV
Replies: 11
Views: 312

Re: Program Received signal SIGSEGV

By the time IsBeingDeleted() is called, you can't be sure that the frame still exists, so that pointer can point to an invalid instance.
by Manolo
Thu Feb 07, 2019 5:43 pm
Forum: C++ Development
Topic: Program Received signal SIGSEGV
Replies: 11
Views: 312

Re: Program Received signal SIGSEGV

There are two points where you must NULL that pointer: a) Right after memoryeditor->Close() b) In your MemoryEditor ctor pass a pointer to the main frame. Have a "make memoryeditor NULL" method in the main frame. When the MemoryEditor closes (handle this event), call that method in the main frame: m...
by Manolo
Thu Feb 07, 2019 5:27 pm
Forum: C++ Development
Topic: Program Received signal SIGSEGV
Replies: 11
Views: 312

Re: Program Received signal SIGSEGV

If you close that other frame and don't set memoryeditor = NULL (which is done with wxDELETE(memoryeditor)) then the next time you click the button the memoryeditor->IsIconized() branch is executed with an invalid pointer.
by Manolo
Thu Feb 07, 2019 5:15 pm
Forum: C++ Development
Topic: Program Received signal SIGSEGV
Replies: 11
Views: 312

Re: Program Received signal SIGSEGV

I guess you don't update "memoryeditor" pointer after memoryeditor->Close()
Can't know, not enough code.
by Manolo
Thu Feb 07, 2019 5:06 pm
Forum: C++ Development
Topic: wxWidgets & openGL
Replies: 10
Views: 453

Re: wxWidgets & openGL

If you use wxWidgets then you don't need GLFW, as they will fight for window and context handling. GLEW is a lib for retrieving function pointers to gl-commands. You can use precompiled files, or you can add them (2 or 3 files) to your app and compile them normally. Which are your problems, so far?....
by Manolo
Wed Feb 06, 2019 1:57 am
Forum: Compiler / Linking / IDE Related
Topic: OpenGL under WxWidgets in Eclipse
Replies: 12
Views: 821

Re: OpenGL under WxWidgets in Eclipse

PB wrote: Is it not?
Dam. PB, you're right.
I found the commit... May 31, 2009
Actually, it was added to wx 3.0. Not to wx 2.9
by Manolo
Tue Feb 05, 2019 6:12 pm
Forum: Compiler / Linking / IDE Related
Topic: OpenGL under WxWidgets in Eclipse
Replies: 12
Views: 821

Re: OpenGL under WxWidgets in Eclipse

Using Mingw compiler, the OpenGL option is NOT default. A typical command is mingw32-make -f makefile.gcc BUILD=release USE_OPENGL=1 which will build a static ( .a files to be linked to your executable), not-debug version, with OGL support of wx After building, you should see the file l ibwxmsw31u_g...
by Manolo
Tue Feb 05, 2019 1:52 pm
Forum: Compiler / Linking / IDE Related
Topic: OpenGL under WxWidgets in Eclipse
Replies: 12
Views: 821

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: 217

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: 205

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: 312

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: 297

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: 821

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: 292

Re: How can I catch wxEVT_LEFT_DCLICK on a wxPanel?

Its not a key event - its a mouse event.
Ooops! You're right.