<?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[edit-box verursacht systemabsturtz]]></title><description><![CDATA[<p>Hi<br />
Ich hab in meinem Prog 3 Fenster, die sich ziehmlich ähnlich sehen (Ähnliche Elemente haben) -&gt; 2 Statics und ein Textfeld.<br />
In 2 Fenstern gehts, als ich aber das 3. Gemacht habe, Stürtzt mein System beim Start des Programms ab</p>
<p>zum Absturtz:<br />
2 mal Bluescreen, und dann ca 5 weiße Fehlermeldungen in denen was von Explorer.exe und Kernel32 steht. einmal stand sogar Zitat:&quot;Windows muss neu Installiert werden&quot;</p>
<p><strong>Ich habe inzwischen 2 Ungewöhnlichkeiten gefunden:</strong></p>
<p>Wenn ich in WM_PAINT des &quot;Kaputten&quot; Fensters eine Messagebox mache</p>
<pre><code class="language-cpp">MessageBox(NULL,&quot;&quot;,&quot;&quot;,MB_OK);
</code></pre>
<p>Wird diese MessageBox, beim öffnen der anderen beiden Fenster ebenfalls angezeigt, aber nicht nur einmal, sondern drei mal.</p>
<p><strong>UND</strong><br />
In diesem sonst Funktionierendem Fentster werden keine edit-felder mehr angezeigt.</p>
<p><em><strong>=&gt;</strong><br />
Es schein an den edit-boxen zu liegen, weil diese in den beiden &quot;heilen&quot; Fenstern nicht mehr angezeigt werden, und in dem &quot;kaputten&quot; Fenster zum Systemabsturtz führen</em></p>
<p>Befor ich das 3. Fenster bemacht habe, haben die anderen beiden Problemlos Funktioniert. Aber das 3. Fenster ist quase ne 1:1 Kopie der andern Beiden Fenstern, es wurden nur nen Paar Variable-namen geändert.</p>
<p>Was hab ich Falsch gemacht?? bzw, wie mache ich das wieder heile??</p>
<p>ps.: wer code braucht, meldet sich bitte, ich weiß überhaut nicht, wo der Fehler ist, und das gesammte Projekt ist &gt;1500 Zeilen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/102454/edit-box-verursacht-systemabsturtz</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 04:19:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/102454.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Feb 2005 08:59:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 08:59:17 GMT]]></title><description><![CDATA[<p>Hi<br />
Ich hab in meinem Prog 3 Fenster, die sich ziehmlich ähnlich sehen (Ähnliche Elemente haben) -&gt; 2 Statics und ein Textfeld.<br />
In 2 Fenstern gehts, als ich aber das 3. Gemacht habe, Stürtzt mein System beim Start des Programms ab</p>
<p>zum Absturtz:<br />
2 mal Bluescreen, und dann ca 5 weiße Fehlermeldungen in denen was von Explorer.exe und Kernel32 steht. einmal stand sogar Zitat:&quot;Windows muss neu Installiert werden&quot;</p>
<p><strong>Ich habe inzwischen 2 Ungewöhnlichkeiten gefunden:</strong></p>
<p>Wenn ich in WM_PAINT des &quot;Kaputten&quot; Fensters eine Messagebox mache</p>
<pre><code class="language-cpp">MessageBox(NULL,&quot;&quot;,&quot;&quot;,MB_OK);
</code></pre>
<p>Wird diese MessageBox, beim öffnen der anderen beiden Fenster ebenfalls angezeigt, aber nicht nur einmal, sondern drei mal.</p>
<p><strong>UND</strong><br />
In diesem sonst Funktionierendem Fentster werden keine edit-felder mehr angezeigt.</p>
<p><em><strong>=&gt;</strong><br />
Es schein an den edit-boxen zu liegen, weil diese in den beiden &quot;heilen&quot; Fenstern nicht mehr angezeigt werden, und in dem &quot;kaputten&quot; Fenster zum Systemabsturtz führen</em></p>
<p>Befor ich das 3. Fenster bemacht habe, haben die anderen beiden Problemlos Funktioniert. Aber das 3. Fenster ist quase ne 1:1 Kopie der andern Beiden Fenstern, es wurden nur nen Paar Variable-namen geändert.</p>
<p>Was hab ich Falsch gemacht?? bzw, wie mache ich das wieder heile??</p>
<p>ps.: wer code braucht, meldet sich bitte, ich weiß überhaut nicht, wo der Fehler ist, und das gesammte Projekt ist &gt;1500 Zeilen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732619</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 26 Feb 2005 08:59:17 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 09:34:18 GMT]]></title><description><![CDATA[<p>Ohne konkreten Code schwer zu sagen, aber kann es sein, dass du für die Fenster die selbe WndProc verwendest? Das würde zumindest das Verhalten mit MessageBox in WM_PAINT vielleicht erklären - wobei so ein Aufruf nicht gerade empfehlenswert ist, das WM_PAINT sehr oft gesendet wird und du damit dann meist in einer Endlosschleife endest <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/732626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732626</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sat, 26 Feb 2005 09:34:18 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 09:52:11 GMT]]></title><description><![CDATA[<p>Poste mal den Code zum Erstellen der Fenster und der Edits.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732635</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732635</guid><dc:creator><![CDATA[Anfänger14]]></dc:creator><pubDate>Sat, 26 Feb 2005 09:52:11 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 10:01:21 GMT]]></title><description><![CDATA[<p>Die MessageBox hab iczh da auch nur zu Testzwecken reingemacht UND NEIN, das sind völlig andere Proceduren:</p>
<pre><code class="language-cpp">wc_additem.lpfnWndProc = WndProc_AddItem;
//...
wc_edit.lpfnWndProc = WndProc_Edit;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/732637</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732637</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 26 Feb 2005 10:01:21 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 10:17:09 GMT]]></title><description><![CDATA[<p>Ich hab jetzt mal das &quot;Schlimme&quot; Fenster rausgenommen (Alles in /* */ gesetzt)<br />
Und schon funktionierte ALLES Perfekt...</p>
<p>Es liegt also NUR an diesem einen Fenster...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732645</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732645</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 26 Feb 2005 10:17:09 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 11:06:18 GMT]]></title><description><![CDATA[<p>Dann zeig doch mal das, was du auskommentiert hast - vielleicht hilft das ja schon weiter <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/732669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732669</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sat, 26 Feb 2005 11:06:18 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 11:15:31 GMT]]></title><description><![CDATA[<p>inna WinMain:</p>
<pre><code class="language-cpp">//...
wc_edit.style         = CS_HREDRAW | CS_VREDRAW; //CS = Class Style
wc_edit.lpfnWndProc   = WndProc_Edit;
wc_edit.cbClsExtra    = 0;
wc_edit.cbWndExtra    = 0;
wc_edit.hInstance     = hInstance;
wc_edit.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
wc_edit.hCursor       = LoadCursor(NULL, IDC_ARROW);
wc_edit.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
wc_edit.lpszMenuName  = NULL;
wc_edit.lpszClassName = szAppNameE;
//...
if(!RegisterClass(&amp;wc_edit))    bRegisterClassFailed = true;
//...
hWnd_edit    = CreateWindow(szAppNameE,  szAppName, WS_CAPTION, 100, 120, 400, 195, NULL, NULL, hInstance, NULL);
//...
ShowWindow(hWnd_edit, SW_HIDE);
UpdateWindow(hWnd_edit);
</code></pre>
<p>und die komplette WndProc:</p>
<pre><code class="language-cpp">LRESULT CALLBACK WndProc_Edit(HWND hWnd, UINT messageE, WPARAM wParam, LPARAM lParam)
{
  PAINTSTRUCT    ps;
  HDC            hDC;
  HFONT          hFontE;
  static HWND    hwndStaticOK, hwndStaticABBRECHEN;
  static HANDLE  hIconOK, hIconABBRECHEN;

 switch (messageE)
 {
      case WM_CREATE:
      {
       hWndTXTKommentar = CreateWindow(&quot;edit&quot;, &quot;&quot;, WS_CHILD | WS_VISIBLE | ES_WANTRETURN , 105, 40, 180, 17, hWnd, (HMENU) 13315, (HINSTANCE) GetWindowLong (hWnd, GWL_HINSTANCE), NULL);

       hFontE = CreateFont(15, 0, 0, 0, 0, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, FF_DONTCARE | DEFAULT_PITCH, TEXT(&quot;Courier New&quot;));
       SendMessage(hWndTXTKommentar, WM_SETFONT, (WPARAM)hFontE, 0);  

       hIconOK = LoadImage(GetModuleHandle(NULL), &quot;Bitmaps\\bmpOK.bmp&quot;, IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR | LR_LOADFROMFILE);
       hwndStaticOK = CreateWindow(&quot;STATIC&quot;, &quot;&quot;, WS_CHILD | SS_NOTIFY | WS_VISIBLE | SS_BITMAP, 16, 135, 27, 17, hWnd, (HMENU)ID_eOK, (HINSTANCE) GetWindowLong (hWnd, GWL_HINSTANCE), NULL);
       SendMessage(hwndStaticOK, STM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM)(HANDLE) hIconOK);

       hIconABBRECHEN = LoadImage(GetModuleHandle(NULL), &quot;Bitmaps\\bmpAB.bmp&quot;, IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR | LR_LOADFROMFILE);
       hwndStaticABBRECHEN = CreateWindow(&quot;STATIC&quot;, &quot;&quot;, WS_CHILD | SS_NOTIFY | WS_VISIBLE | SS_BITMAP, 49, 135, 80, 17, hWnd, (HMENU)ID_eABBRECHEN, (HINSTANCE) GetWindowLong (hWnd, GWL_HINSTANCE), NULL);
       SendMessage(hwndStaticABBRECHEN, STM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM)(HANDLE) hIconABBRECHEN);    

       break;
      }
      case WM_PAINT: //---------------------------------------------------------
      {

         hDC = BeginPaint(hWnd, &amp;ps);
         {         
          DrawBorder_E(hDC, hWnd);

          color tc; 
          color bg;
          font Schrift;

           tc.init(0,255,0);
           bg.init(0,0,0);
           Schrift.init(15,0,false,false,false,&quot;Courier New&quot;);
            output(hDC, hWnd, 10, 8, Schrift, tc, bg, &quot;Kommentar bearbeiten:&quot;);
         }
         EndPaint(hWnd, &amp;ps);
         break;
      }
      case WM_COMMAND: 
      {
         switch(LOWORD(wParam)) //Wenn auf ein Icon geklickt wurde:
         {
           case ID_eOK: 
           {

            ShowWindow(hWnd, SW_HIDE);
            break;
           }
           case ID_eABBRECHEN:
           {
            ShowWindow(hWnd, SW_HIDE);
            break;
           }
         }
       break;
      }  
 } 
 return DefWindowProc(hWnd, messageE, wParam, lParam);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/732676</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732676</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 26 Feb 2005 11:15:31 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 13:17:48 GMT]]></title><description><![CDATA[<p>Ein Programm, das im Usermode läuft kann, keine BlueScreens verursachen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732747</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Sat, 26 Feb 2005 13:17:48 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 13:28:24 GMT]]></title><description><![CDATA[<p>Unter Win 95/98 bestimmt. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/732755</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732755</guid><dc:creator><![CDATA[bluescreen-fanatiker]]></dc:creator><pubDate>Sat, 26 Feb 2005 13:28:24 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 16:07:12 GMT]]></title><description><![CDATA[<p>Wenn du Nachrichten abfängst solltest du (wenn nicht in der Doku explizit anders erwähnt) 0 zurückgeben und nicht DefWindowProc aufrufen.<br />
Und was genau enthält szAppNameE bzw. hast du auch für jede Fensterklasse, die du registrierst lpszClassName geändert <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/732892</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732892</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sat, 26 Feb 2005 16:07:12 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 18:52:54 GMT]]></title><description><![CDATA[<p>flenders schrieb:</p>
<blockquote>
<p>Und was genau enthält szAppNameE bzw. hast du auch für jede Fensterklasse, die du registrierst lpszClassName geändert <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>
</blockquote>
<p>JA -&gt;</p>
<pre><code class="language-cpp">const char szAppName[]  = &quot;Main&quot;;
const char szAppNameAI[]= &quot;AddItem&quot;;
const char szAppNameN[] = &quot;Note&quot;;
const char szAppNameI[] = &quot;Info&quot;;
const char szAppNameE[] = &quot;Edit&quot;; //Das ist das &quot;Schlimme&quot; Fenster
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/733029</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/733029</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 26 Feb 2005 18:52:54 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 18:55:33 GMT]]></title><description><![CDATA[<p>&quot;Edit&quot; gibt es schon.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/733033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/733033</guid><dc:creator><![CDATA[ROFL.]]></dc:creator><pubDate>Sat, 26 Feb 2005 18:55:33 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 18:59:25 GMT]]></title><description><![CDATA[<p>ker leck mich am arsch, wie konnte ich das nur übersehen <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="😡"
    /><br />
Und wegen sonem kleinen Fehler, rege ich mich die ganze woche über auf...</p>
<p>1000 dank, ROFL.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/733036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/733036</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 26 Feb 2005 18:59:25 GMT</pubDate></item><item><title><![CDATA[Reply to edit-box verursacht systemabsturtz on Sat, 26 Feb 2005 19:01:20 GMT]]></title><description><![CDATA[<p>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/733038</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/733038</guid><dc:creator><![CDATA[****]]></dc:creator><pubDate>Sat, 26 Feb 2005 19:01:20 GMT</pubDate></item></channel></rss>