Search found 24 matches

by delt
Sun Dec 27, 2020 9:25 pm
Forum: C++ Development
Topic: Loading translation (.mo) file directly
Replies: 1
Views: 118

Loading translation (.mo) file directly

Hello everyone, Is it possible to load a translation index by referencing the file directly, or (even better) passing pointer/length of the data? For a few small projects i'd like to have my translations directly embedded into the executable, and not have to rely on system configuration / OS directo...
by delt
Mon Apr 22, 2019 8:15 pm
Forum: C++ Development
Topic: Why are backgrounds of windows ugly, dark grey on Windows? I want them like my dialog boxes.
Replies: 9
Views: 1553

Re: Why are backgrounds of windows ugly, dark grey on Windows? I want them like my dialog boxes.

Obviously, you can set wxFrame's background to any color you wish with SetBackgroundColour() and you should be able to obtain the "panel" color with wxSystemSettings::GetColour(wxSYS_COLOUR_FRAMEBK). I found this is the best way to solve this problem. The docs state that the "ideal" way would be to...
by delt
Mon Apr 22, 2019 7:21 pm
Forum: Compiler / Linking / IDE Related
Topic: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches
Replies: 9
Views: 1131

Re: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches

Looks OK, the string is as it's supposed to be, so i don't think it's stack corruption. On x86_64 the stack still grows "downward" like in the old days, right? (ie. SP register is decremented when pushing stack frames) In the last 10 years or so, i've assumed this was the case but never actually mad...
by delt
Mon Apr 22, 2019 5:30 pm
Forum: Compiler / Linking / IDE Related
Topic: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches
Replies: 9
Views: 1131

Re: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches

Ok, next hurdle in porting this app... under windows, trying to copy a wxString.c_str () to a char [] buffer, ie. char buf [4096]; wxString s = some_func_returning_a_wxString (); strncpy (buf, s.c_str (), 4096); causes a page fault: Unhandled exception: page fault on read access to 0x00000030 in 32-...
by delt
Mon Apr 22, 2019 1:40 pm
Forum: Compiler / Linking / IDE Related
Topic: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches
Replies: 9
Views: 1131

Re: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches

Thanks! Getting cmake to define _UNICODE to 1 as well as UNICODE fixed the problem.
by delt
Mon Apr 22, 2019 9:24 am
Forum: Compiler / Linking / IDE Related
Topic: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches
Replies: 9
Views: 1131

Re: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches

Thanks for your reply Doublemax - also apologies for posting this in the wrong section of the messageboard. I noticed you moved it here. I'm rebuilding the whole wx tree right now - incidentally, what should the UNICODE and _UNICODE constants be defined to, let's say for using normal UTF-8? Also a b...
by delt
Mon Apr 22, 2019 4:22 am
Forum: Compiler / Linking / IDE Related
Topic: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches
Replies: 9
Views: 1131

Re: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches

Oh forgot to mention, this is wxWidgets 3.1.2, i built the windows version without openGL support, and wxUSE_UNICODE seems to be defined in the headers installed by the makefile.
by delt
Mon Apr 22, 2019 4:15 am
Forum: Compiler / Linking / IDE Related
Topic: Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches
Replies: 9
Views: 1131

Cross-compiling for windows - errors about 'LPCTSTR' vs 'LPCSTR' and other mismatches

Hello everyone, it's been a while since i posted here. I'm having a problem compiling my app for windows (using mingw32 in MXE), i get several of the following errors just on the first source file. I vaguely remember solving something like this maybe 3 or 4 years ago, but i can't remember at all wha...
by delt
Sat Apr 22, 2017 2:11 am
Forum: C++ Development
Topic: Problem with starting to translate my UI
Replies: 1
Views: 435

Problem with starting to translate my UI

...so, i have a wxTranslations *tr as member of my app class... according to the docs, the following code should look for a fr.mo file somewhere in globalprefs->userdir: BP tr = new wxTranslations; wxTranslations::Set (tr); debug ("adding catalog prefix '%s'", globalprefs->userdir); wxFileTranslatio...
by delt
Sun Mar 05, 2017 4:20 am
Forum: C++ Development
Topic: Bug with hidden widgets on window creation/show
Replies: 2
Views: 671

Re: Bug with hidden widgets on window creation/show

Calling topmost_sizer->Layout () solves the problem with hidden widgets being placed in the wrong sizer, thanks very much for that tip. In another instance, in windows my widgets are taking only the top left 32 pixels of their tab page. Resizing the window "snaps" everything back into place, but cal...
by delt
Fri Mar 03, 2017 4:25 am
Forum: C++ Development
Topic: Bug with hidden widgets on window creation/show
Replies: 2
Views: 671

Bug with hidden widgets on window creation/show

If a widget is hidden when the window is shown/created, showing this widget afterwards seems to stick it at the top level of the window, even if it's supposed to be in a (different?) sizer. Calling Layout () on my window doesn't change it. Is this behaviour expected?
by delt
Tue Feb 28, 2017 7:57 am
Forum: C++ Development
Topic: wxBitmap: premultiply alpha?
Replies: 13
Views: 2007

Re: wxBitmap: premultiply alpha?

Should display a blue background with a red square that gradients in opacity from transparent (top) to opaque (bottom). Fails on windows (fully opaque red square) /* * compile & run: * g++ wxtest.cpp `wx-config --cflags --libs` -o wxtest && ./wxtest * * Should display a blue background with a red sq...
by delt
Tue Feb 28, 2017 12:37 am
Forum: C++ Development
Topic: wxBitmap: premultiply alpha?
Replies: 13
Views: 2007

Re: wxBitmap: premultiply alpha?

I'm having another similar problem with setting my pixel values with a wxAlphaPixelData::Iterator ...for some reason windows refuses to make them transparent, even if i set the alpha value to 0. It will always show up as opaque when i draw that image on another image with a wxMemoryDC. I tried all c...
by delt
Tue Feb 28, 2017 12:29 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 7288

Re: Multilingual application

I was meaning to also ask about this. I'm familiar with using gettext/libintl with non-wxWidgets projects, but how does it work with wxWidgets when it comes to redistributing/selecting .mo files? For example, is there a way to embed them in the executable, and not have to redistribute a whole direct...
by delt
Tue Feb 28, 2017 12:22 am
Forum: C++ Development
Topic: windows: ugly grey background/border in some widgets
Replies: 2
Views: 818

windows: ugly grey background/border in some widgets

I'm not sure what causes this, maybe it has to do with the "manifest" thing? How do i remove this ugly grey border/background that randomly appears on certain container widgets? winpieceofshit-greyborder.png Oh the status bar isn't a real wxStatusBar, it's just a static line with some widgets under ...