<?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[DC mit höherer auslösung als die des systems ?]]></title><description><![CDATA[<p>ich will ein bild in nen dc selecten, welches mehr pixel hat, als mein monitor...ich bekomm aber kein dc mit mehr pixeln !? GetDC(0) liefert ja nur n DC mit meiner auflösung! wie bekomm ich denn das mal hin ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/182530/dc-mit-höherer-auslösung-als-die-des-systems</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 15:07:17 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/182530.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 May 2007 04:58:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 04:58:27 GMT]]></title><description><![CDATA[<p>ich will ein bild in nen dc selecten, welches mehr pixel hat, als mein monitor...ich bekomm aber kein dc mit mehr pixeln !? GetDC(0) liefert ja nur n DC mit meiner auflösung! wie bekomm ich denn das mal hin ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292519</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292519</guid><dc:creator><![CDATA[pixartist]]></dc:creator><pubDate>Sat, 26 May 2007 04:58:27 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 06:19:20 GMT]]></title><description><![CDATA[<p>CreateCompatibleDC<br />
CreateCompatibleBitmap und das Bitmap in den DC selecten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292529</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292529</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Sat, 26 May 2007 06:19:20 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 18:02:43 GMT]]></title><description><![CDATA[<p>keksekekse schrieb:</p>
<blockquote>
<p>CreateCompatibleDC<br />
CreateCompatibleBitmap und das Bitmap in den DC selecten</p>
</blockquote>
<p>häääääää?<br />
CreateCompatibleDC mit welchem parameter??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292780</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292780</guid><dc:creator><![CDATA[pixartist]]></dc:creator><pubDate>Sat, 26 May 2007 18:02:43 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 18:51:11 GMT]]></title><description><![CDATA[<p>In etwa so:</p>
<pre><code class="language-cpp">const int iWidthRes  = 1200,
          iHeightRes = 1600;
HDC hdcScreen = GetDC(NULL);
HDC hdcMem = CreateCompatibleDC(hdcScreen);
HBITMAP hbmpPrev = static_cast&lt;HBITMAP&gt;(SelectObject(hdcMem, CreateCompatibleBitmap(hdcScreen, iWidthRes, iHeightRes)));
ReleaseDC(NULL, hdcScreen);

// ...
// ToDo: Irgendwas mit hdcMem machen...
// ...

// Clean-Up:
DeleteObject(SelectObject(hdcMem, hbmpPrev));
DeleteDC(hdcMem);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1292799</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292799</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 26 May 2007 18:51:11 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 19:18:18 GMT]]></title><description><![CDATA[<p>hm dann verstehe ich nicht wieso das nicht geht?</p>
<pre><code class="language-cpp">HBITMAP loadImg(char* path)
{
	if(HBITMAP ret = (HBITMAP)LoadImage(0,path,IMAGE_BITMAP,0,0,LR_LOADFROMFILE))
		return ret;
	else
		return NULL;

}
HDC getScreenShot()
{
	return GetDC(0);
}
HBITMAP getBitmapScreenShot()
{
	HDC screen = getScreenShot();
	HDC hdcCompatible = CreateCompatibleDC(screen); 
	HBITMAP screenBitmap = CreateCompatibleBitmap(screen, GetDeviceCaps(screen, HORZRES), GetDeviceCaps(screen, VERTRES));
	SelectObject(hdcCompatible, screenBitmap);
	BitBlt(hdcCompatible,0,0, GetDeviceCaps(screen, HORZRES), GetDeviceCaps(screen, VERTRES), screen, 0,0,SRCCOPY) ;
	return screenBitmap;
}
HDC getBitmapHDC(HBITMAP img)
{
	HDC hdcImage = CreateCompatibleDC(GetDC(0));
	SelectObject(hdcImage,img);
	return hdcImage;
}
SIZE getBitmapSize(HBITMAP img)
{

	BITMAP imgInfo;
	GetObject(img, sizeof(BITMAP), (LPSTR)&amp;imgInfo);
	SIZE ret;
	ret.cx = imgInfo.bmWidth;
	ret.cy = imgInfo.bmHeight;
	return ret;
}
HDC getHDCScaled(float xscale, float yscale, HDC source)
{
	HDC hdcScaled = CreateCompatibleDC(getScreenShot()); 
	HBITMAP hbmScaled = CreateCompatibleBitmap(source, 
                    GetDeviceCaps(source, HORZRES) * xscale, 
                    GetDeviceCaps(source, VERTRES) * yscale); 
	SelectObject(hdcScaled, hbmScaled);
	StretchBlt(hdcScaled, 
                     0, 0, 
                     GetDeviceCaps(source, HORZRES) * xscale,  GetDeviceCaps(source, VERTRES) * yscale, 
                     source, 
                     0, 0, 
                     GetDeviceCaps(source, HORZRES), GetDeviceCaps(source, VERTRES), 
                     SRCCOPY); 
	return hdcScaled;

}
</code></pre>
<pre><code class="language-cpp">hBitmap = loadImg(szFileName);
							GetObject (hBitmap, sizeof (BITMAP), &amp;bitmap) ;

							HDC scrShot = getBitmapHDC(hBitmap);
							hdcMem = getHDCScaled(1, 1, scrShot);
</code></pre>
<p>jetzt wird aber die bitmap nur so gross angezeigt, wie meine bildschirmauflösung ist</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292811</guid><dc:creator><![CDATA[pixartist]]></dc:creator><pubDate>Sat, 26 May 2007 19:18:18 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 19:57:07 GMT]]></title><description><![CDATA[<p>Du hast dein sxcale und yscale ja auch auf 1?</p>
<p>Wenn ich das richtig verstehe:</p>
<pre><code class="language-cpp">+--------------+   +--------+
|              |   | Screen |
|     Bild     |   +--------+
|              |
+--------------+
// Bild größer als Screen
</code></pre>
<p>Du lädst also die Bitmap mit sagen wir mal 1280x1024<br />
und hast nen Screen von sagen wir mal 800x600<br />
Also musst du das Bild kleiner StretchBlitten (Faktor 800/1280=0.625).<br />
Praktischerweise gibtst du bei StretchBlt() einfach das Quellrechteck und das Zielrechteck an und brauchst quasi nichts weiter als Größe der Quell- und Zielfläche.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292820</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292820</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Sat, 26 May 2007 19:57:07 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 20:53:00 GMT]]></title><description><![CDATA[<p>nein nein!<br />
ich will nicht ein grösseres bild verkleinern, um es ganz sehen zu können! ich will einen HDC, der mehr pixel fasst als mein bildschirm! versteht mich denn keiner? <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>
<pre><code>+---------------+
|               |
|    Screen     |
|               |
|               |
+---------------+

+---------------------------------------------+
|               |                             |
|               |                             |
|     Im DC     |                             |
|               |                             |
|---------------+                             |
|                  BILD                       |
|                                             |
|                                             |
|                                             |
|                                             |
+---------------------------------------------+
</code></pre>
<p>versteht ihr? im dc ist nur der bereich meines bildes, der so gross ist wie mein screen!</p>
<p>wenn ich jetzt in meinem programm zb an den rechten bildrand scrolle, dann</p>
<pre><code class="language-cpp">BitBlt (hdc, 0, 0, (winSize.cx-200), (winSize.cy-50), hdcMem, imgxp, imgyp, SRCCOPY) ;
</code></pre>
<p>ist die variable imgxp &gt; 0 und (winSize.cx-200) ist grösser als die bildbreite meines bildschirms...aber der teil des bildes, der im DC auf coordinaten liegt, die ausserhalb der auflösung meines bildschirms sind, wird nicht angezeigt!</p>
<p>dh ich hab dann folgendes:</p>
<pre><code>+---------------------------------------------+
|            |  |         |                   |
|            |  |         |                   |
|     Im DC  |  |Nicht sichtbar               |
|            |  |         |                   |
|------------+--+---------+                   |
|                  BILD                       |
|                                             |
|                                             |
|                                             |
|                                             |
+---------------------------------------------+
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1292854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292854</guid><dc:creator><![CDATA[pixartist]]></dc:creator><pubDate>Sat, 26 May 2007 20:53:00 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 21:17:47 GMT]]></title><description><![CDATA[<p>Ein MemoryDC (welches von CreateCompatibleDC() erzeugt wird) ist immer genauso groß wie die rein-selektierte Bitmap.<br />
getBitmapHDC() sollte quasi ein DC liefern, das so groß ist wie das img.</p>
<p>Bei getHDCScaled() erzeugst du aber immer nur so große Bitmaps wie der Screen groß ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292876</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292876</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Sat, 26 May 2007 21:17:47 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 21:39:42 GMT]]></title><description><![CDATA[<p>pixartist schrieb:</p>
<blockquote>
<p>versteht ihr? im dc ist nur der bereich meines bildes, der so gross ist wie mein screen!</p>
</blockquote>
<p>Wie kommst Du darauf ? Welcher dc ? Du hast zwei davon.</p>
<p>Eventuell mal prüfen, ob bei BitBlt () &quot;<a href="http://winSize.cx" rel="nofollow">winSize.cx</a>&quot;, &quot;<a href="http://winSize.cy" rel="nofollow">winSize.cy</a>&quot;, &quot;imgxp&quot; und &quot;imgyp&quot; korrekt hoch- und runtergezählt werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292890</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 26 May 2007 21:39:42 GMT</pubDate></item><item><title><![CDATA[Reply to DC mit höherer auslösung als die des systems ? on Sat, 26 May 2007 21:51:41 GMT]]></title><description><![CDATA[<p>ja ok war mein fehler in der resize methode</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292893</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292893</guid><dc:creator><![CDATA[pixartist]]></dc:creator><pubDate>Sat, 26 May 2007 21:51:41 GMT</pubDate></item></channel></rss>