<?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[Drucken die 2.]]></title><description><![CDATA[<p>Hallo ich habe mir nen Quelltext für Drucken unter MFC zusammengebastelt</p>
<pre><code class="language-cpp">void CDrucken_im_DialogDlg::OnButton1() 
  {
    CPrintDialog dlgPrint(FALSE, PD_ALLPAGES, this);

    if(dlgPrint.DoModal()==IDOK)
    {

      CDC dcPrint;
      dcPrint.Attach(dlgPrint.GetPrinterDC());

      DOCINFO Print;
      Print.cbSize = sizeof(Print);
      Print.lpszDocName = &quot;drucktest für Vermietungsprogramm&quot;;
      Print.lpszOutput = NULL;
      Print.lpszDatatype = NULL;
      Print.fwType = NULL; 

      dcPrint.SetMapMode(MM_LOMETRIC);
      int nLaenge = dcPrint.GetDeviceCaps(VERTSIZE);
      int nBreite = dcPrint.GetDeviceCaps(HORZSIZE); 
      int nRechts = nBreite * 10 - 50;
      int nUnten = -nLaenge * 10 + 50;

      if(dcPrint.StartDoc(&amp;Print)&gt;=0)
      {

        dcPrint.StartPage();

        CString str_Textfeld;
        GetDlgItemText(IDC_DRUCKEN, str_Textfeld);
        dcPrint.TextOut(900, -100, str_Textfeld);

        dcPrint.TextOut(50, -500, &quot;Test &quot;);
        dcPrint.TextOut(50, -550, &quot;Test mit zeichen für Rechnung&quot;);

        dcPrint.MoveTo(50, -620);
        dcPrint.LineTo(nRechts, -620);
        dcPrint.MoveTo(50, -690);
        dcPrint.LineTo(nRechts, -690);
        dcPrint.MoveTo(50, -760);
        dcPrint.LineTo(nRechts, -760);

        dcPrint.EndPage();

        dcPrint.EndDoc();

        dcPrint.DeleteDC();

        MessageBox(&quot;ging&quot;, &quot;Info&quot;, MB_ICONEXCLAMATION);
      }

    }
    else
    MessageBox(&quot;ging nicht&quot;, &quot;Fehler!&quot;, MB_ICONEXCLAMATION);
  }
</code></pre>
<p>so aber ich möchte gern erst eine Datei Laden und dann den Inhalt Drucken oder halt den Pfad in nem Textfeld angeben ..allerdings hab ich kein Plan wie ich komm einfach nit drauf..hilfe wäre echt nett</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/145139/drucken-die-2</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 00:10:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/145139.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Apr 2006 11:00:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 11:00:53 GMT]]></title><description><![CDATA[<p>Hallo ich habe mir nen Quelltext für Drucken unter MFC zusammengebastelt</p>
<pre><code class="language-cpp">void CDrucken_im_DialogDlg::OnButton1() 
  {
    CPrintDialog dlgPrint(FALSE, PD_ALLPAGES, this);

    if(dlgPrint.DoModal()==IDOK)
    {

      CDC dcPrint;
      dcPrint.Attach(dlgPrint.GetPrinterDC());

      DOCINFO Print;
      Print.cbSize = sizeof(Print);
      Print.lpszDocName = &quot;drucktest für Vermietungsprogramm&quot;;
      Print.lpszOutput = NULL;
      Print.lpszDatatype = NULL;
      Print.fwType = NULL; 

      dcPrint.SetMapMode(MM_LOMETRIC);
      int nLaenge = dcPrint.GetDeviceCaps(VERTSIZE);
      int nBreite = dcPrint.GetDeviceCaps(HORZSIZE); 
      int nRechts = nBreite * 10 - 50;
      int nUnten = -nLaenge * 10 + 50;

      if(dcPrint.StartDoc(&amp;Print)&gt;=0)
      {

        dcPrint.StartPage();

        CString str_Textfeld;
        GetDlgItemText(IDC_DRUCKEN, str_Textfeld);
        dcPrint.TextOut(900, -100, str_Textfeld);

        dcPrint.TextOut(50, -500, &quot;Test &quot;);
        dcPrint.TextOut(50, -550, &quot;Test mit zeichen für Rechnung&quot;);

        dcPrint.MoveTo(50, -620);
        dcPrint.LineTo(nRechts, -620);
        dcPrint.MoveTo(50, -690);
        dcPrint.LineTo(nRechts, -690);
        dcPrint.MoveTo(50, -760);
        dcPrint.LineTo(nRechts, -760);

        dcPrint.EndPage();

        dcPrint.EndDoc();

        dcPrint.DeleteDC();

        MessageBox(&quot;ging&quot;, &quot;Info&quot;, MB_ICONEXCLAMATION);
      }

    }
    else
    MessageBox(&quot;ging nicht&quot;, &quot;Fehler!&quot;, MB_ICONEXCLAMATION);
  }
</code></pre>
<p>so aber ich möchte gern erst eine Datei Laden und dann den Inhalt Drucken oder halt den Pfad in nem Textfeld angeben ..allerdings hab ich kein Plan wie ich komm einfach nit drauf..hilfe wäre echt nett</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044734</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044734</guid><dc:creator><![CDATA[steve02]]></dc:creator><pubDate>Tue, 25 Apr 2006 11:00:53 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 11:06:47 GMT]]></title><description><![CDATA[<p>Wie würdest du es denn machen, wenn du die Datei nur in einem CView anzeigen wolltest?<br />
Für den Pfad gibt es übrigens CFileDialog. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044739</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044739</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Tue, 25 Apr 2006 11:06:47 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 11:46:52 GMT]]></title><description><![CDATA[<p>öhm CFileDialog ?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044764</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044764</guid><dc:creator><![CDATA[steve02]]></dc:creator><pubDate>Tue, 25 Apr 2006 11:46:52 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 12:41:11 GMT]]></title><description><![CDATA[<p>Was iritiert dich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044781</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044781</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Tue, 25 Apr 2006 12:41:11 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 13:14:48 GMT]]></title><description><![CDATA[<p>Du musst die Datei in dem Druckformular integrieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044814</guid><dc:creator><![CDATA[dokdok]]></dc:creator><pubDate>Tue, 25 Apr 2006 13:14:48 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 13:21:20 GMT]]></title><description><![CDATA[<p>dokdok schrieb:</p>
<blockquote>
<p>Du musst die Datei in dem Druckformular integrieren.</p>
</blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/10183">@dokdok</a>, estartu: Das ir<strong>r</strong>itiert mich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> jetzt aber. Was ist damit gemeint, bitte ? Ich würde dies mit einem extra Dateidialog <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /> , in diesem Fall (MFC) CFileDialog, implementieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044821</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044821</guid><dc:creator><![CDATA[C++-Programmmierer]]></dc:creator><pubDate>Tue, 25 Apr 2006 13:21:20 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 13:37:07 GMT]]></title><description><![CDATA[<p>Ich meine in der Druckfunktion mitreinschleppen .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044833</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044833</guid><dc:creator><![CDATA[dokdok]]></dc:creator><pubDate>Tue, 25 Apr 2006 13:37:07 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 13:47:32 GMT]]></title><description><![CDATA[<p>jezze bin ich total verwirrt ^^<br />
was is denn nun ne gute lößung ? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044841</guid><dc:creator><![CDATA[steve02(off)]]></dc:creator><pubDate>Tue, 25 Apr 2006 13:47:32 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 13:59:27 GMT]]></title><description><![CDATA[<p>Entweder ich habe deine Frage falsch verstanden dann ich entschuldige und kannst du, was ich sagte ignorieren ,oder ich erkläre es falsch.</p>
<p>Also innerhalb deiner Funktion OnButton1() du muss deine Datei öffnen und die Info raus holen und die platzieren auf die richtige Stelle in deiner Druckfunktion OnButton1() .</p>
<pre><code class="language-cpp">dcPrint.TextOut(50, -500, &quot;Was von der Datei gelese nwürde&quot;);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1044856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044856</guid><dc:creator><![CDATA[dokdok]]></dc:creator><pubDate>Tue, 25 Apr 2006 13:59:27 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 14:02:08 GMT]]></title><description><![CDATA[<p>Estartu ist auch die Expertin hier.<br />
Stimmt was ich gemeint habe?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044858</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044858</guid><dc:creator><![CDATA[dokdok]]></dc:creator><pubDate>Tue, 25 Apr 2006 14:02:08 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 16:28:00 GMT]]></title><description><![CDATA[<blockquote>
<p>oder halt den Pfad in nem Textfeld angeben</p>
</blockquote>
<p>Dadrauf bezog sich der CFileDialog. Der ist komfortabler als den Pfad einzugeben (aus Usersicht).</p>
<p>Sonst hat dokdok Recht, nur dass das Positionieren noch etwas knifflig werden könnte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1044970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1044970</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Tue, 25 Apr 2006 16:28:00 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Tue, 25 Apr 2006 17:10:32 GMT]]></title><description><![CDATA[<p>also habs ma getestet aber irgendwie hab ich jezze 33fehler -.-</p>
<p>hat mal einer kleines code beispiel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1045030</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1045030</guid><dc:creator><![CDATA[steve02(off)]]></dc:creator><pubDate>Tue, 25 Apr 2006 17:10:32 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Wed, 26 Apr 2006 06:15:01 GMT]]></title><description><![CDATA[<p>Zeig doch mal die Fehler und den Code. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
Vorkauen lassen ist doch doof, Fehler finden und beheben lernen is besser.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1045386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1045386</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Wed, 26 Apr 2006 06:15:01 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken die 2. on Wed, 26 Apr 2006 19:27:15 GMT]]></title><description><![CDATA[<p>ich habs ^^</p>
<p>habs mit shellexecute gemacht und über nen textfeld kann ich den pfad der datei angeben ..trotzdem danke alle</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1045961</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1045961</guid><dc:creator><![CDATA[steve02(off)]]></dc:creator><pubDate>Wed, 26 Apr 2006 19:27:15 GMT</pubDate></item></channel></rss>