<?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[Was ist das&#x2F;Was macht das ? ;-)]]></title><description><![CDATA[<p>Hallo zusammen, schönen gute Abend!</p>
<p>Ich habe hier folgenden Code gefunden:</p>
<pre><code class="language-cpp">HDC hDC = GetDC(hWnd);
int nHeight = -MulDiv(14, GetDeviceCaps(hDC, LOGPIXELSY), 72);
HFONT hFont = CreateFont(nHeight, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT(&quot;Arial&quot;));
ReleaseDC(hWnd, hDC);
</code></pre>
<p><strong>Mir ist alles einleuchtend, bis auf diese Zeile:</strong></p>
<pre><code class="language-cpp">int nHeight = -MulDiv(14, GetDeviceCaps(hDC, LOGPIXELSY), 72);
</code></pre>
<p>Was wird da berechnet ? Was soll das ? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Schonmal danke für Erklärungen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> !</p>
<p>Viele Grüße,<br />
GDI-Coder!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/178776/was-ist-das-was-macht-das</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 13:13:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/178776.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 14 Apr 2007 18:58:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Was ist das&#x2F;Was macht das ? ;-) on Sat, 14 Apr 2007 18:58:15 GMT]]></title><description><![CDATA[<p>Hallo zusammen, schönen gute Abend!</p>
<p>Ich habe hier folgenden Code gefunden:</p>
<pre><code class="language-cpp">HDC hDC = GetDC(hWnd);
int nHeight = -MulDiv(14, GetDeviceCaps(hDC, LOGPIXELSY), 72);
HFONT hFont = CreateFont(nHeight, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT(&quot;Arial&quot;));
ReleaseDC(hWnd, hDC);
</code></pre>
<p><strong>Mir ist alles einleuchtend, bis auf diese Zeile:</strong></p>
<pre><code class="language-cpp">int nHeight = -MulDiv(14, GetDeviceCaps(hDC, LOGPIXELSY), 72);
</code></pre>
<p>Was wird da berechnet ? Was soll das ? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Schonmal danke für Erklärungen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> !</p>
<p>Viele Grüße,<br />
GDI-Coder!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266135</guid><dc:creator><![CDATA[GDI-Coder]]></dc:creator><pubDate>Sat, 14 Apr 2007 18:58:15 GMT</pubDate></item><item><title><![CDATA[Reply to Was ist das&#x2F;Was macht das ? ;-) on Sat, 14 Apr 2007 19:25:07 GMT]]></title><description><![CDATA[<p><a href="http://www.willemer.de/informatik/windows/winfont.htm" rel="nofollow">http://www.willemer.de/informatik/windows/winfont.htm</a></p>
<p>Da wird Punkt in Pixel umgerechnet, MulDiv ist übrigens ein Makro (keine Funktion)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266147</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266147</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Sat, 14 Apr 2007 19:25:07 GMT</pubDate></item><item><title><![CDATA[Reply to Was ist das&#x2F;Was macht das ? ;-) on Sat, 14 Apr 2007 20:12:25 GMT]]></title><description><![CDATA[<p>keksekekse schrieb:</p>
<blockquote>
<p><a href="http://www.willemer.de/informatik/windows/winfont.htm" rel="nofollow">http://www.willemer.de/informatik/windows/winfont.htm</a></p>
<p>Da wird Punkt in Pixel umgerechnet, MulDiv ist übrigens ein Makro (keine Funktion)</p>
</blockquote>
<p>MulDiv ist eine Funktion! Siehe: <a href="http://msdn2.microsoft.com/en-us/library/aa383718.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/aa383718.aspx</a></p>
<p>MSDN schrieb:</p>
<blockquote>
<p><strong>The MulDiv function</strong> multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. The return value is rounded up or down to the nearest integer.</p>
</blockquote>
<p>@GDI-Coder: Vllt ist das noch interesant: <a href="http://wvware.sourceforge.net/caolan/mapmode.html" rel="nofollow">http://wvware.sourceforge.net/caolan/mapmode.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266174</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 14 Apr 2007 20:12:25 GMT</pubDate></item><item><title><![CDATA[Reply to Was ist das&#x2F;Was macht das ? ;-) on Sat, 14 Apr 2007 20:31:18 GMT]]></title><description><![CDATA[<p>CodeFinder schrieb:</p>
<blockquote>
<p>MulDiv ist eine Funktion!</p>
</blockquote>
<p>sogar eine assemblerfunktion.</p>
<pre><code>;----------------------------Module-Header------------------------------;
; Module Name: muldiv.asm
;
; (w * Numer) / Denom with correct rounding.
; 
; Created:
; Author:
;
; Copyright (c) 1985, 1986, 1987  Microsoft Corporation
;
; MulDiv(w, Numer, Denom) returns (w * Numer) / Denom rounded to the nearest
; integer.  A check is made so that division by zero is not attempted.
;-----------------------------------------------------------------------;
</code></pre>
<p><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/1266182</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266182</guid><dc:creator><![CDATA[vista]]></dc:creator><pubDate>Sat, 14 Apr 2007 20:31:18 GMT</pubDate></item></channel></rss>