<?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[GDI+ Frage]]></title><description><![CDATA[<p>Hi !</p>
<p>Ich benutze den folgenden Code um *.Png Bilder anzuzeigen:</p>
<pre><code class="language-cpp">bool TForm1::LoadPic2(AnsiString PicName,int x,int y)
{
  int L = PicName.WideCharBufSize();
  wchar_t *wStr = new wchar_t[L];
  PicName.WideChar(wStr, L);
  Gdiplus::Image* Img = new Gdiplus::Image(wStr);

  Gdiplus::Graphics gfx(GetWindowDC(Application-&gt;Handle));

  gfx.DrawImage(Img,x,y,64,64);
  delete Img;
  delete[] wStr;
  return true;
}
</code></pre>
<p>Das ganze funktioert auch, allerdings würde ich die Bilder gerne ohne Hintergrund (also transparenten Hintergrund) haben. Wenn ich die Form aber transparent setze wird gar nichts angezeigt.<br />
Kann mir jemand sagen wie ich ich das mache ? Danke !</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/110623/gdi-frage</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 15:46:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/110623.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 May 2005 07:42:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GDI+ Frage on Mon, 23 May 2005 07:42:52 GMT]]></title><description><![CDATA[<p>Hi !</p>
<p>Ich benutze den folgenden Code um *.Png Bilder anzuzeigen:</p>
<pre><code class="language-cpp">bool TForm1::LoadPic2(AnsiString PicName,int x,int y)
{
  int L = PicName.WideCharBufSize();
  wchar_t *wStr = new wchar_t[L];
  PicName.WideChar(wStr, L);
  Gdiplus::Image* Img = new Gdiplus::Image(wStr);

  Gdiplus::Graphics gfx(GetWindowDC(Application-&gt;Handle));

  gfx.DrawImage(Img,x,y,64,64);
  delete Img;
  delete[] wStr;
  return true;
}
</code></pre>
<p>Das ganze funktioert auch, allerdings würde ich die Bilder gerne ohne Hintergrund (also transparenten Hintergrund) haben. Wenn ich die Form aber transparent setze wird gar nichts angezeigt.<br />
Kann mir jemand sagen wie ich ich das mache ? Danke !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/793934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/793934</guid><dc:creator><![CDATA[Rick0]]></dc:creator><pubDate>Mon, 23 May 2005 07:42:52 GMT</pubDate></item></channel></rss>