Search found 61 matches

by softport
Thu Mar 08, 2012 11:26 pm
Forum: C++ Development
Topic: Cannot get mouse state with wxGetMouseState()
Replies: 5
Views: 1916

Re: Cannot get mouse state with wxGetMouseState()

Dude!! (..and I don't use that word often!) The "clean" solution I will have to dig into and study, but... The wx help mentioned wxSafeYield to avoid some of the problems you mentioned about wxYield. I just added wxSafeYield() at the bottom of the loop, and it works great. Should I still try to avoi...
by softport
Thu Mar 08, 2012 10:50 pm
Forum: C++ Development
Topic: Cannot get mouse state with wxGetMouseState()
Replies: 5
Views: 1916

Re: Cannot get mouse state with wxGetMouseState()

Here's one more :). It almost works if I use a spin button. When I release the spin-up, the display shows the number of times that the loop executed. But why is it acting this way: 1. The spin button does not depress when you click on it. If I comment out the line "mouse_state = wxGetMouseState();",...
by softport
Thu Mar 08, 2012 9:38 pm
Forum: C++ Development
Topic: Cannot get mouse state with wxGetMouseState()
Replies: 5
Views: 1916

Re: Cannot get mouse state with wxGetMouseState()

Got it. Thanks very much!
by softport
Thu Mar 08, 2012 8:48 pm
Forum: C++ Development
Topic: Cannot get mouse state with wxGetMouseState()
Replies: 5
Views: 1916

Cannot get mouse state with wxGetMouseState()

Hello, I am just testing the wxGetMouseState() function, but can't get it to work. When WxButton1is pressed, and the left mouse button is kept down, the 'while' loop executes only once. Thanks for any input. void MouseFrm::WxButton1Click(wxCommandEvent& event) { bool mouseButtonDown = TRUE; int n = ...
by softport
Thu Feb 16, 2012 8:55 pm
Forum: C++ Development
Topic: error: multiple definition of function
Replies: 4
Views: 10720

Re: error: multiple definition of function

:oops: Thanks, and apologies for posting in the wrong forum. Now it's working. I wasn't aware that I could load png images with wxWidgets. From your link, it looks like exactly what I am trying to do: turn the png into a bitmap, and display the bitmap. Specifically, I would like to mouse over the im...
by softport
Thu Feb 16, 2012 7:25 pm
Forum: C++ Development
Topic: error: multiple definition of function
Replies: 4
Views: 10720

error: multiple definition of function

Hello, when I compile the code below I get an error: multiple definition of `iLoadPng(char*, structPng*)' If I put all the code in file main.cpp, and remove file png.cpp from the project, the error goes away. I would like to keep the function and structure in a separate file. I am new to C++ so I mu...
by softport
Fri Feb 10, 2012 7:34 pm
Forum: C++ Development
Topic: Problem resizing array
Replies: 2
Views: 702

Re: Problem resizing array

Thanks RainRat, I'm very new to C++ but my thought was that if I don't delete the temporary array it would just be left there taking up memory. Edit: I think I understand now: When I set 'array = temp_array' I am not creating a separate array, but just setting the address pointed to by 'array' to th...
by softport
Fri Feb 10, 2012 7:20 pm
Forum: C++ Development
Topic: Problem resizing array
Replies: 2
Views: 702

Problem resizing array

Hello, I am trying to delete an array element then re-size the array smaller. I get the correct answer only if the temporary array that was used in the process is not deleted. Deleting element 1 of array{1,2,3}, gives the correct answer: array = {1,3} , unless 'delete [] temp_array;' is included bef...
by softport
Thu Feb 09, 2012 11:28 pm
Forum: wxDev-C++
Topic: wxWidgets Toolbar Sample folder (+new user questions)
Replies: 13
Views: 5667

Re: wxWidgets Toolbar Sample folder (+new user questions)

Jerek, thanks again for your input and patience, I'm jumping like a cricket from one
topic to another.

Just have to say that I wish I had discovered wxDevC++ years ago.

regards, Walter
by softport
Wed Feb 08, 2012 3:37 pm
Forum: wxDev-C++
Topic: wxWidgets Toolbar Sample folder (+new user questions)
Replies: 13
Views: 5667

Re: wxWidgets Toolbar Sample folder (+new user questions)

Hello Jarek, my wxWidgets version is 2.8.12 . I'm leaning towards not fighting this battle right now. I've spent a lot of time trying to figure out how to add wxSinCtrlDouble, instead of learning C++. After your answer I realized that just changing .h and cpp would probably not be enough, because th...
by softport
Sun Feb 05, 2012 6:40 pm
Forum: wxDev-C++
Topic: wxWidgets Toolbar Sample folder (+new user questions)
Replies: 13
Views: 5667

Re: wxWidgets Toolbar Sample folder (+new user questions)

Hello Jerek, here is what I tried, but it's not working yet. In MyForm.h there is an #include <wx/spinctrl.h>. I looked in this file and didn't see any mention of wxSpinCtrlDouble. Could this be the problem? regards, Walter From: http://docs.wxwidgets.org/trunk/classwx_spin_ctrl_double.html, "Constr...
by softport
Fri Feb 03, 2012 7:25 pm
Forum: wxDev-C++
Topic: wxWidgets Toolbar Sample folder (+new user questions)
Replies: 13
Views: 5667

Re: wxWidgets Toolbar Sample folder (+new user questions)

Jarek, thanks very much for your input. I have been trying to make a display that can be icremented/decremented by 0.01. It looked like wxSpinCtrl would do the job, but it only seems to increment/decrement by 1. I also had trouble formatting the text: it would not center, and changing background and...
by softport
Tue Jan 31, 2012 11:05 pm
Forum: wxDev-C++
Topic: wxWidgets Toolbar Sample folder (+new user questions)
Replies: 13
Views: 5667

Re: wxWidgets Toolbar Sample folder (+new user questions)

Thanks Jarek. Today I found that, like you say, a button name change is handled automatically. Had no problems changing the name to anything at all, and it would compile fine. I think yesterday I was also changing the name of the button's event, to be the same as the name of the button (with 'Click'...
by softport
Mon Jan 30, 2012 4:35 am
Forum: wxDev-C++
Topic: wxWidgets Toolbar Sample folder (+new user questions)
Replies: 13
Views: 5667

Re: wxWidgets Toolbar Sample folder (+new user questions)

Hello, today I changed the name of a button control (from the properties panel), and found that wxDevC++ did not change the name in the project files. On compiling I got a bunch of errors, and it took about an hour to fix them :P . Is there a proper way of changing a control's name, so the control's...
by softport
Sat Jan 28, 2012 9:47 pm
Forum: wxDev-C++
Topic: wxWidgets Toolbar Sample folder (+new user questions)
Replies: 13
Views: 5667

Re: wxWidgets Toolbar Sample folder

Thanks Jarek, I guess my version does not have the \toolbar\bitmaps folder. Maybe
it was an installation option that I left unchecked.
I downloaded the 'silk' icons from your link, 100's of them in a zip file, all 16x16.

regards,
Walter