<?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[Laufzeitfehler bei throw]]></title><description><![CDATA[<p>Hi,<br />
warum kommt beim folgenden Code ein Laufzeitefehler?</p>
<pre><code class="language-cpp">try
{
    HBITMAP hbm;
    hbm=(HBITMAP)LoadImage(NULL,lpfilename,IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);
    if(hbm==NULL)
    {
        throw(&quot;Could not load the bitmap!&quot;);
    }
}
catch(char* lpstr)
{
    MessageBox(hwnd,lpstr,&quot;Error&quot;,MB_OK|MB_ICONERROR);
    return false;
}
</code></pre>
<p>Hab es einmal ohne Try-Catch probiert und es ging.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/241743/laufzeitfehler-bei-throw</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 07:47:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/241743.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 May 2009 13:29:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Laufzeitfehler bei throw on Mon, 25 May 2009 13:29:14 GMT]]></title><description><![CDATA[<p>Hi,<br />
warum kommt beim folgenden Code ein Laufzeitefehler?</p>
<pre><code class="language-cpp">try
{
    HBITMAP hbm;
    hbm=(HBITMAP)LoadImage(NULL,lpfilename,IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);
    if(hbm==NULL)
    {
        throw(&quot;Could not load the bitmap!&quot;);
    }
}
catch(char* lpstr)
{
    MessageBox(hwnd,lpstr,&quot;Error&quot;,MB_OK|MB_ICONERROR);
    return false;
}
</code></pre>
<p>Hab es einmal ohne Try-Catch probiert und es ging.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715446</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715446</guid><dc:creator><![CDATA[GuardianOfLife]]></dc:creator><pubDate>Mon, 25 May 2009 13:29:14 GMT</pubDate></item><item><title><![CDATA[Reply to Laufzeitfehler bei throw on Mon, 25 May 2009 13:39:45 GMT]]></title><description><![CDATA[<blockquote>
<p>warum kommt beim folgenden Code ein Laufzeitefehler?</p>
</blockquote>
<p>Weil dein Bitmap nicht geladen werden konnte?</p>
<p>BTW: Bin mir nicht ganz sicher, aber solltest Du nicht <strong>const char</strong>* fangen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715454</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Mon, 25 May 2009 13:39:45 GMT</pubDate></item><item><title><![CDATA[Reply to Laufzeitfehler bei throw on Mon, 25 May 2009 13:44:16 GMT]]></title><description><![CDATA[<p><em>Merci</em>, das wars. Es lag daran, dass ich nicht const char* gefangen hab. So ging das Programm einfach weiter und verursachte, da hbm==NULL ist, einen Fehler in GetObject(hbm,sizeof(bm),&amp;bm);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715461</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715461</guid><dc:creator><![CDATA[GuardianOfLife]]></dc:creator><pubDate>Mon, 25 May 2009 13:44:16 GMT</pubDate></item><item><title><![CDATA[Reply to Laufzeitfehler bei throw on Mon, 25 May 2009 19:32:33 GMT]]></title><description><![CDATA[<p>Naja. Man soll halt auch keine Strings/char-Zeiger schmeissen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715665</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 25 May 2009 19:32:33 GMT</pubDate></item></channel></rss>