<?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[Probleme mit resourcen.]]></title><description><![CDATA[<p>Hi@all</p>
<p>ich möchte ein Bitmap in ein Projekt einbeziehen.<br />
dazu mache ich resource.h -&gt;</p>
<pre><code class="language-cpp">#define ID_IMAGE 000001
</code></pre>
<p>resource.rc</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &quot;resource.h&quot;

ID_IMAGE BITMAP &quot;image.bmp&quot;
</code></pre>
<p>dan in der main hab ich den header included.</p>
<p>fehler:</p>
<pre><code class="language-cpp">h:\c++\projects\winfaker\resource.rc(4) : error C2059: Syntaxfehler: 'Konstante'
</code></pre>
<p>was kann ich tun und wie kann ich das bild mit loadimage laden?<br />
danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/188653/probleme-mit-resourcen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Jul 2026 14:39:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/188653.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Aug 2007 16:44:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 16:44:55 GMT]]></title><description><![CDATA[<p>Hi@all</p>
<p>ich möchte ein Bitmap in ein Projekt einbeziehen.<br />
dazu mache ich resource.h -&gt;</p>
<pre><code class="language-cpp">#define ID_IMAGE 000001
</code></pre>
<p>resource.rc</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &quot;resource.h&quot;

ID_IMAGE BITMAP &quot;image.bmp&quot;
</code></pre>
<p>dan in der main hab ich den header included.</p>
<p>fehler:</p>
<pre><code class="language-cpp">h:\c++\projects\winfaker\resource.rc(4) : error C2059: Syntaxfehler: 'Konstante'
</code></pre>
<p>was kann ich tun und wie kann ich das bild mit loadimage laden?<br />
danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337499</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Thu, 02 Aug 2007 16:44:55 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 17:08:38 GMT]]></title><description><![CDATA[<p>//Edit total verpeilt... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337503</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337503</guid><dc:creator><![CDATA[gosha16]]></dc:creator><pubDate>Thu, 02 Aug 2007 17:08:38 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 16:58:29 GMT]]></title><description><![CDATA[<p>für das laden des Bildes</p>
<pre><code>CBitmap::LoadBitmap(IDB_BITMAP);
	CImageList::Create(x, x, ILC_COLOR(x), 3, 0);
	CImageList::Add(&amp;bitmap, RGB(cx, cx, cx));
</code></pre>
<p>für x trägst du jeweils die größe des image ein (4,16,32...)<br />
für cx bestimmst du die rot grün blau werte die zusammen die Farbe ergeben die transparent erscheinen soll</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337507</guid><dc:creator><![CDATA[LowFly]]></dc:creator><pubDate>Thu, 02 Aug 2007 16:58:29 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 17:37:22 GMT]]></title><description><![CDATA[<p>wie verpeilt?<br />
was ist mit dem kompiler-error?<br />
thx. sind die resourcen richtig?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337545</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Thu, 02 Aug 2007 17:37:22 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 18:50:55 GMT]]></title><description><![CDATA[<p>Load dir mal Dev Cpp runter da gibst ein Ball spiel bei den ordner Example - das ist eigenlich ganz einfach und noch nen tipp an alle anfänger: schreibt mal einfach so ne win_api ab (kleines fenter mit button) dann versteht ihr C++ und wie einfach es ist <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/1337586</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337586</guid><dc:creator><![CDATA[poltergeist]]></dc:creator><pubDate>Thu, 02 Aug 2007 18:50:55 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 18:56:55 GMT]]></title><description><![CDATA[<p>hallo?<br />
ich hab schon ma so ne fenster-exe gemacht.<br />
aber ich will jetzt wissen, wo der fehler in der resource liegt.<br />
ich hab noch nie mit resource-dateien gearbeitet.<br />
cu.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337590</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Thu, 02 Aug 2007 18:56:55 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 19:07:43 GMT]]></title><description><![CDATA[<p>in eine recourche kommen meist nur nen paar schane rein :</p>
<p>recource:</p>
<pre><code class="language-cpp">BALLBMP BITMAP &quot;ball.bmp&quot;
MASKBMP BITMAP &quot;ballmask.bmp&quot;
</code></pre>
<p>das ist von ein Ballspiel von DevCpp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337599</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337599</guid><dc:creator><![CDATA[poltergeist]]></dc:creator><pubDate>Thu, 02 Aug 2007 19:07:43 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Thu, 02 Aug 2007 19:11:50 GMT]]></title><description><![CDATA[<p>oh sorry :</p>
<p>mach doch einfach ohne recource <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="😉"
    /> funtz auch</p>
<p>code ist ausen forum (ka mehr voher)</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt; 

char* pcBmp = &quot;C:\\Bilder\\xyz.bmp&quot;; 
HINSTANCE hInst; 

LRESULT CALLBACK WindProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 

INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
LPSTR lpCmdLine, int nCmdShow) 
{ 
WNDCLASSEX WndCls; 
static char szAppName[] = &quot;Proggingmanias Simple Bitmap Window&quot;; 
MSG Msg; 

hInst = hInstance; 
WndCls.cbSize = sizeof(WndCls); 
WndCls.style = CS_OWNDC | CS_VREDRAW | CS_HREDRAW; 
WndCls.lpfnWndProc = WindProcedure; 
WndCls.cbClsExtra = 0; 
WndCls.cbWndExtra = 0; 
WndCls.hInstance = hInst; 
WndCls.hIcon = LoadIcon(NULL, IDI_APPLICATION); 
WndCls.hCursor = LoadCursor(NULL, IDC_ARROW); 
WndCls.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); 
WndCls.lpszMenuName = NULL; 
WndCls.lpszClassName = szAppName; 
WndCls.hIconSm = LoadIcon(hInstance, IDI_APPLICATION); 
RegisterClassEx(&amp;WndCls); 

CreateWindowEx(WS_EX_OVERLAPPEDWINDOW, 
szAppName, 
&quot;Proggingmanias Simple Bitmap Window&quot;, 
WS_OVERLAPPEDWINDOW | WS_VISIBLE, 
CW_USEDEFAULT, 
CW_USEDEFAULT, 
CW_USEDEFAULT, 
CW_USEDEFAULT, 
NULL, 
NULL, 
hInstance, 
NULL); 

while( GetMessage(&amp;Msg, NULL, 0, 0) ) 
{ 
TranslateMessage(&amp;Msg); 
DispatchMessage( &amp;Msg); 
} 

return (Msg.wParam); 
} 

