Search found 111 matches

by beneficii
Mon Jan 29, 2018 9:57 am
Forum: C++ Development
Topic: Display problems with wxBoxSizer and wxScrolled with wxWindow
Replies: 5
Views: 595

Re: Display problems with wxBoxSizer and wxScrolled with wxWindow

Thanks. Making those controls children of panel1 did the trick.

However, with your example of indentation, you deleted a bunch of the controls. So I tried doing the indentation myself, and it's not easy to do. But the window constructs like it should, so thank you!
by beneficii
Mon Jan 29, 2018 8:17 am
Forum: C++ Development
Topic: Display problems with wxBoxSizer and wxScrolled with wxWindow
Replies: 5
Views: 595

Display problems with wxBoxSizer and wxScrolled with wxWindow

I am on Windows 8.1, with wxWidgets v3.0.3. I am using Visual Studio 2017 Community, and I use the Debug x86 compile option. I am using 3 wxScrolled<wxWindow> controls (with one of them thus far subclassed) on my wxFrame , and they are arranged with wxButton and wxToggleButton controls on my wxFrame...
by beneficii
Sat Jun 24, 2017 10:19 am
Forum: C++ Development
Topic: Drawing a window to another window
Replies: 2
Views: 408

Drawing a window to another window

I'm trying to draw a frame on another frame, to make it like those visual IDE's where you have the frame in front of you and you can edit it. But I'm not sure how to do it. I tried this, but all I got was a blank window: class Frame2 : public wxFrame { public: Frame2() : wxFrame(nullptr, wxID_ANY, "...
by beneficii
Thu Jun 08, 2017 5:13 pm
Forum: C++ Development
Topic: wxString support for string_view?
Replies: 4
Views: 724

wxString support for string_view?

I've read about a new class coming out in the C++ Standard Library this year called std::basic_string_view , which with char[] is std::string_view , with wchar_t[] is std::wstring_view , with char16_t[] is std::u16string_view , and with char32_t[] is std::u32string_view . It's great for having to pa...
by beneficii
Sun Jun 04, 2017 8:54 am
Forum: Compiler / Linking / IDE Related
Topic: Initializer error in wxWidgets 3.0.3 when compiling with gcc v. 7.1
Replies: 2
Views: 690

Re: Initializer error in wxWidgets 3.0.3 when compiling with gcc v. 7.1

Dur.

I changed it to this:

Code: Select all

m_textedit(new wxTextCtrl(this, ID_TEXTEDIT, wxEmptyString, wxDefaultPosition, wxDefaultSize, 
        wxTE_MULTILINE | wxTE_RICH2 | wxTE_NOHIDESEL | wxTE_WORDWRAP))
Thanks!
by beneficii
Sun Jun 04, 2017 8:27 am
Forum: Compiler / Linking / IDE Related
Topic: Initializer error in wxWidgets 3.0.3 when compiling with gcc v. 7.1
Replies: 2
Views: 690

Initializer error in wxWidgets 3.0.3 when compiling with gcc v. 7.1

This is wxWidgets 3.0.3, compiled with g++ v. 7.1, on Ubuntu Linux v. 17.04. Here is the definition of my frame class: class MyFrame : public wxFrame { public: MyFrame(); private: wxTextCtrl *m_textedit; }; Here is the implementation of its constructor: #define ID_TEXTEDIT 0x101 MyFrame::MyFrame() :...
by beneficii
Fri Jun 12, 2015 8:21 pm
Forum: C++ Development
Topic: Creating custom control
Replies: 5
Views: 1006

Re: Creating custom control

Thanks, all! It's functioning much better now, after multiple fixes. Here's the source: AdvSpinCtrl.h: #ifndef BENEFICII_WXWIDGETS_ADVSPINCTRL #define BENEFICII_WXWIDGETS_ADVSPINCTRL #include <wx/textctrl.h> #include <wx/spinbutt.h> wxDECLARE_EVENT(bnEVT_ADVSPINCTRL, wxSpinEvent); #define EVT_ADVSPI...
by beneficii
Fri Jun 12, 2015 3:57 am
Forum: C++ Development
Topic: Creating custom control
Replies: 5
Views: 1006

Re: Creating custom control

Thanks. It now draws the control. If you may, it now has an issue of typing a '-' (hyphen) in the text control part when the control loads, which is not the expected action, as I pass a wxEmptyString to the text control at creation. Were I to delete the hyphen, I would get an assert error "String it...
by beneficii
Thu Jun 11, 2015 2:21 am
Forum: C++ Development
Topic: Creating custom control
Replies: 5
Views: 1006

Creating custom control

I'm trying to create a custom spin control that allows for any base between 2 and 32, but I'm having SetFocus() issues: I get an assert error stating that focus cannot be set to an invalid window. This is my first time trying to create a custom control, but I did follow the guide on this website reg...
by beneficii
Tue Mar 17, 2015 8:06 am
Forum: C++ Development
Topic: Neither ToLong nor ToCLong work with base 16 in wxWidgets 3.0.2
Replies: 4
Views: 775

Re: Neither ToLong nor ToCLong work with base 16 in wxWidgets 3.0.2

In addition to getting a hex value back into a wxString, the Format() method appears not to work, either: strUse.Format("%08X %04X\n", lngFirst8, lngLast4); Even though both unsigned long values are non-zero, all I get is an empty string stored in strUse. I guess I should create my own version. Cha...
by beneficii
Tue Mar 17, 2015 8:01 am
Forum: C++ Development
Topic: Neither ToLong nor ToCLong work with base 16 in wxWidgets 3.0.2
Replies: 4
Views: 775

Re: Neither ToLong nor ToCLong work with base 16 in wxWidgets 3.0.2

In addition to getting a hex value back into a wxString, the Format() method appears not to work, either:

Code: Select all

strUse.Format("%08X %04X\n", lngFirst8, lngLast4);
Even though both unsigned long values are non-zero, all I get is an empty string stored in strUse.

I guess I should create my own version.
by beneficii
Tue Mar 17, 2015 7:04 am
Forum: C++ Development
Topic: Neither ToLong nor ToCLong work with base 16 in wxWidgets 3.0.2
Replies: 4
Views: 775

Neither ToLong nor ToCLong work with base 16 in wxWidgets 3.0.2

I'm having a problem with ToLong() putting just a 0 in the long pointer (e.g. &lngFirst8, &lngFirst8_Inc), even though in each case the wxString that calls the ToLong() method the non-zero value should convert properly to a non-zero 16-base number. I've tried adding "0x" to the beginning, only recei...
by beneficii
Wed Dec 03, 2014 5:51 am
Forum: Announcements and Discoveries
Topic: New VC12 wxWidgets templates for wxWidgets 3.0.1
Replies: 1
Views: 2354

Re: New VC12 wxWidgets templates for wxWidgets 3.0.1

In the spirit of the new release of wxWidgets 3.0.1, I have created templates for Visual Studio 2013 for Windows Desktop. They work on any version of VC12 you have, be it Express, Professional, etc. These support any combination of build: static, DLL, Release, Debug, Win32, and x64, in all combinat...
by beneficii
Wed Aug 27, 2014 11:20 pm
Forum: C++ Development
Topic: What are some of the best ways to draw to the screen?
Replies: 1
Views: 528

What are some of the best ways to draw to the screen?

I've read about wxStaticBitmap, but I read that can have problems as some platforms don't support them beyond a different size. I heard wxGenericStaticBitmap might work, but that isn't listed in the official documentation and I'm not sure if it's the best to represent that. What are some of the comp...