<?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[ListView mit einem Bitmap hinterlegen]]></title><description><![CDATA[<p>gude</p>
<p>bin jetzt schon am verzweifeln hab schon einiges gegoogelt finde aber nichts brauchbares... ich denk mal die möglichkeit wirds geben ein ListView mit nem Bild zu hinterlegen.</p>
<p>So wie ich das Problem erfolglos angegangen bin (habe mich der CustomDraw Methode angenommen):</p>
<pre><code class="language-cpp">void __fastcall TForm1::ListView1CustomDraw(TCustomListView *Sender,
	  const TRect &amp;ARect, bool &amp;DefaultDraw)
{
TRect myRect=ARect;
/* Abmessungen = unwichtig
myRect.left+=Width/4;
myRect.right+=Width/4;
myRect.top+=Height/4;
myRect.bottom+=Height/4;
*/
// myBK ist vom Typ TPicture und enthält das Bild
Sender-&gt;Canvas-&gt;CopyRect(ARect,myBK-&gt;Bitmap-&gt;Canvas,myRect);
DefaultDraw=false;
}
//---------------------------------------------------------------------------
</code></pre>
<p>hab auch noch im FormCreate das geändert nachdem sich nix getan hat:</p>
<pre><code class="language-cpp">ListView1-&gt;OwnerDraw=true;
</code></pre>
<p>tut sich aber net wirklich was... ich hoffe mir kann jemand helfen, hab von nen paar klassenkameraden gehört dass das forum top sein soll und immer schnell antworten kommen sollen <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="🙂"
    /><br />
wär toll wenn das hier jetzt zutrifft weil das beschäftigt mich jetzt... werd weiterbasteln, würd mich aber über unterstützung freuen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>MfG<br />
Neal</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/187335/listview-mit-einem-bitmap-hinterlegen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 16:52:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/187335.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Jul 2007 15:42:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ListView mit einem Bitmap hinterlegen on Wed, 18 Jul 2007 15:42:45 GMT]]></title><description><![CDATA[<p>gude</p>
<p>bin jetzt schon am verzweifeln hab schon einiges gegoogelt finde aber nichts brauchbares... ich denk mal die möglichkeit wirds geben ein ListView mit nem Bild zu hinterlegen.</p>
<p>So wie ich das Problem erfolglos angegangen bin (habe mich der CustomDraw Methode angenommen):</p>
<pre><code class="language-cpp">void __fastcall TForm1::ListView1CustomDraw(TCustomListView *Sender,
	  const TRect &amp;ARect, bool &amp;DefaultDraw)
{
TRect myRect=ARect;
/* Abmessungen = unwichtig
myRect.left+=Width/4;
myRect.right+=Width/4;
myRect.top+=Height/4;
myRect.bottom+=Height/4;
*/
// myBK ist vom Typ TPicture und enthält das Bild
Sender-&gt;Canvas-&gt;CopyRect(ARect,myBK-&gt;Bitmap-&gt;Canvas,myRect);
DefaultDraw=false;
}
//---------------------------------------------------------------------------
</code></pre>
<p>hab auch noch im FormCreate das geändert nachdem sich nix getan hat:</p>
<pre><code class="language-cpp">ListView1-&gt;OwnerDraw=true;
</code></pre>
<p>tut sich aber net wirklich was... ich hoffe mir kann jemand helfen, hab von nen paar klassenkameraden gehört dass das forum top sein soll und immer schnell antworten kommen sollen <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="🙂"
    /><br />
wär toll wenn das hier jetzt zutrifft weil das beschäftigt mich jetzt... werd weiterbasteln, würd mich aber über unterstützung freuen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>MfG<br />
Neal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1327900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327900</guid><dc:creator><![CDATA[Neal07]]></dc:creator><pubDate>Wed, 18 Jul 2007 15:42:45 GMT</pubDate></item><item><title><![CDATA[Reply to ListView mit einem Bitmap hinterlegen on Wed, 18 Jul 2007 16:27:32 GMT]]></title><description><![CDATA[<p>aus dem werde ich leider auch nicht richtig schlau:</p>
<p><a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-2674-and-highlight-is-listview.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-2674-and-highlight-is-listview.html</a></p>
<p>...</p>
<p>ich habe noch nie was mit ole gemacht (zumind. bewusst) könnte mir evtl. jemand sagen, was ich einbinden muss damit das klappt? im moment sieht das ganze bei mir so aus:</p>
<pre><code class="language-cpp">if (!ListView1-&gt;SetBkImage(&quot;..\\BK.bmp&quot;, TRUE, 100, 100))
AfxMessageBox(&quot;No Image&quot;);
ListView1-&gt;SetTextBkColor(CLR_NONE);
</code></pre>
<p>~[C++ Fehler] Unit1.cpp(42): E2316 'SetBkImage' ist kein Element von 'TListView'<br />
[C++ Fehler] Unit1.cpp(43): E2268 Aufruf der undefinierten Funktion 'AfxMessageBox'<br />
[C++ Fehler] Unit1.cpp(44): E2247 Zugriff auf '_fastcall TCustomListView::SetTextBkColor(TColor)' nicht möglich~</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1327921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327921</guid><dc:creator><![CDATA[Neal07]]></dc:creator><pubDate>Wed, 18 Jul 2007 16:27:32 GMT</pubDate></item><item><title><![CDATA[Reply to ListView mit einem Bitmap hinterlegen on Wed, 18 Jul 2007 16:42:10 GMT]]></title><description><![CDATA[<p>Hallo,<br />
also ein bild ins ListView bekommst du so:</p>
<pre><code class="language-cpp">void __fastcall TForm1::ListView1CustomDraw(TCustomListView *Sender,
      const TRect &amp;ARect, bool &amp;DefaultDraw)
{
Graphics::TBitmap *bmp;
bmp = new Graphics::TBitmap();

bmp-&gt;LoadFromFile(&quot;c:\\ordner\\ordner\\bild.bmp&quot;);
ListView1-&gt;Canvas-&gt;Draw(ARect.Left,ARect.Top,bmp);
delete bmp;
}
</code></pre>
<p>Und der Text dann mit DrawText();</p>
<p>Gruß;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1327930</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327930</guid><dc:creator><![CDATA[daniel23]]></dc:creator><pubDate>Wed, 18 Jul 2007 16:42:10 GMT</pubDate></item><item><title><![CDATA[Reply to ListView mit einem Bitmap hinterlegen on Wed, 18 Jul 2007 16:44:57 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Der Link behandelt MFC-Klassen. Das nützt dir direkt gar nichts.<br />
Irgendwo hatten wir mal einen Thread wo es um Hintergrundbilder in einem Listencontrol (DBGrid/StringGrid/ListView...). Leider habe ich den mit der bescheidenen Forensuche nicht gefunden.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1327931</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327931</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 18 Jul 2007 16:44:57 GMT</pubDate></item><item><title><![CDATA[Reply to ListView mit einem Bitmap hinterlegen on Wed, 18 Jul 2007 16:56:57 GMT]]></title><description><![CDATA[<p>also daniel 23 hat recht: es funktioniert und vielen Dank <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>akari hat natürlich auch recht... oje ist das peinlich ^^ ... aber trotzdem vielen dank <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>jetzt muss ich nur irgendwie das TPicture in nen Bitmap kriegen...</p>
<p>vielen dank nochmal, ging wirklich schnell <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/1327933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327933</guid><dc:creator><![CDATA[Neal07]]></dc:creator><pubDate>Wed, 18 Jul 2007 16:56:57 GMT</pubDate></item><item><title><![CDATA[Reply to ListView mit einem Bitmap hinterlegen on Wed, 18 Jul 2007 17:02:11 GMT]]></title><description><![CDATA[<p>Hallo</p>
<blockquote>
<p>jetzt muss ich nur irgendwie das TPicture in nen Bitmap kriegen...</p>
</blockquote>
<p>Die Frage ist wohl eher warum hast du überhaupt ein TBitmap? Nimm doch gleich ein TBitmap zum Laden de eigentlichen Bilddaten.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1327936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327936</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 18 Jul 2007 17:02:11 GMT</pubDate></item><item><title><![CDATA[Reply to ListView mit einem Bitmap hinterlegen on Wed, 18 Jul 2007 17:09:21 GMT]]></title><description><![CDATA[<p>hehe, hab ich auch jetzt so gelöst... bei TPicture hatte ich halt den Komfort das ich auch JPEG Dateien laden konnte ohne mir Sorgen über das Format machen zu müssen .. jetzt hab ich halt während der Laufzeit mal kurz ein TJPEGImage und muss das in mein Bitmap reinschieben... aber naja die hauptsache es funktioniert! Also vielen Dank nochmal <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1327943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1327943</guid><dc:creator><![CDATA[Neal07]]></dc:creator><pubDate>Wed, 18 Jul 2007 17:09:21 GMT</pubDate></item></channel></rss>