LRESULT CALLBACK WindProcedure(HWND hWnd, UINT Msg, 
WPARAM wParam, LPARAM lParam) 
{ 
HDC hDC, MemDC; 
PAINTSTRUCT Ps; 
HBITMAP hbmp; 
char buf[256]; 

RECT r; 
GetWindowRect( hWnd, &amp;r ); 

switch(Msg) 
{ 
case WM_DESTROY: 
PostQuitMessage(WM_QUIT); 
break; 
case WM_PAINT: 
hDC = BeginPaint(hWnd, &amp;Ps); 

hbmp = (HBITMAP)LoadImage(NULL, pcBmp, IMAGE_BITMAP, 0, 0, 
LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE); 

if ( !hbmp ) 
{ 

MessageBox( hWnd, buf, &quot;Picture not found&quot;, MB_OK ); 
ExitProcess(1); 
} 

// Create a memory device compatible with the above DC variable 
MemDC = CreateCompatibleDC(hDC); 
// Select the new bitmap 
SelectObject(MemDC, hbmp); 

// Copy the bits from the memory DC into the current dc 
BitBlt(hDC, 0, 0, r.right, r.bottom, MemDC, 0, 0, SRCCOPY); 

// Restore the old bitmap 
DeleteDC(MemDC); 
DeleteObject(hbmp); 
EndPaint(hWnd, &amp;Ps); 
break; 

default: 
return DefWindowProc(hWnd, Msg, wParam, lParam); 
} 
return 0; 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1337604</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337604</guid><dc:creator><![CDATA[poltergeist]]></dc:creator><pubDate>Thu, 02 Aug 2007 19:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Fri, 03 Aug 2007 09:41:01 GMT]]></title><description><![CDATA[<p>ja ich habs ja schon ohne resourcen mit nem externen bmp.<br />
aber ich will WILL das aber mit resourcen unbedingt haben.<br />
sonst ist die exe nicht mehr so portabel.<br />
thx.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337957</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Fri, 03 Aug 2007 09:41:01 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Sat, 04 Aug 2007 14:39:29 GMT]]></title><description><![CDATA[<p>ja wie mach ich das jetz mit resourcen!!!<br />
thx.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1338693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338693</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Sat, 04 Aug 2007 14:39:29 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Sat, 04 Aug 2007 14:48:31 GMT]]></title><description><![CDATA[<p>erstell dir mit dem MFC ne resourcen.rc datei und füge sie in dein project ein. in der resourcen.h definierst du dann die entsprechenden resourcen.</p>
<p>evtl kuckste hier mal rein<br />
<a href="http://www.winapi.net/index.php?inhalt=t6" rel="nofollow">http://www.winapi.net/index.php?inhalt=t6</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1338695</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338695</guid><dc:creator><![CDATA[LowFly]]></dc:creator><pubDate>Sat, 04 Aug 2007 14:48:31 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit resourcen. on Mon, 06 Aug 2007 10:17:12 GMT]]></title><description><![CDATA[<p>guckmal ey ! man gibt dir 10 antworten und du : immer noch falsch! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>sei mal mit dem zufrieden das man dir gib <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339436</guid><dc:creator><![CDATA[poltergeist]]></dc:creator><pubDate>Mon, 06 Aug 2007 10:17:12 GMT</pubDate></item></channel></rss>