Search found 54 matches

by Gnawer
Fri Mar 20, 2015 1:34 pm
Forum: C++ Development
Topic: [wx3.0.1] wxTranslations::Set() crashes
Replies: 3
Views: 747

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

OK. But I tried member variable in MyApp and local variable in MyApp::OnInit(). Always the same problem. Example: MyApp::OnInit() { wxTranslations trans1; trans1.AddCatalog("DI", wxLANGUAGE_GERMAN); trans1.SetLanguage(wxLANGUAGE_GERMAN); wxTranslations::Set(&trans1); // works wxTranslations trans2; ...
by Gnawer
Fri Mar 20, 2015 11:39 am
Forum: C++ Development
Topic: [wx3.0.1] wxTranslations::Set() crashes
Replies: 3
Views: 747

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

Hello all, I have the requirement to show dialogs and messages in adjustable language, but numbers, times, currency should always be in English locale. So I created // globals wxTranslations translation; MyApp::OnInit() { m_Language = wxLANGUAGE_GERMAN; // example locale.Init(wxLANGUAGE_ENGLISH, wxL...
by Gnawer
Fri Oct 24, 2014 10:15 am
Forum: C++ Development
Topic: [wx3.0.1, Win 7 64] sending mail fails
Replies: 6
Views: 1216

Re: [wx3.0.1, Win 7 64] sending mail fails

Does not compile.
BUT: This complicated construct is the solution :) :

Code: Select all

recip.lpszName = (LPSTR)sName.mb_str().data();
Tanks for the help!
by Gnawer
Fri Oct 24, 2014 8:03 am
Forum: C++ Development
Topic: [wx3.0.1, Win 7 64] sending mail fails
Replies: 6
Views: 1216

Re: [wx3.0.1, Win 7 64] sending mail fails

Error 25: "One or more recipients were invalid or did not resolve to any address". It seems that recipient.lpszName is filled incorrrect. When I replace recip.lpszName = sName.mb_str().release(); by recip.lpszName = "Johnny.[email protected].com"; it works. BUT: The original code stops due to an assertion...
by Gnawer
Thu Oct 23, 2014 1:19 pm
Forum: C++ Development
Topic: [wx3.0.1, Win 7 64] sending mail fails
Replies: 6
Views: 1216

Re: [wx3.0.1, Win 7 64] sending mail fails

The code you have shown is not compiled because UNICODE is defined.
I cannot see any error before

Code: Select all

ULONG nError = m_data->m_lpfnMAPISendMail(m_data->m_hSession, 0, &mapiMessage, MAPI_DIALOG, 0);
by Gnawer
Thu Oct 23, 2014 9:20 am
Forum: C++ Development
Topic: [wx3.0.1, Win 7 64] sending mail fails
Replies: 6
Views: 1216

[wx3.0.1, Win 7 64] sending mail fails

Hello all, I am just upgrading an app from wx2.8.12 to wx.3.0.1. Because the contrib directory is not available in wx3.0 any more I copied the file smapi.h/.cpp to my wx3.0.1 project. All compiles well. When running login to MAPI succeeds, but sending the mail does not. I developed a single function...
by Gnawer
Thu Sep 18, 2014 1:38 pm
Forum: C++ Development
Topic: [wx3.0.1, Win7 64] wxButton::Enable problem
Replies: 7
Views: 904

Re: [wx3.0.1, Win7 64] wxButton::Enable problem

Yes, minimizing and maximizing the app updates the graphics correctly in all cases.
by Gnawer
Thu Sep 18, 2014 1:19 pm
Forum: C++ Development
Topic: [wx3.0.1, Win7 64] wxButton::Enable problem
Replies: 7
Views: 904

Re: [wx3.0.1, Win7 64] wxButton::Enable problem

I tested that UpdateUI Handler is called.
Indeed the button is enabled then, but not buttons graphics.
Enabling this button later changes nothing, because Enable() returns false.
WX sees no need to switch.
by Gnawer
Thu Sep 18, 2014 8:49 am
Forum: C++ Development
Topic: [wx3.0.1, Win7 64] wxButton::Enable problem
Replies: 7
Views: 904

Re: [wx3.0.1, Win7 64] wxButton::Enable problem

When I disable the wxLogMessage() it works! :)
When I keep wxLogMessage() and add a Refresh() or Update() after it, it still doesn't work. :cry:
But I must have messages.
by Gnawer
Thu Sep 18, 2014 8:30 am
Forum: C++ Development
Topic: [wx3.0.1, Win7 64] wxButton::Enable problem
Replies: 7
Views: 904

[wx3.0.1, Win7 64] wxButton::Enable problem

Hello all, within a modal Dialog I have several wxButtons and a wxGrid. Dialogs OnUpdateUI() is implemented and there are several conditions to enable/disable buttons. void MyDialog::OnMyButton1( wxCommandEvent& event ) { // clear the grid and fill it with some contents if (my_grid->GetNumberRows() ...
by Gnawer
Tue Apr 01, 2014 9:46 am
Forum: C++ Development
Topic: wxListBox::SetClientObject() problem
Replies: 2
Views: 639

Re: wxListBox::SetClientObject() problem

That's it! I should not simply exchange pointers. Instead I have to allocate and assign new allocated data that were copied from existing. struct Data : wxClientData { int test; }; m_myListBox->Clear(); m_myListBox->Append("Hello 1", new Data()); m_myListBox->Append("Hello 2", new Data()); Data* p1 ...
by Gnawer
Mon Mar 31, 2014 4:23 pm
Forum: C++ Development
Topic: wxListBox::SetClientObject() problem
Replies: 2
Views: 639

wxListBox::SetClientObject() problem

Hi all, I use wxWidgets-2.8.12 and want to fill a wxListBox with strings and client objects. The list box is defined as "unsorted". This code will generate an Access Violation at dynamic_cast and I do not know the reason why: struct Data : wxClientData { int test; }; m_myListBox->Clear(); m_myListBo...
by Gnawer
Thu Dec 19, 2013 10:30 am
Forum: Compiler / Linking / IDE Related
Topic: WxWidgets 2.9.3 VS 2010 Compiling problems
Replies: 4
Views: 2877

Re: WxWidgets 2.9.3 VS 2010 Compiling problems

Hello all,
I had the same problem.
The solution was to remove the preprocessor setting "NOPCH", because I used precompiled headers.
by Gnawer
Mon Oct 07, 2013 8:22 am
Forum: C++ Development
Topic: Linkage problem when adding wxTreeListCtrl with formBuilder
Replies: 2
Views: 667

Re: Linkage problem when adding wxTreeListCtrl with formBuil

Hello all,
I had exactly the same problem. Adding gdiplus.lib was the solution!
Thanx a lot!