Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
passing CString arguments to dll functions |
Post Reply ![]() |
Author | |
WendellSmith ![]() Beginner ![]() Joined: 10 Feb 14 Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() Posted: 10 Feb 14 at 3:32PM |
I am hoping this is easy -- Is there an easy way to convert a CString to the type required for the dll calls (wchar_t *)?
I have tried a bunch of things but not found the magic code :) CString Label = "xx"; ConvertedLabel = ??; // how to get the CString Label into a format to pass into functions? QP.DrawText(100, 500, ConvertedLabel); // this does not work. Does anyone have a suggestion how to do this? [we are using MSVC6] Thanks |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3530 |
![]() ![]() ![]() ![]() ![]() |
Hi Wendel!
Microsoft will help: I think there'll be a similar page in english, too ;-) Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Wendell,
Can you try calling QP.DrawTextA - 'A' is for the Ansi string version. It should get you started. Have you tried using CStringW ? Here is some code that compiles and runs in an VS2010 MFC project. if (QP->UnlockKey(_T("<<< insert license key here >>>")) == 1) { int ret; QP->AddTrueTypeFont(L"Wingdings", 0); QP->SetOrigin(1); QP->DrawText(100, 20, L"Hello World"); QP->SetTextSize(18); ret = QP->DrawText(100, 500, _T("Hello world")); ret = QP->SaveToFile(_T("HelloFromDLL.pdf")); CStringW filename = L"f:\\downloads\\1.pdf"; ret = QP->LoadFromFile(filename, L""); delete QP; } Andrew.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store