Search found 15832 matches
- Mon Apr 19, 2021 6:11 pm
- Forum: C++ Development
- Topic: How to efficiently create wxBitmap from std::vector<std::vector<wxColour>>
- Replies: 2
- Views: 24
Re: How to efficiently create wxBitmap from std::vector<std::vector<wxColour>>
Use wxPixelData to write directly into the bitmap, without the vectors: https://docs.wxwidgets.org/trunk/classwx_pixel_data.html As you're just writing into memory, it's safe from multiple threads. But you must destroy the wxPixelData instance before you use the bitmap for any other operation, like ...
- Sun Apr 18, 2021 8:57 pm
- Forum: Component Writing
- Topic: Creating a custom LED indicator
- Replies: 10
- Views: 164
Re: Creating a custom LED indicator
Pass as "style" to the wxWindow ctor.
And must not have the "dc.Clear();" in the paint event handler.
Code: Select all
Led::Led(wxWindow *parent, wxWindowID id, wxPoint Position, int Size, char color)
: wxWindow(parent, id, Position, wxSize(Size,Size), wxTRANSPARENT_WINDOW )
- Sun Apr 18, 2021 8:28 am
- Forum: C++ Development
- Topic: wxEVT_CHAR works, wxEVT_KEY_UP does not
- Replies: 7
- Views: 126
- Sun Apr 18, 2021 8:15 am
- Forum: Component Writing
- Topic: Creating a custom LED indicator
- Replies: 10
- Views: 164
Re: Creating a custom LED indicator
Add the wxTRANSPARENT_WINDOW style flag.
Call SetBackgroundStyle(wxBG_STYLE_PAINT); in the ctor, so that its background does not get cleared.
Memory leak: You need to call "delete gc;" at the end of the paint event handler.
Call SetBackgroundStyle(wxBG_STYLE_PAINT); in the ctor, so that its background does not get cleared.
Memory leak: You need to call "delete gc;" at the end of the paint event handler.
- Sat Apr 17, 2021 4:58 pm
- Forum: Component Writing
- Topic: Creating a custom LED indicator
- Replies: 10
- Views: 164
Re: Creating a custom LED indicator
int x0=100,y0=100,x1=0,y1=0,x2=0,y2=0,D1=40,D2=60; I suspect these hard-coded coordinates to be responsible. Inside a paint event handler for a specific window, the coordinates are relative to the window position, i.e. they always start at (0,0) in the upper left corner. I guess you're drawing outs...
- Fri Apr 16, 2021 5:15 pm
- Forum: C++ Development
- Topic: wxEVT_CHAR works, wxEVT_KEY_UP does not
- Replies: 7
- Views: 126
Re: wxEVT_CHAR works, wxEVT_KEY_UP does not
Is this all about avoiding to delete multiple items because of the key-repeat of the delete key?
Under Windows you can get this information from wxKeyEvent::GetRawKeyFlags(). If bit 30 is set, the event is the result of an auto-repeat.
Under Windows you can get this information from wxKeyEvent::GetRawKeyFlags(). If bit 30 is set, the event is the result of an auto-repeat.
Code: Select all
bool isRepeat = (keyevent.GetRawKeyFlags() & 0x40000000) != 0;
- Fri Apr 16, 2021 12:59 pm
- Forum: C++ Development
- Topic: redirect output of wxExecute?
- Replies: 1
- Views: 32
- Thu Apr 15, 2021 9:38 pm
- Forum: Compiler / Linking / IDE Related
- Topic: Some samples won't compile
- Replies: 3
- Views: 72
Re: Some samples won't compile
How exactly did you try to build the samples? They all should build fine from the command line using the provided make files.
If you try to build them in CodeLite, you'll probably have to add the missing libraries to the linker options yourself.
If you try to build them in CodeLite, you'll probably have to add the missing libraries to the linker options yourself.
- Thu Apr 15, 2021 4:19 pm
- Forum: Platform Related Issues
- Topic: GTK3 / wxStaticText size
- Replies: 21
- Views: 942
Re: GTK3 / wxStaticText size
I usually don't work under Linux, but i have a faint memory that window creation under GTK is somehow delayed compared to window creation under Windows. I assume the Layout is calculated before the wxStaticText is aware of its new font size. I thought there was an open ticket about this on http://tr...
- Thu Apr 15, 2021 2:57 pm
- Forum: Platform Related Issues
- Topic: GTK3 / wxStaticText size
- Replies: 21
- Views: 942
Re: GTK3 / wxStaticText size
It's horrible indeed. Please remove *all* Fit() and Layout() calls. What happens on the "broken" page when you resize the frame manually?The code is a little bit verbose because it comes from wxFormBuilder...
- Thu Apr 15, 2021 2:53 pm
- Forum: Platform Related Issues
- Topic: Getting windows mousepointer icon = black square
- Replies: 25
- Views: 390
Re: Getting windows mousepointer icon = black square
Off-topic:
I think Vadim gave you a pretty clear answer. And in case you don't know him, he's the main wxWidgets maintainer. His word has weight.i'm still waiting for a reply about the questions i wrote here about the wxStopWatch class members.
- Thu Apr 15, 2021 2:50 pm
- Forum: Platform Related Issues
- Topic: GTK3 / wxStaticText size
- Replies: 21
- Views: 942
Re: GTK3 / wxStaticText size
How is that a "small" test case? Small maybe, but not minimal. Is the wxSimpleBook relevant for the problem? Probably not. What about the buttons? I would suspect that a single wxPanel with 3 wxStaticTexts should be sufficient to show the issue.
- Thu Apr 15, 2021 10:24 am
- Forum: C++ Development
- Topic: central alignement within panel
- Replies: 2
- Views: 48
Re: central alignement within panel
I don't quite understand the question. Can you show a screenshot?
- Wed Apr 14, 2021 11:57 pm
- Forum: C++ Development
- Topic: Is there a way to make the radio button as button style?
- Replies: 1
- Views: 57
Re: Is there a way to make the radio button as button style?
You can't change the style of the radio buttons. However, they should look exactly like any other native radio button under Windows. If you get an interface that looks like Windows 95, then your executable is missing the manifest file.
- Wed Apr 14, 2021 10:48 pm
- Forum: General Development
- Topic: wxWidgets independednt static library
- Replies: 1
- Views: 73
Re: wxWidgets independednt static library
I'm not sure it's going to work that way. All the main applications will have their own event loop which will collide with the wxWidgets event loop in your library. Especially in case 2 where the host application does also use wxWidgets. But in that case you could provide a dedicated call in the lib...