Search found 446 matches

by mael15
Tue Aug 25, 2020 8:47 am
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 111

Re: changing a wxLocale object also changes wxFileDialog language

what part of my code has this global effect to change the wxFileDialog language? I thought I only change my documentationLocale?
by mael15
Mon Aug 24, 2020 6:21 pm
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 111

Re: changing a wxLocale object also changes wxFileDialog language

The language of the native dialogs is tighly bound to the locale of the application, i don't think there is anything you can do about it. Can't you change the locale only during the generation of the PDFs and switch back afterwards? switching back would have to take place often because I also have ...
by mael15
Mon Aug 24, 2020 12:55 pm
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 111

changing a wxLocale object also changes wxFileDialog language

My program can create pdfs in different languages. I store the selected language in a wxLocale *documentationLocale object and change it with this code: bool wxTranslationHelperCustom::applyNewDocuLanguage(wxLanguage selLang) { if (GetDocuLocale() && (wxLanguage)GetDocuLocale()->GetLanguage() == sel...
by mael15
Fri Aug 21, 2020 1:01 pm
Forum: C++ Development
Topic: Button held down
Replies: 5
Views: 1280

Re: Button held down

I there still no easy way to repeat a function call as long as the user holds down the mouse button? Still have to use a wxTimer?
by mael15
Sun Jul 26, 2020 10:57 am
Forum: C++ Development
Topic: prevent user from entering non ISO-8859-1 characters
Replies: 4
Views: 205

Re: prevent user from entering non ISO-8859-1 characters

What platform? What wx version? Did you look at validate sample to see if its easy enough to do? wxMSW, wx version 3.1.3. I looked into the docs and the validation sample and found it quite complicated to list every single valid character from ISO-8859-1 by hand and then use the include list with a...
by mael15
Sun Jul 26, 2020 7:52 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

Re: wxPDFDocument: bitmaps on consecutive pages

Tried it, works, thanx!! =D> :D
by mael15
Tue Jul 21, 2020 9:42 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

Re: wxPDFDocument: bitmaps on consecutive pages

The approach with a single wxPdfDC should work for you. Do I not have to set the page size in the wxPdfDC ctor?! wxPdfDC(&pdfDcmt, pageSzMM.x, pageSzMM.y); EDIT: appears like this is not optional. when I use the standard ctor the pages remain empty and this code results in the attached pdf: wxPdfDo...
by mael15
Tue Jul 21, 2020 9:35 am
Forum: C++ Development
Topic: prevent user from entering non ISO-8859-1 characters
Replies: 4
Views: 205

prevent user from entering non ISO-8859-1 characters

Hi, I would like to prevent the user from entering non ISO-8859-1 characters into a wxTextCtrl. First choice would be if one could use a wxTextValidator, i.e. like wxFILTER_ASCII only for ISO-8859-1? Would I have to create my own include list with all possible characters? Second option: somehow test...
by mael15
Tue Jul 21, 2020 9:04 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

Re: wxPDFDocument: bitmaps on consecutive pages

Looking at the uncompressed PDF file I see that both templates reference the same bitmap, namely the second of 2 bitmaps. In principle, it should not make a difference whether the bitmap is drawn directly or indirectly. Nevertheless, could you please show the code used to transfer the bitmaps to th...
by mael15
Tue Jul 21, 2020 6:50 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

Re: wxPDFDocument: bitmaps on consecutive pages

Are the bitmap images added through wxDC/wxPdfDC code? The first one is drawn directly on the wxPdfDC and the second one is first drawn on a wxMemoryDC and then the bitmap is copied to wxPdcDC. The problem is the same when I switch the page sequence. Here is the pdf without compression, thank you v...
by mael15
Mon Jul 20, 2020 2:28 pm
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

Re: wxPDFDocument: bitmaps on consecutive pages

but the template data are only saved once to the PDF. That seems to be the cause of my problem. Another use case is, if you want to create a graphics element using wxDC. Then you create a wxPdfDC in template mode and can use the graphics generated by the wxDC resp wxPdfDC class as a template. That ...
by mael15
Mon Jul 20, 2020 12:20 pm
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

Re: wxPDFDocument: bitmaps on consecutive pages

i there a documentation about when to use templates at all? I suspect I do not need them. It is so long ago that I started using them that I do not remember why I did it.
by mael15
Sun Jul 19, 2020 3:19 pm
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

Re: wxPDFDocument: bitmaps on consecutive pages

thanx, I know it is hard without the code, it just is so fragmented that hours of trying to create a minimal version did not work out. Yes, I use the template feature (not sure why though). is there an example of how to use it correctly?
by mael15
Sun Jul 19, 2020 11:13 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1061

wxPDFDocument: bitmaps on consecutive pages

Hi, I have a weird problem: two bitmaps are supposed to be copied on two consecutive pages, like this: twoPages.jpg but what actually happens is that the second bitmap uses the pixels of the first one. position and dimensions are correct, just not the data. this is the resulting pdf: https://drive.g...
by mael15
Thu Jul 16, 2020 5:45 pm
Forum: C++ Development
Topic: writing/reading uft-8 from special chars to a file
Replies: 3
Views: 204

Re: writing/reading uft-8 from special chars to a file

That was really helpful, thanx! I made some simple tests and it took some time but works now. I use libxml2 but had some old unnecessarily complicated details to clean up. It is surprisingly complicated how strings are converted and how to save, read and reverse it.