<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[wchat_t]]></title><description><![CDATA[<p>Hallo,<br />
ich habe eine Frage zu wchar_t. Ich habe folgenden Code geschireben (Pdf = Adobe PDF als ActiveX)</p>
<pre><code>#include &lt;vcl.h&gt;
#pragma hdrstop
#include &lt;wchar.h&gt;
#include &quot;pdf.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link &quot;PdfLib_OCX&quot;
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
wchar_t *Datei;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
                Datei = L&quot;datei.pdf&quot;;
                Pdf1-&gt;LoadFile(L&quot;datei.pdf&quot;);
}
//---------------------------------------------------------------------------
</code></pre>
<p>Kappt auch alles wunder bar. wenn ich auf den button klicke wird die datei &quot;datei.pdf&quot; geöffnet. wie kann ich es aber nun hinbekommen das wenn ich auf den Button klicke ein OpdenDialog geöffnet wird und man dort die PDF Datei auswähelen kann? Ich Folgendes schon mal probiert, klappt aber nicht.</p>
<pre><code>if(OpenDialog1-&gt;Execute());
        {
                Datei = L&quot;OpenDialog1-&gt;FileName&quot;;
                Pdf1-&gt;LoadFile(L&quot;OpenDialog1-&gt;FileName&quot;);
        }
</code></pre>
<p>Ich hoffe mir kann jemand helfen. danke jezt schon einmal</p>
<p>MfG<br />
nicmar</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/76161/wchat_t</link><generator>RSS for Node</generator><lastBuildDate>Sun, 28 Jun 2026 19:55:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/76161.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Jun 2004 12:44:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wchat_t on Tue, 08 Jun 2004 12:44:02 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe eine Frage zu wchar_t. Ich habe folgenden Code geschireben (Pdf = Adobe PDF als ActiveX)</p>
<pre><code>#include &lt;vcl.h&gt;
#pragma hdrstop
#include &lt;wchar.h&gt;
#include &quot;pdf.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link &quot;PdfLib_OCX&quot;
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
wchar_t *Datei;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
                Datei = L&quot;datei.pdf&quot;;
                Pdf1-&gt;LoadFile(L&quot;datei.pdf&quot;);
}
//---------------------------------------------------------------------------
</code></pre>
<p>Kappt auch alles wunder bar. wenn ich auf den button klicke wird die datei &quot;datei.pdf&quot; geöffnet. wie kann ich es aber nun hinbekommen das wenn ich auf den Button klicke ein OpdenDialog geöffnet wird und man dort die PDF Datei auswähelen kann? Ich Folgendes schon mal probiert, klappt aber nicht.</p>
<pre><code>if(OpenDialog1-&gt;Execute());
        {
                Datei = L&quot;OpenDialog1-&gt;FileName&quot;;
                Pdf1-&gt;LoadFile(L&quot;OpenDialog1-&gt;FileName&quot;);
        }
</code></pre>
<p>Ich hoffe mir kann jemand helfen. danke jezt schon einmal</p>
<p>MfG<br />
nicmar</p>
]]></description><link>https://www.c-plusplus.net/forum/post/535961</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/535961</guid><dc:creator><![CDATA[nicmar]]></dc:creator><pubDate>Tue, 08 Jun 2004 12:44:02 GMT</pubDate></item><item><title><![CDATA[Reply to wchat_t on Tue, 08 Jun 2004 13:15:34 GMT]]></title><description><![CDATA[<p>Ungetestet:</p>
<pre><code class="language-cpp">Pdf1-&gt;LoadFile((WideString)OpenDialog1-&gt;FileName);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/535967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/535967</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Tue, 08 Jun 2004 13:15:34 GMT</pubDate></item><item><title><![CDATA[Reply to wchat_t on Tue, 08 Jun 2004 13:41:32 GMT]]></title><description><![CDATA[<p>Der Schönheit halber:</p>
<pre><code class="language-cpp">AnsiString asFilename = &quot;Test.pdf&quot;;
wchar_t* wcFilename;
int iSize = asFilename.WideCharBufSize();
wcFilename = new wchar_t(iSize + 1); // bin mir nicht sicher, ob + 1 nötig, kann aber nicht schaden...
asFilename.WideChar(wcFilename, iSize);
// Aktion mit wchar_t
delete wcFilename;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/535992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/535992</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 08 Jun 2004 13:41:32 GMT</pubDate></item></channel></rss>