Search found 57 matches

by Gnawer
Tue Sep 29, 2015 9:06 am
Forum: C++ Development
Topic: Buttons look different in Release and Debug Builds
Replies: 2
Views: 445

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: 445

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: 798

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...
by Gnawer
Fri Mar 20, 2015 1:34 pm
Forum: C++ Development
Topic: [wx3.0.1] wxTranslations::Set() crashes
Replies: 3
Views: 798

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: 798

[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: 1265

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: 1265

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: 1265

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: 1265

[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: 963

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: 963

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: 963

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: 963

[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: 673

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 ...