<?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[Bitmap]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich habe zwei Fragen zum folgenden Quellcode, der eine Bitmap in einem Windows-<br />
fenster ausgibt:</p>
<p>#include &quot;stdafx.h&quot;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;afxwin.h&gt;</p>
<p>class CMeinHauptfenster : public CFrameWnd {<br />
public:<br />
CMeinHauptfenster();<br />
protected:<br />
afx_msg void OnPaint();<br />
DECLARE_MESSAGE_MAP();</p>
<p>};<br />
CMeinHauptfenster::CMeinHauptfenster() {<br />
Create(NULL, &quot;&quot;,WS_SYSMENU, rectDefault);</p>
<p>};<br />
void CMeinHauptfenster::OnPaint() {</p>
<p>CBitmap *pMeinBild = new CBitmap;<br />
pMeinBild-&gt;LoadBitmap(IDI_ICON1);</p>
<p>BITMAP bm;<br />
CPaintDC dc(this);<br />
CDC MeinDC;<br />
MeinDC.CreateCompatibleDC(NULL);<br />
MeinDC.SelectObject(pMeinBild);<br />
pMeinBild-&gt;GetObject(sizeof(bm), &amp;bm);</p>
<p>dc.BitBlt(10,10, bm.bmWidth, bm.bmHeight, &amp;MeinDC,15,15,SRCCOPY);</p>
<p>}<br />
BEGIN_MESSAGE_MAP(CMeinHauptfenster,CFrameWnd)<br />
ON_WM_PAINT()<br />
END_MESSAGE_MAP()</p>
<p>class CMeineAnwendung : public CWinApp {<br />
public:<br />
virtual BOOL InitInstance();<br />
};</p>
<p>BOOL CMeineAnwendung::InitInstance() {<br />
m_pMainWnd = new CMeinHauptfenster();<br />
m_pMainWnd -&gt; ShowWindow(SW_SHOW);</p>
<p>return TRUE;<br />
}<br />
CMeineAnwendung Programm;</p>
<p>/////////////////////////////////////////////////////////////////////</p>
<p>1. Frage:<br />
Wie wird eine zweite Bitmap über der alten erzeugt(ich hatte bei der zweiten<br />
an eine kleinere gedacht, also so, das die erste noch zu sehen ist).</p>
<p>2.Frage:<br />
Wie spreche ich die Parameter von der Funktion BitBlt separat an?(die<br />
Funktion BitBlt habe ich im Quellcode makiert.)</p>
<p>Vielen Dank schon mal im Vorraus!</p>
<p>Gruß Crabbe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/46671/bitmap</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 23:51:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/46671.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Aug 2003 17:18:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bitmap on Thu, 21 Aug 2003 17:18:37 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich habe zwei Fragen zum folgenden Quellcode, der eine Bitmap in einem Windows-<br />
fenster ausgibt:</p>
<p>#include &quot;stdafx.h&quot;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;afxwin.h&gt;</p>
<p>class CMeinHauptfenster : public CFrameWnd {<br />
public:<br />
CMeinHauptfenster();<br />
protected:<br />
afx_msg void OnPaint();<br />
DECLARE_MESSAGE_MAP();</p>
<p>};<br />
CMeinHauptfenster::CMeinHauptfenster() {<br />
Create(NULL, &quot;&quot;,WS_SYSMENU, rectDefault);</p>
<p>};<br />
void CMeinHauptfenster::OnPaint() {</p>
<p>CBitmap *pMeinBild = new CBitmap;<br />
pMeinBild-&gt;LoadBitmap(IDI_ICON1);</p>
<p>BITMAP bm;<br />
CPaintDC dc(this);<br />
CDC MeinDC;<br />
MeinDC.CreateCompatibleDC(NULL);<br />
MeinDC.SelectObject(pMeinBild);<br />
pMeinBild-&gt;GetObject(sizeof(bm), &amp;bm);</p>
<p>dc.BitBlt(10,10, bm.bmWidth, bm.bmHeight, &amp;MeinDC,15,15,SRCCOPY);</p>
<p>}<br />
BEGIN_MESSAGE_MAP(CMeinHauptfenster,CFrameWnd)<br />
ON_WM_PAINT()<br />
END_MESSAGE_MAP()</p>
<p>class CMeineAnwendung : public CWinApp {<br />
public:<br />
virtual BOOL InitInstance();<br />
};</p>
<p>BOOL CMeineAnwendung::InitInstance() {<br />
m_pMainWnd = new CMeinHauptfenster();<br />
m_pMainWnd -&gt; ShowWindow(SW_SHOW);</p>
<p>return TRUE;<br />
}<br />
CMeineAnwendung Programm;</p>
<p>/////////////////////////////////////////////////////////////////////</p>
<p>1. Frage:<br />
Wie wird eine zweite Bitmap über der alten erzeugt(ich hatte bei der zweiten<br />
an eine kleinere gedacht, also so, das die erste noch zu sehen ist).</p>
<p>2.Frage:<br />
Wie spreche ich die Parameter von der Funktion BitBlt separat an?(die<br />
Funktion BitBlt habe ich im Quellcode makiert.)</p>
<p>Vielen Dank schon mal im Vorraus!</p>
<p>Gruß Crabbe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/337937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/337937</guid><dc:creator><![CDATA[Crabbe]]></dc:creator><pubDate>Thu, 21 Aug 2003 17:18:37 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap on Thu, 21 Aug 2003 17:20:49 GMT]]></title><description><![CDATA[<p>siehe: <a href="http://www.henkessoft.de/mfc_einsteigerbuch_kapitel4.htm" rel="nofollow">http://www.henkessoft.de/mfc_einsteigerbuch_kapitel4.htm</a><br />
dort z.B. transparente Bitmap-Darstellung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/337938</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/337938</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Thu, 21 Aug 2003 17:20:49 GMT</pubDate></item></channel></rss>