<?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[Aufmal gibts nen &amp;quot;Stapelfehler&amp;quot;]]></title><description><![CDATA[<p>Hi</p>
<p>Hab hier ne ganz komische sache.<br />
Folgender code, hat schon tausendmal funktioniert, aber auf einmal stürtzt das Programm immer ab</p>
<pre><code>DX8_LD2D verursachte einen Stapelfehler in Modul DX8_LD2D.EXE bei 01b7:00406fe3.
Register:
EAX=001ac82c CS=01b7 EIP=00406fe3 EFLGS=00010202
EBX=00affad0 SS=01bf ESP=00affa68 EBP=00affa7c
ECX=00901a70 DS=01bf ESI=00008af4 FS=533f
EDX=00008b10 ES=01bf EDI=00affa84 GS=6667
Bytes bei CS:EIP:
83 09 00 2d 00 10 00 00 eb e9 29 c1 83 09 00 89
Stapelwerte:
00000000 004016d0 00affad0 00008af4 00affa84 00affa9c bff7363b 00000774 00000024 00000000 00affb10 8ace52e7 
000001bf 00affab0 bff94407 66678af4
</code></pre>
<p>&quot;DX8_LD2D.EXE&quot; ist natürlich meine Anwendung...</p>
<p>Hier der Code:</p>
<pre><code class="language-cpp">#define WindowTitle     &quot;dx8_LD2d&quot;
#define WindowClassName &quot;DDWinClass&quot;
HWND hwndmainwnd;

//------------------------------------------------------------------------------------------

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
  int msg_value = MessageBox(NULL, &quot;Soll wirklich gestartet werden?&quot;, &quot;dx8_LD2d&quot;, MB_ICONQUESTION | MB_YESNO);
  if(msg_value!=IDYES)return 0;

MSG      msg;
WNDCLASS wndclass_main;

if(!hPrevInstance)
{
  wndclass_main.style         = CS_HREDRAW | CS_VREDRAW;
  wndclass_main.lpfnWndProc   = WndProc_main;
  wndclass_main.cbClsExtra    = 0;
  wndclass_main.cbWndExtra    = 0;
  wndclass_main.hInstance     = hInstance;
  wndclass_main.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
  wndclass_main.hCursor       = LoadCursor(NULL, IDC_ARROW);
  wndclass_main.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
  wndclass_main.lpszMenuName  = NULL;
  wndclass_main.lpszClassName = WindowClassName;
  RegisterClass(&amp;wndclass_main);    
}
//Bis hier hin, kommt das Programm, bei CreateWindow stürtzt es ab :(
hwndmainwnd = CreateWindow(WindowClassName, WindowTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 
CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
ShowCursor(false);
ShowWindow  (hwndmainwnd, nCmdShow);  
UpdateWindow(hwndmainwnd);
//...
</code></pre>
<p>Hab schon den teil 1:1 aus meinem !Funktionierenem! backup kopiert, hilft aber auch nichts</p>
<p>Ich habe absolut nicht geändert...<br />
Woran kann das liegen, und wie bekomme ich das wieder zum laufen??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/108546/aufmal-gibts-nen-quot-stapelfehler-quot</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 06:40:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/108546.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Apr 2005 14:13:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Aufmal gibts nen &amp;quot;Stapelfehler&amp;quot; on Sat, 30 Apr 2005 14:14:31 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Hab hier ne ganz komische sache.<br />
Folgender code, hat schon tausendmal funktioniert, aber auf einmal stürtzt das Programm immer ab</p>
<pre><code>DX8_LD2D verursachte einen Stapelfehler in Modul DX8_LD2D.EXE bei 01b7:00406fe3.
Register:
EAX=001ac82c CS=01b7 EIP=00406fe3 EFLGS=00010202
EBX=00affad0 SS=01bf ESP=00affa68 EBP=00affa7c
ECX=00901a70 DS=01bf ESI=00008af4 FS=533f
EDX=00008b10 ES=01bf EDI=00affa84 GS=6667
Bytes bei CS:EIP:
83 09 00 2d 00 10 00 00 eb e9 29 c1 83 09 00 89
Stapelwerte:
00000000 004016d0 00affad0 00008af4 00affa84 00affa9c bff7363b 00000774 00000024 00000000 00affb10 8ace52e7 
000001bf 00affab0 bff94407 66678af4
</code></pre>
<p>&quot;DX8_LD2D.EXE&quot; ist natürlich meine Anwendung...</p>
<p>Hier der Code:</p>
<pre><code class="language-cpp">#define WindowTitle     &quot;dx8_LD2d&quot;
#define WindowClassName &quot;DDWinClass&quot;
HWND hwndmainwnd;

//------------------------------------------------------------------------------------------

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
  int msg_value = MessageBox(NULL, &quot;Soll wirklich gestartet werden?&quot;, &quot;dx8_LD2d&quot;, MB_ICONQUESTION | MB_YESNO);
  if(msg_value!=IDYES)return 0;

MSG      msg;
WNDCLASS wndclass_main;

if(!hPrevInstance)
{
  wndclass_main.style         = CS_HREDRAW | CS_VREDRAW;
  wndclass_main.lpfnWndProc   = WndProc_main;
  wndclass_main.cbClsExtra    = 0;
  wndclass_main.cbWndExtra    = 0;
  wndclass_main.hInstance     = hInstance;
  wndclass_main.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
  wndclass_main.hCursor       = LoadCursor(NULL, IDC_ARROW);
  wndclass_main.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
  wndclass_main.lpszMenuName  = NULL;
  wndclass_main.lpszClassName = WindowClassName;
  RegisterClass(&amp;wndclass_main);    
}
//Bis hier hin, kommt das Programm, bei CreateWindow stürtzt es ab :(
hwndmainwnd = CreateWindow(WindowClassName, WindowTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 
CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
ShowCursor(false);
ShowWindow  (hwndmainwnd, nCmdShow);  
UpdateWindow(hwndmainwnd);
//...
</code></pre>
<p>Hab schon den teil 1:1 aus meinem !Funktionierenem! backup kopiert, hilft aber auch nichts</p>
<p>Ich habe absolut nicht geändert...<br />
Woran kann das liegen, und wie bekomme ich das wieder zum laufen??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/779111</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/779111</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 30 Apr 2005 14:14:31 GMT</pubDate></item><item><title><![CDATA[Reply to Aufmal gibts nen &amp;quot;Stapelfehler&amp;quot; on Sat, 30 Apr 2005 14:38:40 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">if(!hPrevInstance)
  ...
else 
  &quot;geht weiter als wär nix passiert ??&quot;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/779135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/779135</guid><dc:creator><![CDATA[Redhead]]></dc:creator><pubDate>Sat, 30 Apr 2005 14:38:40 GMT</pubDate></item><item><title><![CDATA[Reply to Aufmal gibts nen &amp;quot;Stapelfehler&amp;quot; on Sat, 30 Apr 2005 14:44:02 GMT]]></title><description><![CDATA[<p>Hab das if weg gemacht, aber es kommt immer noch der selbe fehler <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>
]]></description><link>https://www.c-plusplus.net/forum/post/779137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/779137</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 30 Apr 2005 14:44:02 GMT</pubDate></item><item><title><![CDATA[Reply to Aufmal gibts nen &amp;quot;Stapelfehler&amp;quot; on Sat, 30 Apr 2005 15:28:28 GMT]]></title><description><![CDATA[<p>RedEagle schrieb:</p>
<blockquote>
<p>Hab das if weg gemacht</p>
</blockquote>
<p>Gut so.</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>hPrevInstance<br />
[in] Handle to the previous instance of the application. This parameter is always NULL.</p>
</blockquote>
<p>Erstmal solltest du den Rückgabewert von RegisterClass prüfen.<br />
Und dann schau dir mal deine WndProc_main Funktion an. Diese wird bei CreateWindow immerhin auch schon aufgerufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/779157</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/779157</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 30 Apr 2005 15:28:28 GMT</pubDate></item><item><title><![CDATA[Reply to Aufmal gibts nen &amp;quot;Stapelfehler&amp;quot; on Sat, 30 Apr 2005 18:45:00 GMT]]></title><description><![CDATA[<p>Es lag wirklich an einer Funkltion in der WndProc_main:</p>
<pre><code class="language-cpp">GetPrivateProfileString(ini_group, ini_item, &quot;NULL&quot;, ini_value, size, map_path);

//...

    Bitmap_object = DDLoadBitmap(lpDirectDraw, object, 20, 20); //lädt das bitmap
    SetRect(&amp;rBitmap_object, (X*20), (Y*20), ((X*20)+20), ((Y*20)+20)); //Koordinaten der bmp's                                    
    lpDDSBack-&gt;Blt(&amp;rBitmap_object, Bitmap_object, NULL, DDBLT_WAIT, NULL);//Hintergrund
</code></pre>
<p>Diese beiden Stelle werden 1200 mal Durchgefühert (um eine Map zu laden, die aus vielen 20×20 px großen Bitmaps besteht), liegts evtl daran??<br />
kann ich das denn dann irgendwie verbessern??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/779246</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/779246</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 30 Apr 2005 18:45:00 GMT</pubDate></item><item><title><![CDATA[Reply to Aufmal gibts nen &amp;quot;Stapelfehler&amp;quot; on Sat, 30 Apr 2005 18:50:26 GMT]]></title><description><![CDATA[<p>Habs zum laufen gebracht...<br />
Aus irgendeinem Grund lag's am Funktionskopf...<br />
Hab eine Klasse global gemacht, und schon gings...</p>
<p>DANKE <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/779250</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/779250</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 30 Apr 2005 18:50:26 GMT</pubDate></item></channel></rss>