<?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[StretchBlt macht Zicken]]></title><description><![CDATA[<p>Hallo!<br />
Wieso gibt mir dieser COde kein Bild aus? wenn ich bei Render dc angebe kriege ich ein Bild ://</p>
<pre><code class="language-cpp">IPicture *m_bild;

		OleLoadPicturePath(m_logopath.AllocSysString(), 0, 0, 0, IID_IPicture,(void **)&amp;m_bild);

		HDC newDC;

		newDC = CreateCompatibleDC(dc);

		CRect rc; 
		GetClientRect(&amp;rc); 

		OLE_XSIZE_HIMETRIC width; 
		OLE_YSIZE_HIMETRIC height; 

		m_bild-&gt;get_Width(&amp;width); 
		m_bild-&gt;get_Height(&amp;height); 

		if(width &gt; 300 || height &gt; 400)
		{
			StretchBlt(newDC, 10,10,300,400,dc,10,10,width,height,SRCCOPY);
		}

		//m_bild-&gt;Render(dc, 100, 100, 50*96/2540, 50*96/2540, 0, 50, 50, -50, &amp;rc); 
		m_bild-&gt;Render(newDC, 25, 154, 300*96/2540, 400*96/2540, 0, 400, 300, -400, &amp;rc);
</code></pre>
<p>Danke</p>
<p>Kevin</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/49343/stretchblt-macht-zicken</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 21:24:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/49343.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Sep 2003 11:14:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to StretchBlt macht Zicken on Thu, 18 Sep 2003 11:14:42 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Wieso gibt mir dieser COde kein Bild aus? wenn ich bei Render dc angebe kriege ich ein Bild ://</p>
<pre><code class="language-cpp">IPicture *m_bild;

		OleLoadPicturePath(m_logopath.AllocSysString(), 0, 0, 0, IID_IPicture,(void **)&amp;m_bild);

		HDC newDC;

		newDC = CreateCompatibleDC(dc);

		CRect rc; 
		GetClientRect(&amp;rc); 

		OLE_XSIZE_HIMETRIC width; 
		OLE_YSIZE_HIMETRIC height; 

		m_bild-&gt;get_Width(&amp;width); 
		m_bild-&gt;get_Height(&amp;height); 

		if(width &gt; 300 || height &gt; 400)
		{
			StretchBlt(newDC, 10,10,300,400,dc,10,10,width,height,SRCCOPY);
		}

		//m_bild-&gt;Render(dc, 100, 100, 50*96/2540, 50*96/2540, 0, 50, 50, -50, &amp;rc); 
		m_bild-&gt;Render(newDC, 25, 154, 300*96/2540, 400*96/2540, 0, 400, 300, -400, &amp;rc);
</code></pre>
<p>Danke</p>
<p>Kevin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/356014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356014</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Thu, 18 Sep 2003 11:14:42 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Thu, 18 Sep 2003 18:04:18 GMT]]></title><description><![CDATA[<p>Die Parameter bei stretchBlt sind erstens föllig falsch.</p>
<p>Gruß Crabbe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/356320</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356320</guid><dc:creator><![CDATA[Crabbe]]></dc:creator><pubDate>Thu, 18 Sep 2003 18:04:18 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Thu, 18 Sep 2003 18:19:27 GMT]]></title><description><![CDATA[<ol>
<li></li>
</ol>
<p>völlig mit v<br />
2. kannst du mir sagen wieso?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/356331</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356331</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Thu, 18 Sep 2003 18:19:27 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Fri, 19 Sep 2003 06:52:48 GMT]]></title><description><![CDATA[<p>Vielleicht hilft das weiter:</p>
<p>CDC::StretchBlt</p>
<p>Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap if necessary to fit the dimensions of the destination rectangle.</p>
<pre><code class="language-cpp">BOOL StretchBlt(
   int x,
   int y,
   int nWidth,
   int nHeight,
   CDC* pSrcDC,
   int xSrc,
   int ySrc,
   int nSrcWidth,
   int nSrcHeight,
   DWORD dwRop 
);
</code></pre>
<p>Parameters<br />
x<br />
Specifies the x-coordinate (in logical units) of the upper-left corner of the destination rectangle.</p>
<p>y<br />
Specifies the y-coordinate (in logical units) of the upper-left corner of the destination rectangle.</p>
<p>nWidth<br />
Specifies the width (in logical units) of the destination rectangle.</p>
<p>nHeight<br />
Specifies the height (in logical units) of the destination rectangle.</p>
<p>pSrcDC<br />
Specifies the source device context.</p>
<p>xSrc<br />
Specifies the x-coordinate (in logical units) of the upper-left corner of the source rectangle.</p>
<p>ySrc<br />
Specifies the x-coordinate (in logical units) of the upper-left corner of the source rectangle.</p>
<p>nSrcWidth<br />
Specifies the width (in logical units) of the source rectangle.</p>
<p>nSrcHeight<br />
Specifies the height (in logical units) of the source rectangle.</p>
<p>dwRop</p>
<p>Specifies the raster operation to be performed. Raster operation codes define how GDI combines colors in output operations that involve a current brush, a possible source bitmap, and a destination bitmap. This parameter may be one of the following values:</p>
<p>BLACKNESS Turns all output black.<br />
DSTINVERT Inverts the destination bitmap.<br />
MERGECOPY Combines the pattern and the source bitmap using the Boolean AND operator.<br />
MERGEPAINT Combines the inverted source bitmap with the destination bitmap using the Boolean OR operator.<br />
NOTSRCCOPY Copies the inverted source bitmap to the destination.<br />
NOTSRCERASE Inverts the result of combining the destination and source bitmaps using the Boolean OR operator.<br />
PATCOPY Copies the pattern to the destination bitmap.<br />
PATINVERT Combines the destination bitmap with the pattern using the Boolean XOR operator.<br />
PATPAINT Combines the inverted source bitmap with the pattern using the Boolean OR operator. Combines the result of this operation with the destination bitmap using the Boolean OR operator.<br />
SRCAND Combines pixels of the destination and source bitmaps using the Boolean AND operator.<br />
SRCCOPY Copies the source bitmap to the destination bitmap.<br />
SRCERASE Inverts the destination bitmap and combines the result with the source bitmap using the Boolean AND operator.<br />
SRCINVERT Combines pixels of the destination and source bitmaps using the Boolean XOR operator.<br />
SRCPAINT Combines pixels of the destination and source bitmaps using the Boolean OR operator.<br />
WHITENESS Turns all output white.</p>
<p>Return Value<br />
Nonzero if the bitmap is drawn; otherwise 0.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/356535</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356535</guid><dc:creator><![CDATA[Plotter]]></dc:creator><pubDate>Fri, 19 Sep 2003 06:52:48 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Fri, 19 Sep 2003 10:02:52 GMT]]></title><description><![CDATA[<p>Ey das kann net sein, jetzt hab ichs mal mit BitBlt probiert, aber das Bitmap wird nichtmal angezeigt!! Wenn ich bei Render dc angebe, wird es angezeigt aber wenn ich es kopieren will nicht! Wieso!?</p>
<pre><code class="language-cpp">IPicture *m_bild;

		OleLoadPicturePath(m_logopath.AllocSysString(), 0, 0, 0, IID_IPicture,(void **)&amp;m_bild);

		HDC newDC;

		newDC = CreateCompatibleDC(dc);

		CRect rc; 
		GetClientRect(&amp;rc); 

		OLE_XSIZE_HIMETRIC width; 
		OLE_YSIZE_HIMETRIC height; 

		m_bild-&gt;get_Width(&amp;width); 
		m_bild-&gt;get_Height(&amp;height); 

		m_bild-&gt;Render(newDC, 0, 0, width*96/2540, height*96/2540, 0, height, width, -height, &amp;rc); 

		BitBlt(newDC, 0, 0, 454, 341, dc, 0, 0, SRCCOPY);
</code></pre>
<p>Kevin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/356629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356629</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Fri, 19 Sep 2003 10:02:52 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Fri, 19 Sep 2003 11:35:38 GMT]]></title><description><![CDATA[<p>Wohin soll StretchBlt denn was kopieren?</p>
<p>hdc ist doch nur ein Device Handle. Koordinaten sind nett, aber<br />
nicht ausreichend.</p>
<pre><code class="language-cpp">HDC hdcMem;

hdcMem= CreateCompatibleDC(hdc);
SelectObject(hdcMem,hBitmap);

StretchBlt(hdc,x,y,cx,cy,hdcMem,0,0,BitmapSize.cx,BitmapSize.cy,SRCCOPY);

DeleteDC(hdcMem);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/356688</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356688</guid><dc:creator><![CDATA[idefix]]></dc:creator><pubDate>Fri, 19 Sep 2003 11:35:38 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Fri, 19 Sep 2003 12:14:03 GMT]]></title><description><![CDATA[<p>Ja StretchBlt kopiert von einem HDC in den anderen!! Und das tue ich doch...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/356712</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356712</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Fri, 19 Sep 2003 12:14:03 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Fri, 19 Sep 2003 12:14:56 GMT]]></title><description><![CDATA[<p>hmm StretchBlt mag wohl nur Bitmaps..ich will aber einen HDC stretchen...wie mach ich das? wie krieg ich aus nem HDC ein BitmaP?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/356713</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/356713</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Fri, 19 Sep 2003 12:14:56 GMT</pubDate></item><item><title><![CDATA[Reply to StretchBlt macht Zicken on Tue, 23 Sep 2003 07:12:17 GMT]]></title><description><![CDATA[<p>Einen HDC stretchen??</p>
<p>Wie soll denn das aussehen?<br />
Wo für brauch man das denn?</p>
<p>Wenn ein DC angelegt wird, besteht er aus einem monochromen Pixel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/358597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/358597</guid><dc:creator><![CDATA[idefix]]></dc:creator><pubDate>Tue, 23 Sep 2003 07:12:17 GMT</pubDate></item></channel></rss>