Search found 696 matches

by Manolo
Mon Sep 16, 2019 12:52 pm
Forum: C++ Development
Topic: button right align by AddStretchSpacer not work
Replies: 6
Views: 82

Re: button right align by AddStretchSpacer not work

Tell the sizer how to align the buttons using some flag of https://docs.wxwidgets.org/trunk/classwx_sizer.html#wxsizer_flags pSizer_0_0->Add(new wxButton(this, wxID_OK, L"AAA"), 0, wxALIGN_RIGHT); pSizer_0_0->Add(new wxButton(this, wxID_CANCEL, L"BBB"),1, wxALIGN_RIGHT); Notice the "0" I added to th...
by Manolo
Sun Sep 08, 2019 12:50 pm
Forum: C++ Development
Topic: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?
Replies: 8
Views: 159

Re: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?

Case 1 The task blocks everything, GUI included, until it's completed. Then code normally. No threads, no message-handling etc. This approach may only be user-friendly if the task finishes in less than a second. Case 2 The task blocks nothing. There are several ways. For example you may call wxYiel...
by Manolo
Mon Sep 02, 2019 5:51 pm
Forum: C++ Development
Topic: Enabling Stencil test
Replies: 2
Views: 82

Re: Enabling Stencil test

What wxWidgets can do about OpenGL can be read in the FAQ of "General Development", https://forums.wxwidgets.org/viewtopic.php?f=27&t=45552 there is an attribute to set up the stencil buffer size True. See the wx docs https://docs.wxwidgets.org/trunk/classwx_g_l_attributes.html Enabling/disabling th...
by Manolo
Fri Aug 30, 2019 3:38 pm
Forum: C++ Development
Topic: Regarding reading signed integer using wxDataInputStream
Replies: 1
Views: 49

Re: Regarding reading signed integer using wxDataInputStream

Some types use the overloaded "<<" operator:

Code: Select all

wxFileInputStream input( "mytext.dat" );
wxDataInputStream store( input );
wxInt32 ivar;
store >> ivar; // reads a signed integer
You can find these overloads at yourwxdir/include/wx/datstrm.h
by Manolo
Sat Aug 24, 2019 12:44 pm
Forum: Compiler / Linking / IDE Related
Topic: CreateProcess, The system cannot find the file specified error
Replies: 2
Views: 70

Re: CreateProcess, The system cannot find the file specified error

You do have a path to MSYS2: sytem variables path: ....;c:\devkitPro\msys2\usr\bin;... Delete it, restart the computer and try again. And best remove leftovers of previous tries (this is what "clean" at the end of 'ming32-make' is supposed to do). If you don't plan to build wx many times, and will b...
by Manolo
Mon Aug 19, 2019 3:56 pm
Forum: Platform Related Issues
Topic: [wxGTK][wx3.1.2] Can't make GL context current in frame constructor
Replies: 1
Views: 91

Re: [wxGTK][wx3.1.2] Can't make GL context current in frame constructor

This is an old discussion. See https://trac.wxwidgets.org/ticket/16193 Some resume on it: There are three steps to go: a) Creating a gl-contex, which needs a "window" (in X11 this means a "drawable", not necessary a physical window). b) Setting the context as current. This is the point in discussion...
by Manolo
Mon Jun 24, 2019 4:04 pm
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 425

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

If the pyramid sample works for you I guess your issue is related to libraries linked. To find how pyramid gets compiled add >buildlog.txt >2&1 at the end of your command line ( x86_64-w64-mingw32-c++.exe -f makefile.gcc ...). Then, "buildlog.txt" will show the included dirs and linked libs. It seem...
by Manolo
Sat Jun 22, 2019 12:00 am
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 425

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

Mick P : ...they are expressly NOT using wxGLContext. Therefor, it seems logical to also not use wxGLCanvas... Please, stop adding confusion. The OP has problems with ' creating a openGL context in wxWidgets ', and some people (like me) are trying to help. To use OpenGL you need: 1) Create a window...
by Manolo
Fri Jun 21, 2019 8:07 pm
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 425

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

I get an error about some assert triggered on "tempcontext" inside wxglcanvas If you look inside msw/glcanvas.cpp this is a temporary context used internally to get a pointer to wglCreateContextAttribsARB needed for OpenGL > 2.1 Having a error there means there's something wrong and weird with your...
by Manolo
Wed Jun 19, 2019 3:58 pm
Forum: C++ Development
Topic: Smooth surfaces in opengl/penguin example
Replies: 5
Views: 187

Re: Smooth surfaces in opengl/penguin example

wxWidgets takes care only of OS-dependant OpenGL stuff. This includes display attributes, gl context, and swapbuffers calls. The rest (all of OpenGL API) is not a wxWidgets goal. So, the OGL samples that wx provides are there just to show how to deal with those matters. If they would show complex OG...
by Manolo
Tue Jun 18, 2019 12:33 am
Forum: Platform Related Issues
Topic: Help? GTK events do/dont's for dummies (nothing works)
Replies: 37
Views: 859

Re: Help? GTK events do/dont's for dummies (nothing works)

MickP, I see a lot of complains from you, never with enough code (or even worst: no code at all) that justifies your issues. That's not good if you want to get help. People may try to guess, or may try to correct some wrong comments. but that's all. Most of people will skip to other questions where ...
by Manolo
Sun Jun 16, 2019 7:27 pm
Forum: C++ Development
Topic: Smooth surfaces in opengl/penguin example
Replies: 5
Views: 187

Re: Smooth surfaces in opengl/penguin example

This is not the forum to ask about OpenGL (appart from the basic that wxWidgets offers).
Better try at https://community.khronos.org/c/opengl-general, stackoverflow, etc.

For your issue: You can use more triangles to define a surface, so more "normals". There are more ways, but harder to understand.
by Manolo
Wed Jun 12, 2019 5:23 pm
Forum: C++ Development
Topic: wxFrame without icons
Replies: 4
Views: 144

Re: wxFrame without icons

Perhaps you want a wxDialog instead of a wxFrame.
by Manolo
Wed Jun 12, 2019 5:10 pm
Forum: Platform Related Issues
Topic: Help? GTK events do/dont's for dummies (nothing works)
Replies: 37
Views: 859

Re: Help? GTK events do/dont's for dummies (nothing works)

You don't post any code, so I can only guess about your issues using the few and hidden clues you give. I have a very simple system that spawns some windows that use the wxGLCanvas class only to paint their bodies. They have a few handlers for input and Size/Move events. This works for MSW. Under GT...