Search found 227 matches

by cutecode
Fri Jul 12, 2019 6:37 pm
Forum: wxCode
Topic: wxPdfDocument wich fonts can I use?
Replies: 8
Views: 94

Re: wxPdfDocument wich fonts can I use?

I changed my code to

Code: Select all

    {
        wxLogNull h;
        wxPdfFontManager::GetFontManager()->RegisterSystemFonts();
    }
and warnings are gone

THANK YOU
by cutecode
Fri Jul 12, 2019 6:33 pm
Forum: wxCode
Topic: wxPdfDocument wich fonts can I use?
Replies: 8
Views: 94

Re: wxPdfDocument wich fonts can I use?

I added to my code

Code: Select all

wxPdfFontManager::GetFontManager()->RegisterSystemFonts();
And now all fonts are drawn without '?'-sign. The PDF looks right on Debian too.
but after that I have plenty of warnings that some fonts can't be loaded.
by cutecode
Fri Jul 12, 2019 5:15 pm
Forum: wxCode
Topic: wxPdfDocument wich fonts can I use?
Replies: 8
Views: 94

Re: wxPdfDocument wich fonts can I use?

Just looked at my code.
Sorry not "Microsoft Sans Serif", the font is viwed as excpected when I use "Times New Roman", not ""Microsoft Sans Serif""
by cutecode
Fri Jul 12, 2019 4:44 pm
Forum: wxCode
Topic: wxPdfDocument wich fonts can I use?
Replies: 8
Views: 94

Re: wxPdfDocument wich fonts can I use?

The fonts foder does exist, I use fonts folder from source files, I'm I right? I have my own GridControl, wich has a drwaing faunction void CGrid::OnPrint(wxDC* pDC, int nPage, wxRect* rectDraw) Then I use wxPdfDC and send this pointer to my drwaing faunction wxPrintData printData = *g_printData; pr...
by cutecode
Fri Jul 12, 2019 2:48 pm
Forum: wxCode
Topic: wxPdfDocument wich fonts can I use?
Replies: 8
Views: 94

wxPdfDocument wich fonts can I use?

Hi. With wxPdfDocument wich fonts can I use? In my project wxPdfDocument does not know "Arial" font, I see only '?' signes. But if I use 'Microsoft Sans Serif' font then PDF file looks as it expected. I added font path to variable, but in sane if(wxDirExists(fontPath)) wxSetEnv(_T("WXPDF_FONTPATH"),...
by cutecode
Mon Jun 17, 2019 9:33 pm
Forum: wxCode
Topic: wxPdfDocument joining 2 PDF files. Is it possible?
Replies: 6
Views: 461

Re: wxPdfDocument joining 2 PDF files. Is it possible?

thank you, I skoped to join 2 PDF files bool join_pdfs(LPCTSTR lpsz1, LPCTSTR lpszOut) { int tpl; wxPdfDocument pdf1; pdf1.SetCreationDate(wxDateTime(1, wxDateTime::Jan, 2017)); pdf1.SetCompression(true); int pages1 = pdf1.SetSourceFile(lpszOut); for (int i = 1; i <= pages1; i++) { double width = 0,...
by cutecode
Mon Jun 17, 2019 4:12 pm
Forum: wxCode
Topic: wxPdfDocument joining 2 PDF files. Is it possible?
Replies: 6
Views: 461

Re: wxPdfDocument joining 2 PDF files. Is it possible?

hello, I looked at templates.cpp file before posting.
There are only 2 example functions templates1() and templates2()
and both functions only open PDF file, add new page and then draw some image/text on new page.

Could you, please, give some hint?
by cutecode
Mon Jun 17, 2019 12:06 pm
Forum: wxCode
Topic: wxPdfDocument joining 2 PDF files. Is it possible?
Replies: 6
Views: 461

wxPdfDocument joining 2 PDF files. Is it possible?

hello

Can I import one PDF file at the end of the other using wxPdfDocument?


Thnk you
by cutecode
Thu Apr 25, 2019 7:18 pm
Forum: wxWidgets Development (Russian)
Topic: как правильно вернуть из DLL строку
Replies: 8
Views: 590

Re: как правильно вернуть из DLL строку

doublemax wrote:
Thu Apr 25, 2019 12:56 pm
EXE - yes,
but DLL can't use wxWidgets
But there is a wxString in that DLL code.

oooops, Yes it is.))))

But I want to solve this problem not using wxWidgets.

This is an intergration DLL for my program, for other programmers. Not sure all programers can use wxWidgets
by cutecode
Thu Apr 25, 2019 12:53 pm
Forum: wxWidgets Development (Russian)
Topic: как правильно вернуть из DLL строку
Replies: 8
Views: 590

Re: как правильно вернуть из DLL строку

doublemax wrote:
Thu Apr 25, 2019 12:31 pm
Does the calling function also use wxWidgets?
hi,

EXE - yes,
but DLL can't use wxWidgets

I've rewritten my code by allocating memory in EXE and passing this pointer to DLL

TY
by cutecode
Wed Apr 24, 2019 9:02 pm
Forum: wxWidgets Development (Russian)
Topic: как правильно вернуть из DLL строку
Replies: 8
Views: 590

Re: как правильно вернуть из DLL строку

ндаас,

походу у меня действительно разные версии alloc/free
придется все переделывать
СПС
by cutecode
Wed Apr 24, 2019 6:04 pm
Forum: wxWidgets Development (Russian)
Topic: как правильно вернуть из DLL строку
Replies: 8
Views: 590

как правильно вернуть из DLL строку

Имею свой exe-шник и свой DLL, который вызывается динамически мне надо вызвать функцию из DLL LONG_PTR __cdecl KKM_open(wchar_t** err) как правильно в переменную err "залить" строку символов? в самой DLL я делаю примерно так LONG_PTR __cdecl KKM_open(wchar_t** err) { wxString sz = getErrorDescriptio...
by cutecode
Fri Mar 29, 2019 10:53 am
Forum: C++ Development
Topic: wrong GetDPI()
Replies: 3
Views: 150

Re: wrong GetDPI()

doublemax wrote:
Fri Mar 29, 2019 10:11 am
get a tape measure :)
got it
width of monitor is 597mm
so its 597/25.4= 23.5 inches
resolution is 1920

so DPI is 1920/23.5 = 81.7 (82)

Thank you
by cutecode
Fri Mar 29, 2019 10:47 am
Forum: C++ Development
Topic: wrong GetDPI()
Replies: 3
Views: 150

Re: wrong GetDPI()

doublemax wrote:
Fri Mar 29, 2019 10:11 am
What does wxDisplay report?
hello

Code: Select all

	wxDisplay dc;
	wxString sz0;
	sz0.Printf(L"%dx%d", dc.GetPPI().x, dc.GetPPI().y);
	wxMessageBox(sz0);
the same result - "82x82"