Search found 28 matches

by Nefarious
Wed Mar 22, 2017 8:33 pm
Forum: C++ Development
Topic: wxSpinButton
Replies: 9
Views: 2144

Re: wxSpinButton

The events are : BEGIN_EVENT_TABLE(siFilterPanel, wxPanel) EVT_SPIN_UP(wxID_ANY, OnSpinBtnUp) EVT_SPIN_DOWN(wxID_ANY, OnSpinBtnDown) ... END_EVENT_TABLE() I am not basing it on the old event, I just didn't real well enough and used expereince from other systems where the control changes. I figured o...
by Nefarious
Wed Mar 22, 2017 7:36 pm
Forum: C++ Development
Topic: wxSpinButton
Replies: 9
Views: 2144

Re: wxSpinButton

I read the sample widget code and found that they use event.GetInt() to get the new value and spanButton.GetValue() returns the old value. And when I call GetValue() anywhere it is always behind. That sample doesn't seem to call skip event in the spin handlers. I can't tell from reading about events...
by Nefarious
Wed Mar 22, 2017 6:28 pm
Forum: C++ Development
Topic: wxSpinButton
Replies: 9
Views: 2144

Re: wxSpinButton

My handlers are like this: void siFilterPanel::OnSpinBtnDown(wxSpinEvent& event) { int id = event.GetId() - sbBase; int val = mpSpinButton->GetValue(); if (val > 0) { // Mark the data as modified mpBinModified = true; // Convert spin value to threshold float threshold = SpinToThreshold(val); // ...
by Nefarious
Wed Mar 22, 2017 4:13 pm
Forum: C++ Development
Topic: wxSpinButton
Replies: 9
Views: 2144

wxSpinButton

I am trying to use the wxSpinButton control and I seem to be getting strange results: mpSpinButton = new wxSpinButton(this, 600 + i, wxPoint(offset, yoffset), wxSize(22, 34), wxSP_VERTICAL | wxSP_ARROW_KEYS); mpSpinButton->SetRange(0, 40); mpSpinButton->SetValue(27); I hook both the EVT_SPIN_UP and ...
by Nefarious
Sun Mar 05, 2017 11:54 pm
Forum: C++ Development
Topic: Thread Pool
Replies: 3
Views: 1095

Re: Thread Pool

What I have is a process that takes a small amount of time to execute if I can build the infrastructure ahead of time. What I want is a class like the Job class in the job queue posting I referenced, where I can build say 5 of them. Then when I have work to do I change one parameter of the job, the ...
by Nefarious
Sun Mar 05, 2017 6:54 pm
Forum: C++ Development
Topic: Thread Pool
Replies: 3
Views: 1095

Thread Pool

I have found several places where people have suggested a thread pool mechanism for the wxWidgets library. Has any of them been deemed sufficient implementations? I have looked at this: https://forums.wxwidgets.org/viewtopic.php?t=19315 and read this: http://trac.wxwidgets.org/ticket/11227 has this ...
by Nefarious
Mon Feb 27, 2017 4:24 pm
Forum: C++ Development
Topic: wxImage from byte array
Replies: 1
Views: 3403

wxImage from byte array

I can't really tell if this is even possible. I have a stream of jpg images in a byte stream and can read the byte array of each jpeg individually. I have the jpeg image in an array byte* jpgByteArray. I am trying to use the following to draw that image on a frame, but all I get is a black panel. Is...
by Nefarious
Sun Feb 26, 2017 4:49 am
Forum: C++ Development
Topic: SOLVED: wxImage.LoadFile
Replies: 2
Views: 2912

Re: wxImage.LoadFile

I never read the App::OnInit, never thought about it until I was pulling out my hair. Didn't see the call

wxInitAllImageHandlers();
by Nefarious
Sun Feb 26, 2017 2:58 am
Forum: C++ Development
Topic: SOLVED: wxImage.LoadFile
Replies: 2
Views: 2912

SOLVED: wxImage.LoadFile

I am trying to use wxImage and wxBitmap so have been following the image sample. I can draw to a wxBitmap, and now I am trying to draw a jpg to a wxBitmap then I can draw it on the screen. I have a stream of jpeg data that I read and I thought the process would be something like: // mXPixels is the ...
by Nefarious
Sat Feb 25, 2017 8:38 pm
Forum: Compiler / Linking / IDE Related
Topic: New project
Replies: 5
Views: 1015

Re: New project

Thank you, I have something that works for me now, next time I have a few extra minutes, I will do as you said. Is there a place I can't seem to find where this is all written down so I don't have to ask a dozen more irritating questions? I do appreciate all of your efforts, thanks again.
by Nefarious
Sat Feb 25, 2017 1:24 am
Forum: Compiler / Linking / IDE Related
Topic: New project
Replies: 5
Views: 1015

Re: New project

And not only that all new projects have to be built in the sample directory.
by Nefarious
Sat Feb 25, 2017 12:24 am
Forum: Compiler / Linking / IDE Related
Topic: New project
Replies: 5
Views: 1015

New project

So, I can build everything and I am now ready to create my own first project. I am using visual studio and I try to create a new empty project, or any kind of new project and non of them will allow the project to be dll-release or dll-debug. New projects can either be debug or release. Is it customa...
by Nefarious
Fri Feb 24, 2017 9:16 pm
Forum: Compiler / Linking / IDE Related
Topic: new user dll confusion
Replies: 1
Views: 520

new user dll confusion

I just downloaded the library and built it for visual studio 2013, release, dll, and x64. The build seemed to go correct. I then built minimal and it as well seemed to go well. I copied the dll's it needed to the System32 directory so minimal could run and it ran fine. I then went to use the visual ...