Search found 4204 matches
- Wed Sep 13, 2017 12:47 pm
- Forum: C++ Development
- Topic: Creating wxBitmapButtons dynamically and writing a function for each
- Replies: 17
- Views: 5395
Re: Creating wxBitmapButtons dynamically and writing a function for each
Yes, maybe you're missing something :D The fact, that I'm a beginner and I don't really understand all the context. That's why I'm happy about solutions that remain within the easier boundaries of C++ :oops: I am barely at the lower-intermediate level at C++ myself, but I believe that using basic C...
- Wed Sep 13, 2017 12:19 pm
- Forum: C++ Development
- Topic: Creating wxBitmapButtons dynamically and writing a function for each
- Replies: 17
- Views: 5395
Re: Creating wxBitmapButtons dynamically and writing a function for each
There is anoyther option: wxBitmapButton *button = new wxBitmapButton(Panel1, wxID_ANY, ... ); BitmapButton[Durchlauf_fortlaufend] = button; ID_BITMAPBUTTON[Durchlauf_fortlaufend] = button->GetId(); wxID_ANY will tell wxWidgets to autogenerate an ID and then with GetId() to retrieve the "real&...
- Fri Sep 08, 2017 12:16 pm
- Forum: C++ Development
- Topic: Cursor not changing
- Replies: 1
- Views: 617
Re: Cursor not changing
As you did not post any code, it is hard to guess what you are doing wrong. I assume you use wxWindow::SetCursor() . The only hints I can give you is that after you create a wxCursor , check if it returns true from its IsOk() method. Be aware that at least on Windows, some stock cursors are availabl...
- Mon Sep 04, 2017 6:38 pm
- Forum: Platform Related Issues
- Topic: Compilation errors when trying to use wxWebView on Windows 10
- Replies: 3
- Views: 1347
Re: Compilation errors when trying to use wxWebView on Windows 10
was expecting the linker to search all the libraries in the library directories. That is not how a C++ linker works. Anyway, you are using MSVC so you can avoid listing required libraries by hand by including an MSVC only header file: Microsoft Visual C++ users can simplify the linker setup by prep...
- Thu Aug 31, 2017 6:16 pm
- Forum: Component Writing
- Topic: wxGraphicsContex Text Drawing
- Replies: 9
- Views: 22553
Re: wxGraphicsContex Text Drawing
Did you try what I suggested, i.e., whether the code I posted works for you and whether your wxFont can be is successfully converted into graphic font and with what results?
Seems like you missed posts by NewPagodi and me...
Seems like you missed posts by NewPagodi and me...
- Wed Aug 30, 2017 4:19 pm
- Forum: Component Writing
- Topic: wxGraphicsContex Text Drawing
- Replies: 9
- Views: 22553
Re: wxGraphicsContex Text Drawing
FWIW, I have tried this (wxWidgets trunk, Windows 10), which is pretty much the same as the code you posted #include <wx/wx.h> #include <wx/dcbuffer.h> #include <wx/graphics.h> class MyCanvas : public wxPanel { public: MyCanvas(wxWindow* parent) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefau...
- Wed Aug 30, 2017 7:18 am
- Forum: C++ Development
- Topic: wxDateTime and GetMonth()
- Replies: 7
- Views: 2261
Re: wxDateTime and GetMonth()
As the method documentionation clearly indicates, you need to compare the value returned by GetMonth() with wxDateTime::Month values Do you mean this article? https://wiki.wxwidgets.org/WxDateTime I was a little short on documentation, but maybe I am looking at the wrong places. I meant the wxWidge...
- Tue Aug 29, 2017 5:00 pm
- Forum: C++ Development
- Topic: wxDateTime and GetMonth()
- Replies: 7
- Views: 2261
Re: wxDateTime and GetMonth()
As the method documentionation clearly indicates, you need to compare the value returned by GetMonth() with wxDateTime::Month values, e.g..Natulux wrote:But still the GetMonth() function returns the wrong value.
Code: Select all
bool isAugust = wxDateTime::Today().GetMonth() == wxDateTime::Aug;
- Tue Aug 29, 2017 9:50 am
- Forum: C++ Development
- Topic: wxDateTime and GetMonth()
- Replies: 7
- Views: 2261
Re: wxDateTime and GetMonth()
I just skimmed through your code I believe the issue is that you did not initialize dt . Please notice that GetTimeNow() is a static method. I would use something like wxDateTime dt(wxDateTime::Now()); or wxDateTime dt(wxDateTime::Today()); to initialize dt to current date and time or just date.
- Mon Aug 28, 2017 5:22 pm
- Forum: C++ Development
- Topic: problems of a newbie with SetStyle() and compiling with MinGW
- Replies: 5
- Views: 2116
Re: problems of a newbie with SetStyle() and compiling with MinGW
Well, guess I'm back to MinGW 5.1 which still features C++11 FWIW, the previous MinGW32 version had GCC 5.3.0. Just wondering if anybody asked over there whether they know the problem or not. AFAICT no one did. The response to the wxWidgets ticket was that it will be looked into later, I did not fi...
- Mon Aug 28, 2017 10:07 am
- Forum: C++ Development
- Topic: problems of a newbie with SetStyle() and compiling with MinGW
- Replies: 5
- Views: 2116
Re: problems of a newbie with SetStyle() and compiling with MinGW
First problem: I have tried to compile wxwidgets with minGW following the guide here: https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW with the latest MinGW from http://www.mingw.org/ which should be 6.3.0-1. Cleaning the build runs fine. When compiling with MinGW with mingw32-make -f make...
- Sun Aug 20, 2017 7:26 pm
- Forum: Platform Related Issues
- Topic: Embed and set main icon using VC++
- Replies: 3
- Views: 1723
Re: Embed and set main icon using VC++
I do not think there is anything hackish on the procedure you described, this is how it is done if you do not have a resource editor. BTW, SetIcon() may not be the ideal solution if you actually have more icon sizes. In that case SetIcons() could be better, see e.g. here https://forums.wxwidgets.org...
- Sun Aug 20, 2017 5:30 pm
- Forum: Compiler / Linking / IDE Related
- Topic: mingw being unable to compile wxwidgets
- Replies: 10
- Views: 7672
Re: mingw being unable to compile wxwidgets
Sorry, I assumed it was obvious from the link I posted, otherwise you would not encounter it. The issue was fixed in Jan 2017 while 3.1.0 was released in Feb 2016.Cooper wrote:Well, looks like it's not included in 3.1.0 relese.PB wrote:AttachConsole issue was fixed
- Sat Aug 19, 2017 9:11 pm
- Forum: Compiler / Linking / IDE Related
- Topic: mingw being unable to compile wxwidgets
- Replies: 10
- Views: 7672
Re: mingw being unable to compile wxwidgets
FWIW, the AttachConsole issue was fixed some time ago: https://github.com/wxWidgets/wxWidgets/ ... 8f34a4f4a7
- Sat Aug 19, 2017 6:24 am
- Forum: Platform Related Issues
- Topic: wxCreateToolBar 'TB_GETITEMRECT' failed
- Replies: 6
- Views: 1916
Re: wxCreateToolBar 'TB_GETITEMRECT' failed
wxCreateToolBar(wxTB_HORIZONTAL | wxBORDER_NONE | wxTB_FLAT, 100) I am not aware of wxCreateToolBar function so I assume you meant wxFrame::CreateToolBar(). My guess would be either: (1) The frame has not been created (yet), e.g. the call is from the fram default constructor before Create() was cal...