Search found 54 matches

by Gnawer
Mon Sep 16, 2019 9:54 am
Forum: wxDev-C++
Topic: Version Info in runtime
Replies: 8
Views: 4795

Re: Version Info in runtime

Great, that you post this piece of code that helps to retrieve all the version information! =D>
It maybe mentioned additionally, that you have to link with "version.lib".
by Gnawer
Tue Aug 14, 2018 7:14 am
Forum: C++ Development
Topic: wxCmdLineParser, redirect output
Replies: 4
Views: 713

Re: wxCmdLineParser, redirect output

So, finally, I solved it. The solution is to use an undocumented class wxMessageOutputLog. To redirect all outputs (not only from wxCmdLineParser) to the log target, specify this in your application (for example in MyApp::OnInit()). auto oldMsgOutput = wxMessageOutput::Get(); auto newMsgOutput = new...
by Gnawer
Mon Aug 13, 2018 1:16 pm
Forum: C++ Development
Topic: wxCmdLineParser, redirect output
Replies: 4
Views: 713

wxCmdLineParser, redirect output

[wxWidgets 3.1.1, Windows 7 64 bit] Hello all, in wx documentation I read, that wxCmdLineParser.Parse() can generate messages, that "go to standard wx logging system". That seems not to be true. I defined a new wxLogStream() target at wxApp start. All other messages go there, but not that from wxCmd...
by Gnawer
Sun Apr 23, 2017 5:25 pm
Forum: C++ Development
Topic: wxDataViewTreeCtrl exception with text renderer
Replies: 12
Views: 2067

Re: wxDataViewTreeCtrl exception with text renderer

This is original sample code from dataview.cpp, added by MyDialog1 to realize a 2nd view of mymodels.h/.cpp from wx samples. Button "Add Mozart" will launch MyDialog1 ///////////////////////////////////////////////////////////////////////////// // Name: dataview.cpp // Purpose: wxDataViewCtrl wxWidg...
by Gnawer
Sat Apr 22, 2017 4:38 pm
Forum: C++ Development
Topic: wxDataViewTreeCtrl exception with text renderer
Replies: 12
Views: 2067

Re: wxDataViewTreeCtrl exception with text renderer

Never called. Neither in original sample nor in my dialog.
by Gnawer
Sat Apr 22, 2017 3:24 pm
Forum: C++ Development
Topic: wxDataViewTreeCtrl exception with text renderer
Replies: 12
Views: 2067

Re: wxDataViewTreeCtrl exception with text renderer

Yes, I did. I use original mymodel.h/.cpp from wx sample.

Code: Select all

virtual wxString MyMusicTreeModel::GetColumnType( unsigned int col ) const wxOVERRIDE {
  if (col == 2)
    return wxT("long");

  return wxT("string");
}
by Gnawer
Sat Apr 22, 2017 1:17 pm
Forum: C++ Development
Topic: wxDataViewTreeCtrl exception with text renderer
Replies: 12
Views: 2067

Re: wxDataViewTreeCtrl exception with text renderer

Yes, I did. This is my next test with same error: - I copied dataview sample code and added a dialog to it. - The dialogs only control is a wxDataViewTreeCtrl. - I added a member wxObjectDataPtr<MyMusicTreeModel> m_music_model; (same as in wxFrame) to the dialog. - In dialogs constructor I added m_m...
by Gnawer
Fri Apr 21, 2017 7:20 am
Forum: General Development
Topic: Designing large amount of GUI elements
Replies: 6
Views: 1580

Re: Designing large amount of GUI elements

For years I used the free software "wxFormBuilder" and I'm quite satisfied with it. The biggest GUI I created contains dozens of dialogs with notebook-controls, panels, bitmaps, grids, buttons and almost all what is available. Beside any GUI Builder you have to understand how the sizer system in wx ...
by Gnawer
Fri Apr 21, 2017 6:31 am
Forum: C++ Development
Topic: wxDataViewTreeCtrl exception with text renderer
Replies: 12
Views: 2067

Re: wxDataViewTreeCtrl exception with text renderer

It is wxWidgets 3.1.0. The exception occurs after dialog is shown, so there is no more code to show before assertion. debug alert: ..\..\src\common\datvcmn.cpp(643): assert "variant.GetType() == "wxDataViewIconText"" failed in operator <<(). call stack: [01} operator<< d:\software\wxWidgets-3.1.0\sr...
by Gnawer
Thu Apr 20, 2017 3:52 pm
Forum: C++ Development
Topic: wxDataViewTreeCtrl exception with text renderer
Replies: 12
Views: 2067

wxDataViewTreeCtrl exception with text renderer

Hello all, I compiled the wx sample "dataview" and everything works fine. Next, I want to use such a wxDataViewTreeCtrl in my own application. I created a minimum data model and a control with 1 text column only: m_testmodel = new TestModel(); m_dataViewTreeCtrl2->AssociateModel(m_testmodel.get()); ...
by Gnawer
Wed Oct 21, 2015 2:30 pm
Forum: Announcements and Discoveries
Topic: Windows Service built with wxWidgets (no GUI)
Replies: 6
Views: 2547

Re: Windows Service built with wxWidgets (no GUI)

Great Code! It solves my Problem to receive an Event when an Admin stops Service in Service Control Manager. But now I want to extend code for catching socket Events. First of all I added 2 "Binds" in your "BIND EVENT HANDLERS" section. enum { ID_THREAD = 42, ID_SERVER, ID_SOCKET }; // ... // BIND E...
by Gnawer
Mon Oct 19, 2015 11:22 am
Forum: The Code Dump
Topic: Running wxWidgets app as a windows service
Replies: 19
Views: 15129

Re: Running wxWidgets app as a windows service

Great Code! I was able to create a service that handles socket events. A last problem I have to solve: an administrator launches Service Control Manager and stops the service. This event can be catched by "WaitForSingleObject" method, so I read in MSDN. But I want to catch it by a wx Event handler, ...
by Gnawer
Tue Sep 29, 2015 9:06 am
Forum: C++ Development
Topic: Buttons look different in Release and Debug Builds
Replies: 2
Views: 423

Re: Buttons look different in Release and Debug Builds

Release shows desired design.

Problem is solved:
Under "Project Settings/linker/manifest file" I switched "Generate Manifest" to "Yes".
That's it!

Thanks for quick help!
by Gnawer
Tue Sep 29, 2015 7:31 am
Forum: C++ Development
Topic: Buttons look different in Release and Debug Builds
Replies: 2
Views: 423

Buttons look different in Release and Debug Builds

[Windows 32, wxWidgets 3.0.1, Visual Studio 2012] I have a wxFrame with a toolbar. That toolbar has Buttons. Bitmaps are loaded from resource. All designed with wxFormBuilder. I got different appearance of buttons depending on release or debug build (see Image attached). How to get identical design?...
by Gnawer
Fri Mar 20, 2015 2:43 pm
Forum: C++ Development
Topic: [wx3.0.1] wxTranslations::Set() crashes
Replies: 3
Views: 760

Re: [wx3.0.1] wxTranslations::Set() crashes

After attentive reading the wxManual I found the solution. static void wxTranslations::Set( wxTranslations * t ) Sets current translations object. Deletes previous translation object and takes ownership of t. "Takes ownership" is the secret. So this succeeds: MyApp::OnInit() { wxTranslations* pTrans...