Search found 2008 matches

by PB
Sat Jun 22, 2019 8:13 pm
Forum: C++ Development
Topic: How to wxIsKindOf class check for a wxTextEntry derived classes?
Replies: 8
Views: 216

Re: How to wxIsKindOf class check for a wxTextEntry derived classes?

The comment for wxDynamicCast says // note that it still has different semantics from dynamic_cast<> and so can't // be replaced by it as long as there are any compilers not supporting it Do you really still use a compiler not supporting dynamic_cast? Perhaps it's time to upgrade it... TBH, I do not...
by PB
Sat Jun 22, 2019 7:22 pm
Forum: C++ Development
Topic: How to wxIsKindOf class check for a wxTextEntry derived classes?
Replies: 8
Views: 216

Re: How to wxIsKindOf class check for a wxTextEntry derived classes?

I am probably missing something here: wny not use C++ RTTI? I would just do wxTextEntry* te = dynamic_cast<wxTextEntry*>(m_pWndLastFocused); if ( te ) te->Clear(); I have just tested it and works as expected #include <wx/wx.h> class MyDialog : public wxDialog { public: MyDialog() : wxDialog(NULL, wx...
by PB
Thu Jun 20, 2019 4:27 pm
Forum: Platform Related Issues
Topic: What is the best way to work with .rc in DLL project
Replies: 6
Views: 175

Re: What is the best way to work with .rc in DLL project

I am just guessing here. My guess (based on skimming wxWidgets source) would be that this version wxEntryStart wxEntryStart( argc, argv ); is intended for console applications and it overwrites the DLL instance you set by wxSetInstance() before. There are also these two overloads for MSW GUI applica...
by PB
Thu Jun 20, 2019 1:15 pm
Forum: Platform Related Issues
Topic: What is the best way to work with .rc in DLL project
Replies: 6
Views: 175

Re: What is the best way to work with .rc in DLL project

Sorry for the stupid questions, but they are mandatory. ;) Can you load other resources or all resources fail to load? Did you init the PNG image handler? Is "bold" not defined anywhere and assigned a numeric value (see the link in my previous post)? What exactly is the assert message? If it is not ...
by PB
Wed Jun 19, 2019 5:54 pm
Forum: Platform Related Issues
Topic: What is the best way to work with .rc in DLL project
Replies: 6
Views: 175

Re: What is the best way to work with .rc in DLL project

The DLL project are the mimics of the DLL project from the sample. So no Resources are available. I added the resource file to that folder with the appropriate changes. But trying to compile I see that no resource compiler is invoked. What does it mean? Did you add the .rc file not only to the disk...
by PB
Wed Jun 19, 2019 8:38 am
Forum: General Development
Topic: WxWidgets?
Replies: 12
Views: 352

Re: WxWidgets?

Second, the plugins can supply a number of different features to the main interface, including UI components whose appearance, features, and functionality are defined using text (XML and possibly other formats) and optionally code. I have heard that WxWidgets employees a few different ways to manag...
by PB
Wed Jun 19, 2019 7:58 am
Forum: C++ Development
Topic: Sharing space between two adjacent widgets
Replies: 5
Views: 102

Re: Sharing space between two adjacent widgets

Not sure we are on the same page, but if you want any change in the size result in a redraw, you may try creating the control with wxFULL_REPAINT_ON_RESIZE style.
by PB
Wed Jun 19, 2019 6:14 am
Forum: Component Writing
Topic: Is it possible to show autocomplete dropdown manually
Replies: 14
Views: 959

Re: Is it possible to show autocomplete dropdown manually

In case you missed New Pagodi's post, make sure autocompletion is really what you want and you are not confusing it with IME:
https://en.wikipedia.org/wiki/Input_method
by PB
Tue Jun 18, 2019 7:18 am
Forum: Component Writing
Topic: Is it possible to show autocomplete dropdown manually
Replies: 14
Views: 959

Re: Is it possible to show autocomplete dropdown manually

The documentation for wxTextCompleterSimple::GetCompletions() states Please notice that the returned values should start with the prefix, otherwise they will be simply ignored, making adding them to the array in the first place useless. I think this makes it quite clear that your solution cannot wor...
by PB
Mon Jun 17, 2019 3:42 pm
Forum: C++ Development
Topic: bad wxCheckListBox index
Replies: 2
Views: 97

Re: bad wxCheckListBox index

I assume the assert is basically triggered from MainFrame::CheckExistingCategory(). I see only two possibilities: 1. Somehow parent->GetExistingCategoryList().GetCount() > MainFrame::existing_category_box->GetCount(). 2. There is a bug somewhere in your program, such one which causes memory corrupti...
by PB
Mon Jun 17, 2019 2:45 pm
Forum: C++ Development
Topic: A Problem to compile a Custom Panel with Event Handler
Replies: 7
Views: 172

Re: A Problem to compile a Custom Panel with Event Handler

First, remove the empty BEGIN/END_EVENT_TABLE block as well as DECLARE_EVENT_TABLE() statement. Second, I strongly suggest using Bind() instead of Connect(), although here it seems to be used properly. Third, always create a wxPaintDC (or its equivalent) in the wxPaintEvent handler. Four, the panel ...
by PB
Tue Jun 11, 2019 8:06 am
Forum: Compiler / Linking / IDE Related
Topic: Build for Visual Studio 2019
Replies: 20
Views: 440

Re: Build for Visual Studio 2019

As I said, I believe WIN32 is not needed. wxWidgets defines this macro itself in platform.h: #if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__) # ifndef __WINDOWS__ # define __WINDOWS__ # endif /* !__WINDOWS__ */ #endif /* Any standard symbol indicating Windows */ #if defined(__WINDOWS_...
by PB
Tue Jun 11, 2019 7:35 am
Forum: Compiler / Linking / IDE Related
Topic: Build for Visual Studio 2019
Replies: 20
Views: 440

Re: Build for Visual Studio 2019

thought dynamic linking will take less amount of compile and build time? So, I can build, run and test quickly? I never timed it but I think time taken by statically linking a library such as wxWidgets would be negligible. My another little doubt: is WIN32 a right macro? Shouldn't it be _WIN32? The...
by PB
Tue Jun 11, 2019 5:57 am
Forum: Compiler / Linking / IDE Related
Topic: Build for Visual Studio 2019
Replies: 20
Views: 440

Re: Build for Visual Studio 2019

This program can't start because wxbase312ud_vc_custom.dll is missing from your computer. Rather than moving wxbase312ud_vc_custom.dll next to .exe? I can't run the project from Visual Studio. You will still have to distribute all the DLLs to the users along the executable but for development, you ...
by PB
Fri Jun 07, 2019 10:47 am
Forum: C++ Development
Topic: Button is focused when I run application
Replies: 9
Views: 218

Re: Button is focused when I run application

Isn't this also the usual default button vs focused item question?

See e.g. here viewtopic.php?t=45174