<?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[DruckenDialog aufrufen und dann drucken in MFC]]></title><description><![CDATA[<p>Ich habe in einer Klasse eine Methode geschrieben, die mir einige Daten, auf den LPT1-Drucker schiebt. Das ist die Funktion:</p>
<pre><code class="language-cpp">/* ========== Print_HeaderInformation ========== */
// Return Values
// 1 = Couldnt Find Printer on LPT1
// 0 = Everything worked fine
// --------------------------------
// Parameters   &quot;1&quot; means &quot;Print&quot; - &quot;0&quot; means &quot;Do Not Print&quot;
// one = Bitrate
// two = Channel Format
// three = Frequency
// four = Layer
// five = Emphasis
// six = Original
// seven = Copyright
// eight = Private Bit
// nine = Protection Bit
// ten = Padding Bit
// eleven = Header Location
// kickpaper = Throws The Sheet of Paper Outta The Printer 
/**/
/**/    short int Print_HeaderInformation( short int one,
/**/                short int two,
/**/                short int three, 
/**/                short int four,
/**/                short int five,
/**/                short int six,
/**/                short int seven,
/**/                short int eight,
/**/                short int nine,
/**/                short int ten,
/**/                short int eleven,
/**/                short int kickpaper)
/**/    {
/**/        char buffer[30];
/**/        FILE * PrinterPointer;
/**/        if (NULL == (PrinterPointer = fopen(&quot;LPT1&quot;,&quot;w&quot;)))
/**/        return( 1 );
/**/        else
/**/        {
/**/            if(one == 1)
/**/            {
/**/                _itoa( this-&gt;Get_Bitrate(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;\n\n\n\n\n\nBitrate:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            
/**/            if(two == 1)
/**/            {
/**/                switch(this-&gt;Get_ChannelFormat())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Stereo&quot;);   }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Joint Stereo&quot;); }   break;
/**/                    case 2: {   strcpy(buffer, &quot;Dual Channel&quot;); }   break;
/**/                    case 3: {   strcpy(buffer, &quot;Mono&quot;); }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Channel Format:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(three == 1)
/**/            {
/**/                _itoa( this-&gt;Get_Frequency(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;Frequency:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }   
/**/
/**/            if(four == 1)
/**/            {
/**/                _itoa( this-&gt;Get_Layer(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;Layer:\t\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(five == 1)
/**/            {
/**/                switch(this-&gt;Get_Emphasis())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;None&quot;); }   break;
/**/                    case 1: {   strcpy(buffer, &quot;50/15 ms&quot;); }   break;
/**/                    case 2: {   strcpy(buffer, &quot;Reserved&quot;); }   break;
/**/                    case 3: {   strcpy(buffer, &quot;CCIT J.17&quot;);    }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Emphasis:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);         
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            if(six == 1)
/**/            {
/**/                switch(this-&gt;Get_Original())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Copy&quot;); }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Original Media&quot;);   }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Original:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            if(seven == 1)
/**/            {
/**/                    switch(this-&gt;Get_Copyright())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Not Copyrighted&quot;);  }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Copyrighted&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Copyright:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);         
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(eight == 1)
/**/            {
/**/                switch(this-&gt;Get_Private())
/**/                {
/**/                case 0: {   strcpy(buffer, &quot;Not set&quot;);  }   break;
/**/                case 1: {   strcpy(buffer, &quot;Set&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Private Bit:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }   
/**/
/**/            if(nine == 1)
/**/            {
/**/                switch(this-&gt;Get_Protected())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Not set&quot;);  }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Set&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Protection Bit:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(ten == 1)
/**/            {
/**/                switch(this-&gt;Get_Padding())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Not set&quot;);  }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Set&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Padding Bit:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(eleven == 1)
/**/            {   _itoa( this-&gt;Get_HeaderLocation(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;Header Located:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            if(kickpaper == 1)
/**/            fprintf(PrinterPointer, &quot;\f&quot;);
/**/
/**/            fclose(PrinterPointer);
/**/            return( 0 );
/**/        }
/**/    }
/**/
/* ========== Print_HeaderInformation ========== */
</code></pre>
<p>Die is aber shice, ich mir zwar überlegt hatte dass ich NULL zurückbekomme wenn der Drucker nich da is, aber in real läuft das gar nicht. Deshlab will ich das jetzt über dieses Windows-Druckmenü machen. siehe Screenshot: <a href="http://mitglied.lycos.de/oxse/printer.JPG" rel="nofollow">http://mitglied.lycos.de/oxse/printer.JPG</a></p>
<p>Weiss jemand was ich dafür alles brauche und was ich dabei beachten muss?</p>
<p>[ Dieser Beitrag wurde am 22.06.2003 um 11:41 Uhr von <strong>Peter Piksa</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/6297/druckendialog-aufrufen-und-dann-drucken-in-mfc</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 10:02:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/6297.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Jun 2003 09:40:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DruckenDialog aufrufen und dann drucken in MFC on Sun, 22 Jun 2003 09:40:00 GMT]]></title><description><![CDATA[<p>Ich habe in einer Klasse eine Methode geschrieben, die mir einige Daten, auf den LPT1-Drucker schiebt. Das ist die Funktion:</p>
<pre><code class="language-cpp">/* ========== Print_HeaderInformation ========== */
// Return Values
// 1 = Couldnt Find Printer on LPT1
// 0 = Everything worked fine
// --------------------------------
// Parameters   &quot;1&quot; means &quot;Print&quot; - &quot;0&quot; means &quot;Do Not Print&quot;
// one = Bitrate
// two = Channel Format
// three = Frequency
// four = Layer
// five = Emphasis
// six = Original
// seven = Copyright
// eight = Private Bit
// nine = Protection Bit
// ten = Padding Bit
// eleven = Header Location
// kickpaper = Throws The Sheet of Paper Outta The Printer 
/**/
/**/    short int Print_HeaderInformation( short int one,
/**/                short int two,
/**/                short int three, 
/**/                short int four,
/**/                short int five,
/**/                short int six,
/**/                short int seven,
/**/                short int eight,
/**/                short int nine,
/**/                short int ten,
/**/                short int eleven,
/**/                short int kickpaper)
/**/    {
/**/        char buffer[30];
/**/        FILE * PrinterPointer;
/**/        if (NULL == (PrinterPointer = fopen(&quot;LPT1&quot;,&quot;w&quot;)))
/**/        return( 1 );
/**/        else
/**/        {
/**/            if(one == 1)
/**/            {
/**/                _itoa( this-&gt;Get_Bitrate(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;\n\n\n\n\n\nBitrate:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            
/**/            if(two == 1)
/**/            {
/**/                switch(this-&gt;Get_ChannelFormat())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Stereo&quot;);   }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Joint Stereo&quot;); }   break;
/**/                    case 2: {   strcpy(buffer, &quot;Dual Channel&quot;); }   break;
/**/                    case 3: {   strcpy(buffer, &quot;Mono&quot;); }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Channel Format:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(three == 1)
/**/            {
/**/                _itoa( this-&gt;Get_Frequency(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;Frequency:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }   
/**/
/**/            if(four == 1)
/**/            {
/**/                _itoa( this-&gt;Get_Layer(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;Layer:\t\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(five == 1)
/**/            {
/**/                switch(this-&gt;Get_Emphasis())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;None&quot;); }   break;
/**/                    case 1: {   strcpy(buffer, &quot;50/15 ms&quot;); }   break;
/**/                    case 2: {   strcpy(buffer, &quot;Reserved&quot;); }   break;
/**/                    case 3: {   strcpy(buffer, &quot;CCIT J.17&quot;);    }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Emphasis:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);         
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            if(six == 1)
/**/            {
/**/                switch(this-&gt;Get_Original())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Copy&quot;); }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Original Media&quot;);   }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Original:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            if(seven == 1)
/**/            {
/**/                    switch(this-&gt;Get_Copyright())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Not Copyrighted&quot;);  }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Copyrighted&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Copyright:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);         
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(eight == 1)
/**/            {
/**/                switch(this-&gt;Get_Private())
/**/                {
/**/                case 0: {   strcpy(buffer, &quot;Not set&quot;);  }   break;
/**/                case 1: {   strcpy(buffer, &quot;Set&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Private Bit:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }   
/**/
/**/            if(nine == 1)
/**/            {
/**/                switch(this-&gt;Get_Protected())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Not set&quot;);  }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Set&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Protection Bit:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(ten == 1)
/**/            {
/**/                switch(this-&gt;Get_Padding())
/**/                {
/**/                    case 0: {   strcpy(buffer, &quot;Not set&quot;);  }   break;
/**/                    case 1: {   strcpy(buffer, &quot;Set&quot;);  }   break;
/**/                }
/**/                fprintf(PrinterPointer,&quot;Padding Bit:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/
/**/            if(eleven == 1)
/**/            {   _itoa( this-&gt;Get_HeaderLocation(), buffer, 10 );
/**/                fprintf(PrinterPointer,&quot;Header Located:\t&quot;);
/**/                fprintf(PrinterPointer,buffer);
/**/                fprintf(PrinterPointer,&quot;\n&quot;);
/**/            }
/**/            if(kickpaper == 1)
/**/            fprintf(PrinterPointer, &quot;\f&quot;);
/**/
/**/            fclose(PrinterPointer);
/**/            return( 0 );
/**/        }
/**/    }
/**/
/* ========== Print_HeaderInformation ========== */
</code></pre>
<p>Die is aber shice, ich mir zwar überlegt hatte dass ich NULL zurückbekomme wenn der Drucker nich da is, aber in real läuft das gar nicht. Deshlab will ich das jetzt über dieses Windows-Druckmenü machen. siehe Screenshot: <a href="http://mitglied.lycos.de/oxse/printer.JPG" rel="nofollow">http://mitglied.lycos.de/oxse/printer.JPG</a></p>
<p>Weiss jemand was ich dafür alles brauche und was ich dabei beachten muss?</p>
<p>[ Dieser Beitrag wurde am 22.06.2003 um 11:41 Uhr von <strong>Peter Piksa</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30559</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30559</guid><dc:creator><![CDATA[Peter Piksa]]></dc:creator><pubDate>Sun, 22 Jun 2003 09:40:00 GMT</pubDate></item><item><title><![CDATA[Reply to DruckenDialog aufrufen und dann drucken in MFC on Sun, 22 Jun 2003 15:53:00 GMT]]></title><description><![CDATA[<p>HI<br />
Guck dir mal die Klasse CPrintDialog an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30560</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30560</guid><dc:creator><![CDATA[Ita12_Rafael]]></dc:creator><pubDate>Sun, 22 Jun 2003 15:53:00 GMT</pubDate></item><item><title><![CDATA[Reply to DruckenDialog aufrufen und dann drucken in MFC on Mon, 23 Jun 2003 04:19:00 GMT]]></title><description><![CDATA[<p>Steht alles in VC++ 6 in 21 Tagen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30561</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Mon, 23 Jun 2003 04:19:00 GMT</pubDate></item></channel></rss>