<?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 mit MM_LOMETRIC]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich wollte mal ein bisschen das Drucken probieren:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;commdlg.h&gt;

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{

	PRINTDLG pd;

	pd.lStructSize=sizeof(PRINTDLG);
	pd.hwndOwner=NULL;
	pd.hDevMode=NULL;
	pd.hDevNames=NULL;
	pd.hDC=NULL;
	pd.Flags=PD_ALLPAGES|PD_COLLATE|PD_RETURNDC|PD_NOSELECTION;
	pd.nFromPage=0;
	pd.nToPage=0;
	pd.nMinPage=0;
	pd.nMaxPage=0;
	pd.nCopies=1;
	pd.hInstance=hInstance;
	pd.lCustData=0L;
	pd.lpPrintTemplateName=NULL;
	pd.lpSetupTemplateName=NULL;
	pd.lpfnPrintHook=NULL;
	pd.lpfnSetupHook=NULL;
	pd.hPrintTemplate=NULL;
	pd.hSetupTemplate=NULL;

	if(PrintDlg(&amp;pd))
	{

		SetMapMode(pd.hDC,MM_LOMETRIC);

		DOCINFO di={sizeof(DOCINFO),&quot;Das ist ein Druckobjekt&quot;};

		if(StartDoc(pd.hDC,&amp;di)&gt;0)
		{
			if(StartPage(pd.hDC)&gt;0)
			{

				Rectangle(pd.hDC,200,200,800,800);
				TextOut(pd.hDC,100,800,&quot;TEXT TEXT&quot;,9);

				if(EndPage(pd.hDC)&gt;0)
					EndDoc(pd.hDC);
			}
		}
	}

	return 0;
}
</code></pre>
<p>Dazu wollte ich logische Koordinaten verwenden, damit es auf jeden Drucker gleich aussieht und habe MM_LOMETRIC genommen. Allerdings zieht er das Blatt nur durch ohne irgendetwas draufzudrucken. Wenn ich dagegen MM_TEXT nehme, geht es, aber halt mit Pixeln, was ich nicht will. Kann mir jemand helfen? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>edit: sry, hab mich im Forum verguckt, bitte ins WinAPI schieben.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/102763/drucken-mit-mm_lometric</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 09:45:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/102763.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 Mar 2005 15:49:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Drucken mit MM_LOMETRIC on Tue, 01 Mar 2005 15:58:10 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich wollte mal ein bisschen das Drucken probieren:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;commdlg.h&gt;

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{

	PRINTDLG pd;

	pd.lStructSize=sizeof(PRINTDLG);
	pd.hwndOwner=NULL;
	pd.hDevMode=NULL;
	pd.hDevNames=NULL;
	pd.hDC=NULL;
	pd.Flags=PD_ALLPAGES|PD_COLLATE|PD_RETURNDC|PD_NOSELECTION;
	pd.nFromPage=0;
	pd.nToPage=0;
	pd.nMinPage=0;
	pd.nMaxPage=0;
	pd.nCopies=1;
	pd.hInstance=hInstance;
	pd.lCustData=0L;
	pd.lpPrintTemplateName=NULL;
	pd.lpSetupTemplateName=NULL;
	pd.lpfnPrintHook=NULL;
	pd.lpfnSetupHook=NULL;
	pd.hPrintTemplate=NULL;
	pd.hSetupTemplate=NULL;

	if(PrintDlg(&amp;pd))
	{

		SetMapMode(pd.hDC,MM_LOMETRIC);

		DOCINFO di={sizeof(DOCINFO),&quot;Das ist ein Druckobjekt&quot;};

		if(StartDoc(pd.hDC,&amp;di)&gt;0)
		{
			if(StartPage(pd.hDC)&gt;0)
			{

				Rectangle(pd.hDC,200,200,800,800);
				TextOut(pd.hDC,100,800,&quot;TEXT TEXT&quot;,9);

				if(EndPage(pd.hDC)&gt;0)
					EndDoc(pd.hDC);
			}
		}
	}

	return 0;
}
</code></pre>
<p>Dazu wollte ich logische Koordinaten verwenden, damit es auf jeden Drucker gleich aussieht und habe MM_LOMETRIC genommen. Allerdings zieht er das Blatt nur durch ohne irgendetwas draufzudrucken. Wenn ich dagegen MM_TEXT nehme, geht es, aber halt mit Pixeln, was ich nicht will. Kann mir jemand helfen? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>edit: sry, hab mich im Forum verguckt, bitte ins WinAPI schieben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/735211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/735211</guid><dc:creator><![CDATA[Possoko]]></dc:creator><pubDate>Tue, 01 Mar 2005 15:58:10 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken mit MM_LOMETRIC on Tue, 01 Mar 2005 17:59:00 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=437" rel="nofollow">Jansen</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">Borland C++ Builder (VCL/CLX)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/735331</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/735331</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 01 Mar 2005 17:59:00 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken mit MM_LOMETRIC on Tue, 01 Mar 2005 18:14:40 GMT]]></title><description><![CDATA[<blockquote>
<p>MM_LOMETRIC<br />
Each logical unit is mapped to 0.1 millimeter. Positive x is to the right; <strong>positive y is up</strong>.</p>
<p>MM_TEXT<br />
Each logical unit is mapped to one device pixel. Positive x is to the right; <strong>positive y is down</strong>.</p>
</blockquote>
<p>Ich denke, du musst folglich negative Y-Werte verwenden - wenn du den Ursprung nicht an das Ende der Seite verschiebst <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/735347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/735347</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Tue, 01 Mar 2005 18:14:40 GMT</pubDate></item><item><title><![CDATA[Reply to Drucken mit MM_LOMETRIC on Tue, 01 Mar 2005 18:45:50 GMT]]></title><description><![CDATA[<p>Achso, jetzt gehts erstmal, thx <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Aber was ich noch nicht verstehe ist, warum eine Schrift auf dem Bildschrim größer als auf dem Drucker erscheint. Das Maß ist doch angeblich &quot;logisch&quot; bei der Schrift (Punkt oder?). Ergo müsste es doch dann WYSIWYG sein, ist es aber nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/735366</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/735366</guid><dc:creator><![CDATA[Possoko]]></dc:creator><pubDate>Tue, 01 Mar 2005 18:45:50 GMT</pubDate></item></channel></rss>