<?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[Brauche Hilfe bei meinem Programm]]></title><description><![CDATA[<p>Also ich habe einen taschenrechner Programmiert, nun jetzt bin ich soweit das er Fertig ist, aber wen ich den Rechner Ausführen will, und nur ein einziges mal Anklicke, dan Stürzt der Rechner sofort ab. Ich weis nicht wo dran das Liegt:</p>
<p>Beim Debugen sieht der Fehler so aus,<br />
Bild 1: <a href="http://www.webschwarz.de/fehler1.jpg" rel="nofollow">http://www.webschwarz.de/fehler1.jpg</a></p>
<p>und wen ich den Rechner vom Desktop ausführe sieht es so aus:<br />
Bild 2: <a href="http://www.webschwarz.de/fehler2.jpg" rel="nofollow">http://www.webschwarz.de/fehler2.jpg</a></p>
<p>Zur zeit benutze ich den Kompiler von Microsoft &quot;Visual Studio 2005 Pro.&quot;</p>
<p>Ich hoffe mir kann einer Helfen.</p>
<p>Mein Code ist:</p>
<pre><code>/*-----------------------------------------------------------------------
   Taschenrechner
  -----------------------------------------------------------------------*/

#include &lt;windows.h&gt;
#include &lt;cstring&gt;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    PSTR szCmdLine, int iCmdShow)
{
     static TCHAR szAppName[] = TEXT (&quot;Taschenrechner&quot;) ;
     HWND         hwnd ;
     MSG          msg ;
     WNDCLASS     wndclass ;

     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
     wndclass.lpfnWndProc   = WndProc ;
     wndclass.cbClsExtra    = 0 ;
     wndclass.cbWndExtra    = 0 ;
     wndclass.hInstance     = hInstance ;
     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;
     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;
     wndclass.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH) ;
     wndclass.lpszMenuName  = NULL ;
     wndclass.lpszClassName = szAppName ;

     RegisterClass (&amp;wndclass);

      hwnd = CreateWindow (szAppName,                 // Name der Fensterklasse
                  TEXT (&quot;Taschenrechner&quot;),            // Fenstertitel
                  WS_OVERLAPPEDWINDOW,                // Fensterstil
                  300,                                // X-Position des Fensters
                  300,                                // Y-Position des Fensters
                  300,                                // Fensterbreite
                  300,                                // Fensterhöhe
                  NULL,                               // übergeordnetes Fenster
                  NULL,                               // Menü
                  hInstance,                          // Programm-Kopiezähler (Programm-ID)
                  NULL) ;                             // zusätzliche Parameter

     ShowWindow (hwnd, iCmdShow) ;
     UpdateWindow (hwnd) ;

     while (GetMessage (&amp;msg, NULL, 0, 0))
     {
          TranslateMessage (&amp;msg) ;
          DispatchMessage (&amp;msg) ;
     }
     return msg.wParam ;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static char zeichen[1], anzeige[200];
   static HWND Button[14], Edit;    
   static int iErgebnis, iZahl_eins, iZahl_zwei ;

   switch (message)
   {
   case WM_CREATE:
      {
      for (int i = 0; i &lt; 10; i++)
      {
      ltoa (i, zeichen, 10);
      Button[i] = CreateWindow(  &quot;button&quot;,
                                  zeichen,
                                  WS_CHILD | WS_VISIBLE,
                                  0, 0, 0, 0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);
      }

Button[10] = CreateWindow( &quot;button&quot;,
                                  &quot;+&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[11] = CreateWindow( &quot;button&quot;,
                                  &quot;-&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[12] = CreateWindow( &quot;button&quot;,
                                  &quot;*&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[13] = CreateWindow( &quot;button&quot;,
                                  &quot;/&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[14] = CreateWindow( &quot;button&quot;,
                                  &quot;=&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Edit = CreateWindow (TEXT (&quot;edit&quot;), anzeige,
                         WS_CHILD | WS_VISIBLE | WS_BORDER | 
                            ES_RIGHT |  ES_AUTOHSCROLL ,
                         0, 0, 0, 0, hWnd, (HMENU) 1,
                         ((LPCREATESTRUCT) lParam) -&gt; hInstance, NULL) ;
         return 0;
      }
   case WM_SIZE:
      {

                MoveWindow(Button[1],   20, 50, 40, 30, true);
                MoveWindow(Button[2],   80, 50, 40, 30, true);
                MoveWindow(Button[3],  140, 50, 40, 30, true);
                MoveWindow(Button[4],  20, 100, 40, 30, true);
                MoveWindow(Button[5],  80, 100, 40, 30, true);
                MoveWindow(Button[6], 140, 100, 40, 30, true);
                MoveWindow(Button[7],  20, 150, 40, 30, true);
                MoveWindow(Button[8],  80, 150, 40, 30, true);
                MoveWindow(Button[9], 140, 150, 40, 30, true);
                MoveWindow(Button[0], 20, 200, 70, 30, true);
                MoveWindow(Button[10],200, 50,  80, 30, true);
                MoveWindow(Button[11],200,100,  80, 30, true);
                MoveWindow(Button[12],200,150,  80, 30, true);
                MoveWindow(Button[13],200,200,  80, 30, true);
                MoveWindow(Button[14],110,200,  70, 30, true);
                MoveWindow(Edit,       20, 10, 260, 25, true);
       return 0;

      }

   case WM_COMMAND:
      {

         if (lParam == (LPARAM)Button[0])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '0';
              std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);

         }   
         if (lParam == (LPARAM)Button[1])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '1';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[2])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '2';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[3])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '3';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[4])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '4';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[5])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '5';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[6])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '6';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[7])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '7';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[8])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '8';
              std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[9])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '9';
              std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[10])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '+';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);

         }

         if (lParam == (LPARAM)Button[11])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '-';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[12])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '*';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[13])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '/';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[14])
         {
            if (HIWORD(wParam) == BN_CLICKED)                                        
               iZahl_zwei = atoi(anzeige);
               if (zeichen[0] == '+')
               {
               iErgebnis = iZahl_eins + iZahl_zwei;
               }
               if (zeichen[0] == '-')
               {
               iErgebnis = iZahl_eins - iZahl_zwei;
               }
               if (zeichen[0] == '*')
               {
               iErgebnis = iZahl_eins * iZahl_zwei;
               }
               if (zeichen[0] == '/')
               {
               iErgebnis = iZahl_eins / iZahl_zwei;
               }
               itoa(iErgebnis, anzeige, 20);
               SendMessage(Edit, WM_SETTEXT, 0, (LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Edit)
         {
            if (HIWORD(wParam) == BN_CLICKED)
               SendMessage(hWnd, WM_CLOSE, 0, 0);
         }

         return 0;
      }
   case WM_DESTROY:
      {
         PostQuitMessage(0);
         return 0;
      }
   }
   return DefWindowProc(hWnd, message, wParam, lParam);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/185634/brauche-hilfe-bei-meinem-programm</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 06:16:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185634.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Jun 2007 10:17:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Brauche Hilfe bei meinem Programm on Fri, 29 Jun 2007 10:22:51 GMT]]></title><description><![CDATA[<p>Also ich habe einen taschenrechner Programmiert, nun jetzt bin ich soweit das er Fertig ist, aber wen ich den Rechner Ausführen will, und nur ein einziges mal Anklicke, dan Stürzt der Rechner sofort ab. Ich weis nicht wo dran das Liegt:</p>
<p>Beim Debugen sieht der Fehler so aus,<br />
Bild 1: <a href="http://www.webschwarz.de/fehler1.jpg" rel="nofollow">http://www.webschwarz.de/fehler1.jpg</a></p>
<p>und wen ich den Rechner vom Desktop ausführe sieht es so aus:<br />
Bild 2: <a href="http://www.webschwarz.de/fehler2.jpg" rel="nofollow">http://www.webschwarz.de/fehler2.jpg</a></p>
<p>Zur zeit benutze ich den Kompiler von Microsoft &quot;Visual Studio 2005 Pro.&quot;</p>
<p>Ich hoffe mir kann einer Helfen.</p>
<p>Mein Code ist:</p>
<pre><code>/*-----------------------------------------------------------------------
   Taschenrechner
  -----------------------------------------------------------------------*/

#include &lt;windows.h&gt;
#include &lt;cstring&gt;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    PSTR szCmdLine, int iCmdShow)
{
     static TCHAR szAppName[] = TEXT (&quot;Taschenrechner&quot;) ;
     HWND         hwnd ;
     MSG          msg ;
     WNDCLASS     wndclass ;

     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
     wndclass.lpfnWndProc   = WndProc ;
     wndclass.cbClsExtra    = 0 ;
     wndclass.cbWndExtra    = 0 ;
     wndclass.hInstance     = hInstance ;
     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;
     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;
     wndclass.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH) ;
     wndclass.lpszMenuName  = NULL ;
     wndclass.lpszClassName = szAppName ;

     RegisterClass (&amp;wndclass);

      hwnd = CreateWindow (szAppName,                 // Name der Fensterklasse
                  TEXT (&quot;Taschenrechner&quot;),            // Fenstertitel
                  WS_OVERLAPPEDWINDOW,                // Fensterstil
                  300,                                // X-Position des Fensters
                  300,                                // Y-Position des Fensters
                  300,                                // Fensterbreite
                  300,                                // Fensterhöhe
                  NULL,                               // übergeordnetes Fenster
                  NULL,                               // Menü
                  hInstance,                          // Programm-Kopiezähler (Programm-ID)
                  NULL) ;                             // zusätzliche Parameter

     ShowWindow (hwnd, iCmdShow) ;
     UpdateWindow (hwnd) ;

     while (GetMessage (&amp;msg, NULL, 0, 0))
     {
          TranslateMessage (&amp;msg) ;
          DispatchMessage (&amp;msg) ;
     }
     return msg.wParam ;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   static char zeichen[1], anzeige[200];
   static HWND Button[14], Edit;    
   static int iErgebnis, iZahl_eins, iZahl_zwei ;

   switch (message)
   {
   case WM_CREATE:
      {
      for (int i = 0; i &lt; 10; i++)
      {
      ltoa (i, zeichen, 10);
      Button[i] = CreateWindow(  &quot;button&quot;,
                                  zeichen,
                                  WS_CHILD | WS_VISIBLE,
                                  0, 0, 0, 0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);
      }

Button[10] = CreateWindow( &quot;button&quot;,
                                  &quot;+&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[11] = CreateWindow( &quot;button&quot;,
                                  &quot;-&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[12] = CreateWindow( &quot;button&quot;,
                                  &quot;*&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[13] = CreateWindow( &quot;button&quot;,
                                  &quot;/&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Button[14] = CreateWindow( &quot;button&quot;,
                                  &quot;=&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  0,0,0,0,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

Edit = CreateWindow (TEXT (&quot;edit&quot;), anzeige,
                         WS_CHILD | WS_VISIBLE | WS_BORDER | 
                            ES_RIGHT |  ES_AUTOHSCROLL ,
                         0, 0, 0, 0, hWnd, (HMENU) 1,
                         ((LPCREATESTRUCT) lParam) -&gt; hInstance, NULL) ;
         return 0;
      }
   case WM_SIZE:
      {

                MoveWindow(Button[1],   20, 50, 40, 30, true);
                MoveWindow(Button[2],   80, 50, 40, 30, true);
                MoveWindow(Button[3],  140, 50, 40, 30, true);
                MoveWindow(Button[4],  20, 100, 40, 30, true);
                MoveWindow(Button[5],  80, 100, 40, 30, true);
                MoveWindow(Button[6], 140, 100, 40, 30, true);
                MoveWindow(Button[7],  20, 150, 40, 30, true);
                MoveWindow(Button[8],  80, 150, 40, 30, true);
                MoveWindow(Button[9], 140, 150, 40, 30, true);
                MoveWindow(Button[0], 20, 200, 70, 30, true);
                MoveWindow(Button[10],200, 50,  80, 30, true);
                MoveWindow(Button[11],200,100,  80, 30, true);
                MoveWindow(Button[12],200,150,  80, 30, true);
                MoveWindow(Button[13],200,200,  80, 30, true);
                MoveWindow(Button[14],110,200,  70, 30, true);
                MoveWindow(Edit,       20, 10, 260, 25, true);
       return 0;

      }

   case WM_COMMAND:
      {

         if (lParam == (LPARAM)Button[0])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '0';
              std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);

         }   
         if (lParam == (LPARAM)Button[1])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '1';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[2])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '2';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[3])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '3';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[4])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '4';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[5])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '5';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[6])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '6';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[7])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '7';
               std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[8])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '8';
              std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[9])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '9';
              std::strcat(anzeige,zeichen);
                SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[10])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '+';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);

         }

         if (lParam == (LPARAM)Button[11])
         {
            if (HIWORD(wParam) == BN_CLICKED)
              zeichen[0] = '-';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[12])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '*';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[13])
         {
            if (HIWORD(wParam) == BN_CLICKED)
               zeichen[0] = '/';
              iZahl_eins = atoi(anzeige);
              std::strcpy(anzeige, &quot; &quot;);
              SendMessage(Edit, WM_SETTEXT, 0,(LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Button[14])
         {
            if (HIWORD(wParam) == BN_CLICKED)                                        
               iZahl_zwei = atoi(anzeige);
               if (zeichen[0] == '+')
               {
               iErgebnis = iZahl_eins + iZahl_zwei;
               }
               if (zeichen[0] == '-')
               {
               iErgebnis = iZahl_eins - iZahl_zwei;
               }
               if (zeichen[0] == '*')
               {
               iErgebnis = iZahl_eins * iZahl_zwei;
               }
               if (zeichen[0] == '/')
               {
               iErgebnis = iZahl_eins / iZahl_zwei;
               }
               itoa(iErgebnis, anzeige, 20);
               SendMessage(Edit, WM_SETTEXT, 0, (LPARAM) anzeige);
         }

         if (lParam == (LPARAM)Edit)
         {
            if (HIWORD(wParam) == BN_CLICKED)
               SendMessage(hWnd, WM_CLOSE, 0, 0);
         }

         return 0;
      }
   case WM_DESTROY:
      {
         PostQuitMessage(0);
         return 0;
      }
   }
   return DefWindowProc(hWnd, message, wParam, lParam);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1314814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314814</guid><dc:creator><![CDATA[Nero91]]></dc:creator><pubDate>Fri, 29 Jun 2007 10:22:51 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei meinem Programm on Fri, 29 Jun 2007 10:48:13 GMT]]></title><description><![CDATA[<blockquote>
<pre><code class="language-cpp">static HWND Button[14], Edit;
...
Button[14] = CreateWindow( &quot;button&quot;,
                           &quot;=&quot;,
                           WS_CHILD | WS_VISIBLE,
                           0,0,0,0,
                           hWnd,
                           NULL,
                           ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                           NULL);
</code></pre>
</blockquote>
<p>Na, wer erkennt den Fehler? (Tip: Schau mal auf die Indizes - und lies dir durch, welches das letzte Element eines Arrays ist)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314854</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 29 Jun 2007 10:48:13 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei meinem Programm on Fri, 29 Jun 2007 10:56:27 GMT]]></title><description><![CDATA[<p>In Codezeile 298 solltest du noch die Division durch 0 abfangen. Das explodiert sonst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314863</guid><dc:creator><![CDATA[HaJo.]]></dc:creator><pubDate>Fri, 29 Jun 2007 10:56:27 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei meinem Programm on Fri, 29 Jun 2007 11:08:52 GMT]]></title><description><![CDATA[<p><a href="http://worsethanfailure.com/" rel="nofollow">http://worsethanfailure.com/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314869</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314869</guid><dc:creator><![CDATA[Na?]]></dc:creator><pubDate>Fri, 29 Jun 2007 11:08:52 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei meinem Programm on Fri, 29 Jun 2007 11:12:02 GMT]]></title><description><![CDATA[<p>Danke schonmal für eure Schnellen Antworten fide ich echt gut. Werde jetzt mal eure Tipps ausprobieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314873</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314873</guid><dc:creator><![CDATA[Nero91]]></dc:creator><pubDate>Fri, 29 Jun 2007 11:12:02 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei meinem Programm on Fri, 29 Jun 2007 11:14:40 GMT]]></title><description><![CDATA[<p>HaJo. schrieb:</p>
<blockquote>
<p>In Codezeile 298 solltest du noch die Division durch 0 abfangen. Das explodiert sonst.</p>
</blockquote>
<p>Das gibt ein stilles NaN, da explodiert nix.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314875</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314875</guid><dc:creator><![CDATA[aha !]]></dc:creator><pubDate>Fri, 29 Jun 2007 11:14:40 GMT</pubDate></item><item><title><![CDATA[Reply to Brauche Hilfe bei meinem Programm on Fri, 29 Jun 2007 11:27:48 GMT]]></title><description><![CDATA[<p>aha ! schrieb:</p>
<blockquote>
<p>Das gibt ein stilles NaN, da explodiert nix.</p>
</blockquote>
<p>Aus mathematischer Sicht schon.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314884</guid><dc:creator><![CDATA[HaJo.]]></dc:creator><pubDate>Fri, 29 Jun 2007 11:27:48 GMT</pubDate></item></channel></rss>