Search found 14294 matches

by doublemax
Thu Dec 05, 2019 2:14 pm
Forum: C++ Development
Topic: Displaying Image and Videos on my Parent Frame cMain
Replies: 14
Views: 223

Re: Displaying Image and Videos on my Parent Frame cMain

First you need a panel with a custom paint event handler that draws a bitmap. You can use this as a starting point: https://wiki.wxwidgets.org/An_image_panel Then you need to get RGB data from OpenCV. I know it's possible but i can't tell you exactly how and where. From there you can either create a...
by doublemax
Thu Dec 05, 2019 2:08 pm
Forum: C++ Development
Topic: How to implement something like this?
Replies: 24
Views: 607

Re: How to implement something like this?

If you want a working solution i need code that compiles. argPanel = new wxPanel( sbs->GetStaticBox(), wxID_ANY ); m_labe11 = new wxStaticText( argPanel, wxID_ANY, "Position", wxPoint( 4,4) ); m_label2 = new wxStaticText( argPanel, wxID_ANY, "Name", wxPoint( 40,4 ) ); m_label3 = new wxStaticText( ar...
by doublemax
Wed Dec 04, 2019 2:08 pm
Forum: C++ Development
Topic: Get the Window under the Cursor. Debug wrong Window overlaps.
Replies: 4
Views: 98

Re: Get the Window under the Cursor. Debug wrong Window overlaps.

Things you need: wxAppConsole::FilterEvent https://docs.wxwidgets.org/trunk/classwx_app_console.html#ada7ab606e014a10d46e4b3c6f602e20c wxWindow* wxFindWindowAtPoint https://docs.wxwidgets.org/trunk/group__group__funcmacro__misc.html#ga1e2c40f2735a91a6bb283ff3d3e406f0 However, if you're using sizers,...
by doublemax
Wed Dec 04, 2019 1:53 pm
Forum: C++ Development
Topic: Application-wide cleanup code
Replies: 4
Views: 105

Re: Application-wide cleanup code

Assuming "cMain" is a wxFrame, just calling Close() should be enough.

Why? Because the default behavior of a wxFrame is to destroy itself when it gets closed *and* the default behavior of a wxApp is to terminate when the last toplevel window (like a wxFrame) gets closed.
by doublemax
Wed Dec 04, 2019 1:50 pm
Forum: C++ Development
Topic: wxtextCtrl and vertical scrollbar problem
Replies: 2
Views: 61

Re: wxtextCtrl and vertical scrollbar problem

Platform, wxWidgets version?

That should work out of the box. Can you post a small code sample that shows the issue?
by doublemax
Wed Dec 04, 2019 1:18 pm
Forum: Platform Related Issues
Topic: Text scale on HiDPI display using Direct2D renderer
Replies: 5
Views: 101

Re: Text scale on HiDPI display using Direct2D renderer

The ticket is visible, thanks.

Could you check if the problem can be seen in the "drawing" sample where you can switch between different renderers? If yes, please add that information to the ticket.
by doublemax
Tue Dec 03, 2019 1:17 pm
Forum: C++ Development
Topic: wxString spliting syntax
Replies: 7
Views: 124

Re: wxString spliting syntax

That seemed to do just the trick, but it does not work with nested strings as I'm using. For example : ((abcdef:ghijkl):grezagre) Well, you didn't describe what input values are possible. to get a sub-string from index a to b? https://docs.wxwidgets.org/trunk/classwx_string.html#a023d5f6b708eff5123...
by doublemax
Tue Dec 03, 2019 12:32 pm
Forum: Platform Related Issues
Topic: wxWidgets under Windows and Dll's
Replies: 3
Views: 118

Re: wxWidgets under Windows and Dll's

In general i think that should work. If both the application and the DLL use wxWidgets, it's important that you link to wxWidgets dynamically, too. Same goes for the CRTs.

Are you doing that?
by doublemax
Tue Dec 03, 2019 12:04 pm
Forum: C++ Development
Topic: how to make a wxPanel like Layer
Replies: 9
Views: 190

Re: how to make a wxPanel like Layer

wxWidgets doesn't support overlapping siblings. What exactly do you want to achieve?
by doublemax
Mon Dec 02, 2019 6:39 pm
Forum: C++ Development
Topic: wxString spliting syntax
Replies: 7
Views: 124

Re: wxString spliting syntax

While the pattern is so simple that you could solve this with dedicated code, you could also use this as an opportunity to learn about regular expressions :) #include "wx/regex.h" wxRegEx rx("\\((.*?):(.*?)\\)", wxRE_ADVANCED); if (rx.IsValid()) { wxString text = "(abcdef:ghijkl)"; if (rx.Matches(te...
by doublemax
Mon Dec 02, 2019 6:23 am
Forum: Compiler / Linking / IDE Related
Topic: LNK2019 wxString::SubstrBufFromType
Replies: 8
Views: 297

Re: LNK2019 wxString::SubstrBufFromType

I don't get any error when compiling your code. But try removing the "#define wxDEBUG_LEVEL 0" line. This can only be changed when compiling the wxWidgets libraries, you can't override this in user code. If that doesn't work, make sure that your code is compiled with the same configuration that was ...
by doublemax
Sun Dec 01, 2019 2:57 pm
Forum: C++ Development
Topic: SetVirtualSizeHints (deprecated) and FitInside
Replies: 2
Views: 81

Re: SetVirtualSizeHints (deprecated) and FitInside

#if WXWIN_COMPATIBILITY_2_8 // these are useless and do nothing since wxWidgets 2.9 wxDEPRECATED( virtual void SetVirtualSizeHints( int minW, int minH, int maxW = wxDefaultCoord, int maxH = wxDefaultCoord ) ); wxDEPRECATED( void SetVirtualSizeHints( const wxSize& minSize, const wxSize& maxSize=wxDe...
by doublemax
Sun Dec 01, 2019 2:54 pm
Forum: C++ Development
Topic: How to make the design properly
Replies: 3
Views: 141

Re: How to make the design properly

ONEEYEMAN wrote:
Sun Dec 01, 2019 2:36 pm
I don't see a static box {sizer}...
I do. Both in the code and in the screenshot.
by doublemax
Sun Dec 01, 2019 10:22 am
Forum: C++ Development
Topic: How to make the design properly
Replies: 3
Views: 141

Re: How to make the design properly

There are far too many sizers: wxPanel *panel = new wxPanel(this, wxID_ANY); wxBoxSizer *main_sizer = new wxBoxSizer(wxHORIZONTAL); wxStaticBoxSizer *sbs = new wxStaticBoxSizer( wxHORIZONTAL, panel ); sbs->Add( new wxStaticText( sbs->GetStaticBox(), wxID_ANY, _( "Position" )), 0, wxEXPAND|wxALL, 4);...