Search found 397 matches

by New Pagodi
Mon Sep 13, 2021 4:47 pm
Forum: Compiler / Linking / IDE Related
Topic: Include error on VSCode Ubuntu 20 (default installation)
Replies: 8
Views: 778

Re: Include error on VSCode Ubuntu 20

I think if you want to use vscode with wxWidgets on linux, the easiest way is to use CMake. I've written about the details in this stackoverflow answer.
by New Pagodi
Mon Sep 06, 2021 3:41 pm
Forum: C++ Development
Topic: wxStyledTextCtrl::Remove - wrong last position in Cyrillic text
Replies: 6
Views: 1053

Re: wxStyledTextCtrl::Remove - wrong last position in Cyrillic text

If you just want to delete text that is selected, call m_styledTextCtrl->ReplaceSelection(wxString()); If you want to find text that is not selected and remove it, you could use something like int findEnd; int m_styledTextCtrl= m_stc->FindText(0,docLength,textToFind,0,&findEnd); m_styledTextCtrl...
by New Pagodi
Sun Sep 05, 2021 8:18 pm
Forum: Compiler / Linking / IDE Related
Topic: I'm using Eclipse with MinGW and have a few questions.
Replies: 5
Views: 634

Re: I'm using Eclipse with MinGW and have a few questions.

I wrote a stackoverflow answer a while back about using wxWidgets with the eclipse IDE. But I haven't touched eclipse since then, so I don't think I can provide any further insight than what I wrote then.
by New Pagodi
Fri Aug 13, 2021 3:47 pm
Forum: General Development
Topic: Raspberry Pi / Debian use of GStreamer
Replies: 6
Views: 1249

Re: Raspberry Pi / Debian use of GStreamer

This should work if your using the x11 backend. I'm not sure what to do if your using wayland instead. TITLE = "Python vlc front end" DEBUG = True import os #os.add_dll_directory(r'C:\Program Files\VideoLAN\VLC') import sys import wx import vlc if DEBUG: import wx.lib.mixins.inspection ROO...
by New Pagodi
Tue Aug 10, 2021 8:42 pm
Forum: Compiler / Linking / IDE Related
Topic: wxFormBuilder better code update
Replies: 2
Views: 1807

Re: wxFormBuilder better code update

You need to derive classes from the frames and dialogs created by wxFormbuilder in separate files. You should never modify the files created by wxFormbuilder yourself.
by New Pagodi
Wed Jun 23, 2021 8:10 am
Forum: C++ Development
Topic: How to capture wxSizeEvent caused by double-clicking on window titlebar?
Replies: 6
Views: 1180

Re: How to capture wxSizeEvent caused by double-clicking on window titlebar?

wxMaximizeEvent can only capture the maximize message, it can't capture the size changing by double-clicking on window titlebar. I just wrote a simple test (on windows), and I get the event in all of these cases 1) clicking the maximize button 2) double clicking the titlebar 3) selecting "maxi...
by New Pagodi
Mon Jun 07, 2021 7:44 pm
Forum: C++ Development
Topic: How to TAB traversal on custom wxWindow controls
Replies: 6
Views: 1125

Re: How to TAB traversal on custom wxWindow controls

Create a borderless text control and put in in another window and draw a rounded border on that second window.
by New Pagodi
Tue Jun 01, 2021 12:35 am
Forum: Compiler / Linking / IDE Related
Topic: Undefined Reference to GetThemeBackgroundContentRect
Replies: 1
Views: 2373

Re: Undefined Reference to GetThemeBackgroundContentRect

You need to add uxtheme.lib to the link libraries. I thought codeblocks added this to the wizard, but maybe that hasn't been done yet. Usually with errors like this you can google the function name to find the missing library. In this case, googling will bring up this page and at the bottom you can ...
by New Pagodi
Sun May 30, 2021 7:51 pm
Forum: Platform Related Issues
Topic: Support to Dark Mode on Windows 10.
Replies: 12
Views: 6193

Re: Support to Dark Mode on Windows 10.

On windows, you can override OnMeasureItem and OnDrawItem for menus to draw them as you want if you want to draw them with a dark theme. I didn't know that, thank you for the tip! Although I suspect that, to keep the codebase more consistent, using the wxFlatMenu might be a better option (but may l...
by New Pagodi
Wed May 26, 2021 2:50 pm
Forum: Platform Related Issues
Topic: Support to Dark Mode on Windows 10.
Replies: 12
Views: 6193

Re: Support to Dark Mode on Windows 10.

Oh, by the way, I plan to switch to using eranif's wxFlatMenu in the future. Maybe his Notebook implementation as well (although that doesn't support wxAui, so I may just have to create a new wxAuiTabArt class for when I need the wxAui interface). On windows, you can override OnMeasureItem and OnDr...
by New Pagodi
Mon May 17, 2021 6:55 pm
Forum: Compiler / Linking / IDE Related
Topic: Cant compile 3.1.5 with webview2
Replies: 6
Views: 3423

Re: Cant compile 3.1.5 with webview2

I think the new webview backend only builds with visual c.
by New Pagodi
Mon May 17, 2021 3:11 am
Forum: C++ Development
Topic: wxThread and wxQueueEvent
Replies: 11
Views: 1684

Re: wxThread and wxQueueEvent

I guess that's OK. Personally, I would use a semaphore or a condition variable to signal to the thread that it should end instead of calling Destroy. But that's mostly a matter of preference. I think calling Destroy and checking for it with TestDestroy should be reserved for exceptional circumstance...
by New Pagodi
Thu May 13, 2021 10:47 pm
Forum: C++ Development
Topic: wxThread and wxQueueEvent
Replies: 11
Views: 1684

Re: wxThread and wxQueueEvent

I don't think the EVT_THREAD macro works with custom thread events. I think the event table macro needs to be something like this: wx__DECLARE_EVT1(wxEVT_COMMAND_MYTHREAD_COMPLETED, wxID_ANY, wxThreadEventHandler(myFrame::OnThreadCompletion)) But I would recommend using Bind instead of event tables.
by New Pagodi
Thu May 13, 2021 1:08 pm
Forum: Compiler / Linking / IDE Related
Topic: need help!!! can not use some basic socket code!!
Replies: 4
Views: 4212

Re: need help!!! can not use some basic socket code!!

As PB said, until very recently, wxWidgets used winsock1 by default to ensure applications would work even with really old systems. It's a well known issue that if you try to use include both winsocke2.h (as you are with you're application) and winsock.h (which wxWidgets will) you need to include wi...