Search found 11461 matches

by doublemax
Sun Nov 19, 2017 12:19 pm
Forum: C++ Development
Topic: Mouse position not looping
Replies: 1
Views: 21

Re: Mouse position not looping

if(x <= 0) //doesn't work, left of screen parentFrame->WarpPointer(screenMaxX, y); Try "screenMaxX-1" here. I'm surprised this works at all, as you're setting negative coordinates in some cases: if (x >= screenMaxX) parentFrame->WarpPointer(0 - x, y);
by doublemax
Sat Nov 18, 2017 4:00 pm
Forum: C++ Development
Topic: Get data from a web page
Replies: 6
Views: 52

Re: Get data from a web page

Usually wxHTTP. But unfortunately it doesn't support SSL.

Options are:
1) libcurl
https://curl.haxx.se/libcurl/

2) One user added SSL to wxHTTP. Check if his solution works for you:
viewtopic.php?f=1&t=43802
by doublemax
Sat Nov 18, 2017 2:43 pm
Forum: C++ Development
Topic: Get data from a web page
Replies: 6
Views: 52

Re: Get data from a web page

When using wxWebView (which might not be the best tool for the job), you have to wait for the wxEVT_WEBVIEW_LOADED event. Then the source will be available.
by doublemax
Fri Nov 17, 2017 11:50 pm
Forum: General Development
Topic: wxWidgets, imagemagic and png
Replies: 1
Views: 28

Re: wxWidgets, imagemagic and png

Please show an example of the generated header file and the code that's supposed to load the image.

https://wiki.wxwidgets.org/Embedding_PNG_Images
by doublemax
Fri Nov 17, 2017 9:51 am
Forum: C++ Development
Topic: Storing button pointers on wxWidget?
Replies: 6
Views: 77

Re: Storing button pointers on wxWidget?

Use the debugger to find out where and why it crashes. My guess would be the while loop inside the for loop and "col" running out of bounds. For simplicity i would suggest to split the "gameWin" check into 4 loops: One checks for horizontal lines, one for vertical lines and 2 for...
by doublemax
Thu Nov 16, 2017 2:26 pm
Forum: C++ Development
Topic: Storing button pointers on wxWidget?
Replies: 6
Views: 77

Re: Storing button pointers on wxWidget?

How do you create the buttons? By code or with a GUI editor?

If you do it by code, please show the code.

If the latter case you may need another way to mark the buttons, e.g. with a unique ID that tells you which button is where.
by doublemax
Thu Nov 16, 2017 7:40 am
Forum: C++ Development
Topic: Storing button pointers on wxWidget?
Replies: 6
Views: 77

Re: Storing button pointers on wxWidget?

The array that holds the button pointers should be a member variable, e.g. of SubGUIClass. You need to initialize it while you create the buttons, so that you know the position of each button.
by doublemax
Wed Nov 15, 2017 8:54 pm
Forum: C++ Development
Topic: glcanvas on a wxpanel?
Replies: 8
Views: 166

Re: glcanvas on a wxpanel?

The problem is that the wxGLCanvas is not in a sizer, so there is nobody that tells it to fill the available space. OTHT, putting the wxPanel in a sizer is not necessary as it will automatically fill the whole client area of the frame if it is the only child. So in more or less pseudo-code it should...
by doublemax
Wed Nov 15, 2017 5:34 pm
Forum: Compiler / Linking / IDE Related
Topic: add string to wxChoice [SOLVED]
Replies: 5
Views: 96

Re: add string to wxChoice [SOLVED]

I don't know wxformbuilder, but usually there are some markers in the source that show where you can add code that will not get overwritten.
by doublemax
Tue Nov 14, 2017 11:39 pm
Forum: General Development
Topic: wx.lua wait
Replies: 6
Views: 81

Re: wx.lua wait

That the GUI freezes while your code is running a loop, is normal. But crashing isn't. That probably has another cause.

But my suggestion still stands: Use a busy-flag to avoid sending commands when the motor is still moving and use a timer event to check the position of the motor.
by doublemax
Tue Nov 14, 2017 6:50 pm
Forum: General Development
Topic: wx.lua wait
Replies: 6
Views: 81

Re: wx.lua wait

So you're sending a command to a motor and the motor starts moving towards its target position, but your program continues immediately? I don't know much about wxLua, so i'll talk about the C++ version and assume that the same methods apply. You can't wait in a tight loop, this would freeze the GUI....
by doublemax
Tue Nov 14, 2017 3:58 pm
Forum: General Development
Topic: wx.lua wait
Replies: 6
Views: 81

Re: wx.lua wait

What you're describing should not happen in a single-threaded application.

Can you explain it in more detail?
by doublemax
Tue Nov 14, 2017 8:05 am
Forum: Compiler / Linking / IDE Related
Topic: my program compiled error on wx/buffer.h [SOLVED]
Replies: 14
Views: 144

Re: my program compiled error on wx/buffer.h [SOLVED]

WXBUILDING should only be defined if you're compiling the wx libraries themselves. Not when you're building an application that uses wxWidgets.
by doublemax
Tue Nov 14, 2017 7:01 am
Forum: Compiler / Linking / IDE Related
Topic: my program compiled error on wx/buffer.h [SOLVED]
Replies: 14
Views: 144

Re: my program compiled error on wx/buffer.h [SOLVED]

Building the wx libraries worked ok?
Which command line did you use?
Can you build the "minimal" sample that comes with wxWidgets?


In the preprocessor definitions i see something that begins with "WXBUILDING...". That looks wrong. What's the complete entry?
by doublemax
Tue Nov 14, 2017 6:29 am
Forum: Compiler / Linking / IDE Related
Topic: Problem building wxWidgets 3.0.3 on Win 7 with Git's MinGW-W64
Replies: 16
Views: 147

Re: Problem building wxWidgets 3.0.3 on Win 7 with Git's MinGW-W64

I was actually very surprised to see that gcc.exe is being picked up from "C:\Program Files (x86)\MLton\bin\gcc.exe", but I have no clue why this is happening. That's quite obvious, because its entry in the PATH variable comes before the other one: C:\Program Files (x86)\MLton\bin;D:\Git\...

Go to advanced search