<?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[Bild anzeigen]]></title><description><![CDATA[<p>Ich hoffe ich verärgere nicht viele Leute, weil das ganze schon tausend mal besprochen wurde... habe aber bis jetzt nichts gefunden was mir hilft...</p>
<p>Gibt es eine Möglichkeit ein Bild (.jpg) mit der WinAPI darzustellen? also ohne irgendwelche extrabibliotheken??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/219786/bild-anzeigen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 07:25:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/219786.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Aug 2008 15:41:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bild anzeigen on Thu, 07 Aug 2008 15:41:38 GMT]]></title><description><![CDATA[<p>Ich hoffe ich verärgere nicht viele Leute, weil das ganze schon tausend mal besprochen wurde... habe aber bis jetzt nichts gefunden was mir hilft...</p>
<p>Gibt es eine Möglichkeit ein Bild (.jpg) mit der WinAPI darzustellen? also ohne irgendwelche extrabibliotheken??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560949</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560949</guid><dc:creator><![CDATA[Argus Magnus]]></dc:creator><pubDate>Thu, 07 Aug 2008 15:41:38 GMT</pubDate></item><item><title><![CDATA[Reply to Bild anzeigen on Thu, 07 Aug 2008 15:52:53 GMT]]></title><description><![CDATA[<p>Die Win-Api kann mit Bildern im Format *.bmp umgehen. Wenn du keine Bibliotheken einsetzen willst, machen die meisten Bildbearbeitungsprogramme die Umwandlung von JPG nach BMP.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560954</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560954</guid><dc:creator><![CDATA[berniebutt]]></dc:creator><pubDate>Thu, 07 Aug 2008 15:52:53 GMT</pubDate></item><item><title><![CDATA[Reply to Bild anzeigen on Thu, 07 Aug 2008 16:12:09 GMT]]></title><description><![CDATA[<p>hmm... das ist zu umständlich, dann also doch mit bibliotheken...<br />
was kannst du/ihr mir empfehlen? Ich will ganz einfach fotos in einem Normalen Fenster darstellen, mer muss nicht gehen und es sollte relativ einfach sein... wenn möglich...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560966</guid><dc:creator><![CDATA[Argus Magnus]]></dc:creator><pubDate>Thu, 07 Aug 2008 16:12:09 GMT</pubDate></item><item><title><![CDATA[Reply to Bild anzeigen on Fri, 08 Aug 2008 21:24:03 GMT]]></title><description><![CDATA[<p>Mit IPicture kannst du laden jpg, gif, bmp...</p>
<pre><code class="language-cpp">#include &lt;olectl.h&gt;
HBITMAP LoadImg(WCHAR *path, int *lpWidth, int *lpHeight)
{
	HBITMAP outbm = 0;
	CoInitialize(NULL);
	IPicture *pic;
	if (!OleLoadPicturePath(path, 0, 0, 0, IID_IPicture, (void**)&amp;pic))
	{
		OLE_XPOS_HIMETRIC ole_w, ole_h;

		pic-&gt;get_Width(&amp;ole_w);
		pic-&gt;get_Height(&amp;ole_h);

		HDC deskdc = GetDC(NULL);
		HDC outdc = CreateCompatibleDC(deskdc);
		int w,h;
		w = MulDiv(ole_w, GetDeviceCaps(outdc, LOGPIXELSX), 2540);
		h = MulDiv(ole_h, GetDeviceCaps(outdc, LOGPIXELSY), 2540);
		if (lpWidth) *lpWidth=w;
		if (lpHeight) *lpHeight=h;

		// alloc new bitmap and render the image
		outbm = CreateCompatibleBitmap(deskdc, w,h);
		HGDIOBJ oldbm = SelectObject(outdc,outbm);
		pic-&gt;Render(outdc, 0,0,w,h,0, ole_h, ole_w, -ole_h, NULL);
		SelectObject(outdc,oldbm);

		ReleaseDC(NULL, deskdc);
		DeleteDC(outdc);
		pic-&gt;Release();
	}
	CoUninitialize();
	return outbm;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1561685</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1561685</guid><dc:creator><![CDATA[sapero]]></dc:creator><pubDate>Fri, 08 Aug 2008 21:24:03 GMT</pubDate></item></channel></rss>