Search found 466 matches

by New Pagodi
Tue Mar 26, 2024 3:14 pm
Forum: C++ Development
Topic: Embed a frame within a wxPanel of a wxAuiNotebook
Replies: 4
Views: 237

Re: Embed a frame within a wxPanel of a wxAuiNotebook

A frame is a top level window and can't be placed in other windows.
by New Pagodi
Mon Mar 18, 2024 1:58 am
Forum: Compiler / Linking / IDE Related
Topic: Build for Windows ARM
Replies: 4
Views: 154

Re: Build for Windows ARM

I think you need to TARGET_CPU=ARM64 to the end of the command.
by New Pagodi
Fri Mar 01, 2024 5:01 pm
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1620

Re: Windows Scaling 300%

As doublemax said, creating the graphics context is an expensive operation and I suspect that this is what's causing the poor performance. I ran into this problem when adding the ability to use direct2d graphics for wxSTC and I ultimately abanoned using wxGraphicsContext and just used windows platfo...
by New Pagodi
Sun Feb 25, 2024 6:04 pm
Forum: Compiler / Linking / IDE Related
Topic: CDB - Code::blocks - No longer compatible?
Replies: 2
Views: 166

Re: CDB - Code::blocks - No longer compatible?

I still used codeblocks with vc, but the integrated debugger was never very good. When I need to debug I use windbg (it's part of the windows sdk).
by New Pagodi
Tue Feb 13, 2024 4:26 pm
Forum: C++ Development
Topic: Change the dsiplay scaling factor for wxApp
Replies: 11
Views: 1360

Re: Change the dsiplay scaling factor for wxApp

Electron (used for Slack, Postman, etc) supports this and it is a really nice feature. Unfortunately as PB said, I don't think there is any way for wxWidgets to do this because of limitations in the underlying toolkits.
by New Pagodi
Thu Feb 08, 2024 5:38 pm
Forum: Platform Related Issues
Topic: Cannot catch wxEVT_ENTER_WINDOW on wxChoice
Replies: 8
Views: 406

Re: Cannot catch wxEVT_ENTER_WINDOW on wxChoice

As a general rule, you shouldn't count on getting mouse and character events from native controls because the native control might consume them internally.
by New Pagodi
Mon Jan 22, 2024 7:46 pm
Forum: Platform Related Issues
Topic: wxBITMAP_TYPE_PNG_RESOURCE availability in linux?
Replies: 2
Views: 389

Re: wxBITMAP_TYPE_PNG_RESOURCE availability in linux?

No. Resources are a Mac/Windows concept that doesn't have an analogue in Linux. The best you can do is encode the image as data and include it in the application itself. This page lists a few ways of doing that.
by New Pagodi
Wed Jan 17, 2024 10:09 pm
Forum: C++ Development
Topic: wxPanel as a Gradient from Black to Alpha
Replies: 25
Views: 23831

Re: wxPanel as a Gradient from Black to Alpha

artyfunk wrote: Wed Jan 17, 2024 9:12 pm Is it alright to use the code and share how i want ?
Yes.
by New Pagodi
Wed Jan 17, 2024 8:24 pm
Forum: C++ Development
Topic: wxPanel as a Gradient from Black to Alpha
Replies: 25
Views: 23831

Re: wxPanel as a Gradient from Black to Alpha

I started something similar as a programming exercise a few years ago. circularcontrol.png I'll dump the code here in case it might be useful, but I don't remember most of the details: #include <wx/wx.h> static int MyRound(double d) { return static_cast<int>(floor(d+.5)); } class circularcontrolFram...
by New Pagodi
Sat Oct 21, 2023 3:03 pm
Forum: C++ Development
Topic: Large number of widgets in a scrolling window is very slow
Replies: 10
Views: 3963

Re: Large number of widgets in a scrolling window is very slow

Here's an example of how to paint the font names in a window instead of using static text items. Right now it only draws the first 3 font names: #include <wx/wx.h> #include <wx/fontenum.h> class FontDrawer : public wxWindow { public: FontDrawer(wxWindow* parent, wxWindowID id, const wxPoint& pos...
by New Pagodi
Tue Oct 17, 2023 4:29 am
Forum: Platform Related Issues
Topic: Platform preprocessor question
Replies: 4
Views: 3682

Re: Platform preprocessor question

wxWidgets has the wxFileConfig class that can be used to save app settings in the manner appropriate for each system. If you don't want to use that class, there is also wxStandardPaths that can be used to get the data path for each system without resorting to platform specific code.
by New Pagodi
Fri Oct 06, 2023 2:01 pm
Forum: Compiler / Linking / IDE Related
Topic: Problem trying to have -static binary ...
Replies: 7
Views: 4452

Re: Problem trying to have -static binary ...

If you want to share applications in linux so that user's don't have to install anything, you'll need to use a format like snap, flatpack, or appimage.
by New Pagodi
Fri Oct 06, 2023 1:57 pm
Forum: Compiler / Linking / IDE Related
Topic: Help wxSqlite3 on Linux
Replies: 4
Views: 3732

Re: Help wxSqlite3 on Linux

codeblocks adds any paths you specified for finding libraries to the executable's search path. One of the dlls is probably in one of those library folders.
by New Pagodi
Thu Oct 05, 2023 9:32 pm
Forum: C++ Development
Topic: Draw custom widget asynchronously, then copy to form
Replies: 6
Views: 4180

Re: Draw custom widget asynchronously, then copy to form

I don't know if this is the best option, but the first thing that I can think of is have the worker thread draw to an RGB buffer, then pass that buffer to the main thread using CallAfter, then in the main thread function that is called, convert the buffer to a wxBitmap, call refresh on your widget, ...
by New Pagodi
Tue Sep 19, 2023 6:36 pm
Forum: C++ Development
Topic: I am trying to trigger an event by press WXK_LEFT keyboard key but nothing
Replies: 1
Views: 2126

Re: I am trying to trigger an event by press WXK_LEFT keyboard key but nothing

Except for wxEVT_CHAR_HOOK, key events do not filter up. So you'll need to bind the event handler to the window that will have focus when the left key is pressed instead of the dialog.