<?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 geht nicht ?!]]></title><description><![CDATA[<p>Hallo<br />
Ich bin wieder mit meine Anfänger Schuhen am herumlaufen und wieder gegen eine Mauer geknallt.<br />
Könntet ihr mir vielleicht sagen warum ich in das Edit Feld nichts<br />
eintragen kann ?????</p>
<pre><code>#include &lt;windows.h&gt;

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

char szName[] = &quot;Fensterklasse&quot;;
char szName1[] = &quot;Fensterklasse1&quot;;
HINSTANCE g_hI; 

int WINAPI WinMain( HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow )
{

  WNDCLASS wc;

  wc.style = CS_HREDRAW | CS_VREDRAW ;
  wc.lpfnWndProc = WndProc;
  wc.cbClsExtra = 0;
  wc.cbWndExtra = 1;
  wc.hInstance = hI;
  wc.hIcon = LoadIcon( NULL, IDI_WINLOGO );
  wc.hCursor = LoadCursor( NULL, IDC_ARROW );
  wc.hbrBackground = ( HBRUSH )GetStockObject( LTGRAY_BRUSH );
  wc.lpszMenuName = NULL;
  wc.lpszClassName = szName;

  RegisterClass( &amp;wc );

//-----------------------------------------------------------------------------------------------------------------------------------------
  wc.style = CS_HREDRAW | CS_VREDRAW  ;
  wc.hbrBackground = ( HBRUSH )GetStockObject( LTGRAY_BRUSH );
  wc.lpfnWndProc = ChildProc;
  wc.lpszMenuName = NULL;
  wc.lpszClassName = szName1;

  RegisterClass( &amp; wc );
//-----------------------------------------------------------------------------------------------------------------------------------------
  HWND hwnd = CreateWindow // Fenster 1
       ( szName, &quot;Hauptfenster&quot;, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
       CW_USEDEFAULT, NULL, NULL, hI, NULL );

  ShowWindow( hwnd, SW_SHOWMAXIMIZED );
  UpdateWindow( hwnd );
//-----------------------------------------------------------------------------------------------------------------------------------------
  MSG msg;
  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 )
{
  HDC hdc;
  PAINTSTRUCT ps;
 HWND hwndButton1, hwnd2;//hier
 HWND hText;
  switch ( message )
  {
//-----------------------------------------------------------------------------------------------------------------------------------------    
//    case WM_PAINT:

//      return 0;
//-----------------------------------------------------------------------------------------------------------------------------------------

    case WM_CREATE:
                   hText = CreateWindow(&quot;STATIC&quot;, &quot;Kein Wert&quot;,
                    WS_VISIBLE | WS_CHILD, 30, 30, 100, 16, hwnd, NULL, g_hI, NULL);

                   hwndButton1 = CreateWindow
           ( &quot;button&quot;, &quot;Knopf 1&quot;, WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 150, 20, 100, 40, hwnd, NULL,
           ( HINSTANCE )GetWindowLong( hwnd, GWL_HINSTANCE ), NULL );
      return 0;
//----------------------------------------------------------------------------------------------------------------------------------------
    case WM_COMMAND:
      hwnd2 = CreateWindow( szName1, &quot;Eingabefenster&quot;, WS_CHILDWINDOW | WS_OVERLAPPEDWINDOW | WS_VISIBLE, 300, 500, 500, 200,
           hwnd, (HMENU)(1), (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL );
      return 0;
//-----------------------------------------------------------------------------------------------------------------------------------------
    case WM_DESTROY:
      PostQuitMessage( 0 );
      return 0;
  }

  return DefWindowProc( hwnd, message, wParam, lParam );
}
//-----------------------------------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
LRESULT CALLBACK ChildProc( HWND hwnd2, UINT message, WPARAM wParam, LPARAM lParam )
{
  HDC hdc;
  PAINTSTRUCT ps;
 static HWND hwndButton2,hwndEdit2;

  switch ( message )
  {
  case WM_CREATE : 
        SendMessage(hwndEdit2, EM_SETREADONLY, FALSE, 0);
      hwndButton2 = CreateWindow ( &quot;button&quot;, &quot;Knopf 1&quot;, 
                                   WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
                                   150, 20, 100, 40, hwnd2, NULL, 
                                   (HINSTANCE) GetWindowLong (hwnd2, GWL_HINSTANCE), NULL); 

  hwndEdit2   = CreateWindow ( &quot;edit&quot;, &quot;Edit-Feld&quot;, 
                                   WS_CHILD | WS_VISIBLE, 
                                   251, 20, 100, 40, hwnd2, NULL, 
                                   (HINSTANCE) GetWindowLong (hwnd2, GWL_HINSTANCE), NULL); 
  return 0; 

  case WM_COMMAND: 

  return 0;

      	case WM_CLOSE:
		DestroyWindow(hwnd2);
		return 0;
  }

  return DefWindowProc( hwnd2, message, wParam, lParam );
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/160880/edit-geht-nicht</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 16:58:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160880.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Sep 2006 14:44:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 14:52:37 GMT]]></title><description><![CDATA[<p>Hallo<br />
Ich bin wieder mit meine Anfänger Schuhen am herumlaufen und wieder gegen eine Mauer geknallt.<br />
Könntet ihr mir vielleicht sagen warum ich in das Edit Feld nichts<br />
eintragen kann ?????</p>
<pre><code>#include &lt;windows.h&gt;

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

char szName[] = &quot;Fensterklasse&quot;;
char szName1[] = &quot;Fensterklasse1&quot;;
HINSTANCE g_hI; 

int WINAPI WinMain( HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow )
{

  WNDCLASS wc;

  wc.style = CS_HREDRAW | CS_VREDRAW ;
  wc.lpfnWndProc = WndProc;
  wc.cbClsExtra = 0;
  wc.cbWndExtra = 1;
  wc.hInstance = hI;
  wc.hIcon = LoadIcon( NULL, IDI_WINLOGO );
  wc.hCursor = LoadCursor( NULL, IDC_ARROW );
  wc.hbrBackground = ( HBRUSH )GetStockObject( LTGRAY_BRUSH );
  wc.lpszMenuName = NULL;
  wc.lpszClassName = szName;

  RegisterClass( &amp;wc );

//-----------------------------------------------------------------------------------------------------------------------------------------
  wc.style = CS_HREDRAW | CS_VREDRAW  ;
  wc.hbrBackground = ( HBRUSH )GetStockObject( LTGRAY_BRUSH );
  wc.lpfnWndProc = ChildProc;
  wc.lpszMenuName = NULL;
  wc.lpszClassName = szName1;

  RegisterClass( &amp; wc );
//-----------------------------------------------------------------------------------------------------------------------------------------
  HWND hwnd = CreateWindow // Fenster 1
       ( szName, &quot;Hauptfenster&quot;, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
       CW_USEDEFAULT, NULL, NULL, hI, NULL );

  ShowWindow( hwnd, SW_SHOWMAXIMIZED );
  UpdateWindow( hwnd );
//-----------------------------------------------------------------------------------------------------------------------------------------
  MSG msg;
  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 )
{
  HDC hdc;
  PAINTSTRUCT ps;
 HWND hwndButton1, hwnd2;//hier
 HWND hText;
  switch ( message )
  {
//-----------------------------------------------------------------------------------------------------------------------------------------    
//    case WM_PAINT:

//      return 0;
//-----------------------------------------------------------------------------------------------------------------------------------------

    case WM_CREATE:
                   hText = CreateWindow(&quot;STATIC&quot;, &quot;Kein Wert&quot;,
                    WS_VISIBLE | WS_CHILD, 30, 30, 100, 16, hwnd, NULL, g_hI, NULL);

                   hwndButton1 = CreateWindow
           ( &quot;button&quot;, &quot;Knopf 1&quot;, WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 150, 20, 100, 40, hwnd, NULL,
           ( HINSTANCE )GetWindowLong( hwnd, GWL_HINSTANCE ), NULL );
      return 0;
//----------------------------------------------------------------------------------------------------------------------------------------
    case WM_COMMAND:
      hwnd2 = CreateWindow( szName1, &quot;Eingabefenster&quot;, WS_CHILDWINDOW | WS_OVERLAPPEDWINDOW | WS_VISIBLE, 300, 500, 500, 200,
           hwnd, (HMENU)(1), (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL );
      return 0;
//-----------------------------------------------------------------------------------------------------------------------------------------
    case WM_DESTROY:
      PostQuitMessage( 0 );
      return 0;
  }

  return DefWindowProc( hwnd, message, wParam, lParam );
}
//-----------------------------------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
LRESULT CALLBACK ChildProc( HWND hwnd2, UINT message, WPARAM wParam, LPARAM lParam )
{
  HDC hdc;
  PAINTSTRUCT ps;
 static HWND hwndButton2,hwndEdit2;

  switch ( message )
  {
  case WM_CREATE : 
        SendMessage(hwndEdit2, EM_SETREADONLY, FALSE, 0);
      hwndButton2 = CreateWindow ( &quot;button&quot;, &quot;Knopf 1&quot;, 
                                   WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
                                   150, 20, 100, 40, hwnd2, NULL, 
                                   (HINSTANCE) GetWindowLong (hwnd2, GWL_HINSTANCE), NULL); 

  hwndEdit2   = CreateWindow ( &quot;edit&quot;, &quot;Edit-Feld&quot;, 
                                   WS_CHILD | WS_VISIBLE, 
                                   251, 20, 100, 40, hwnd2, NULL, 
                                   (HINSTANCE) GetWindowLong (hwnd2, GWL_HINSTANCE), NULL); 
  return 0; 

  case WM_COMMAND: 

  return 0;

      	case WM_CLOSE:
		DestroyWindow(hwnd2);
		return 0;
  }

  return DefWindowProc( hwnd2, message, wParam, lParam );
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1147043</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147043</guid><dc:creator><![CDATA[Rabbit 007]]></dc:creator><pubDate>Sat, 30 Sep 2006 14:52:37 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 14:53:01 GMT]]></title><description><![CDATA[<p>Rabbit 007 schrieb:</p>
<blockquote>
<pre><code class="language-cpp">case WM_COMMAND: 
      hwnd2 = CreateWindow(
</code></pre>
</blockquote>
<p>CreateWindow sollte auf die Nachricht WM_CREATE reagieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147050</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147050</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Sat, 30 Sep 2006 14:53:01 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 15:10:04 GMT]]></title><description><![CDATA[<p>JA habe Ich verschoben und ausprobiert aber der gleiche effekt !!<br />
Aber ich möchte ja das das Fenster erst auf geht nachdem ich auf den Button<br />
gedrückt habe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147058</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147058</guid><dc:creator><![CDATA[Rabbit 007]]></dc:creator><pubDate>Sat, 30 Sep 2006 15:10:04 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 15:22:42 GMT]]></title><description><![CDATA[<p>Dein Handle ist sofort ungültig, der muss statisch sein:</p>
<pre><code class="language-cpp">HWND hwndButton1, hwnd2;//hier
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /></p>
<pre><code class="language-cpp">static HWND hwndButton1, hwnd2;//hier
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1147068</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147068</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 30 Sep 2006 15:22:42 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 16:42:10 GMT]]></title><description><![CDATA[<p>Das war aber auch nicht des Rätsels Lösung<br />
immer noch das gleiche wie vorher !!???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147075</guid><dc:creator><![CDATA[Rabbit 007]]></dc:creator><pubDate>Sat, 30 Sep 2006 16:42:10 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 15:46:17 GMT]]></title><description><![CDATA[<p>Rabbit 007 schrieb:</p>
<blockquote>
<p>Das war ber auch nicht des Rätzels Lösung<br />
immer noch das gleiche wie vorher !!???</p>
</blockquote>
<p>OMG, wie wärs mit nem Tut.? ....</p>
<p>szName1 ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> &quot;EDIT&quot; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147086</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 30 Sep 2006 15:46:17 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 16:45:20 GMT]]></title><description><![CDATA[<p>CodeFinder schrieb:</p>
<blockquote>
<p>Rabbit 007 schrieb:</p>
<blockquote>
<p>Das war ber auch nicht des Rätzels Lösung<br />
immer noch das gleiche wie vorher !!???</p>
</blockquote>
<p>OMG, wie wärs mit nem Tut.? ....</p>
<p>szName1 ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> &quot;EDIT&quot; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /></p>
</blockquote>
<p>Leider hilft mir das kein Stück weiter.<br />
Wenn Du das bitte in einen Satz packen könntest wäre ich dir sehr verbunden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147122</guid><dc:creator><![CDATA[Rabbit 007]]></dc:creator><pubDate>Sat, 30 Sep 2006 16:45:20 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 16:48:29 GMT]]></title><description><![CDATA[<p>Für ein Editfeld musst du die vordefinierte Speicherklasse EDIT in den 1. Parameter der Funktion CreateWindow eintragen. Das hast du nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /> getan.</p>
<p>Ups das waren 2 <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147125</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147125</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 30 Sep 2006 16:48:29 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 17:23:45 GMT]]></title><description><![CDATA[<p>Es tut mir Leid aber ich kann das nicht umsetzen.<br />
Ich erhalte immer die Fehlermeldung:</p>
<p>107:90 C:\Dev-Cpp\main.cpp macro &quot;CreateWindowA&quot; passed 12 arguments, but takes just 11<br />
C:\Dev-Cpp\main.cpp In function <code>LRESULT ChildProc(HWND__*, UINT, WPARAM, LPARAM)': 104 C:\\Dev-Cpp\\main.cpp</code>CreateWindowA' undeclared (first use this function)</p>
<pre><code>hwndEdit2   = CreateWindow ( szName1, &quot;EDIT&quot;, &quot;4711&quot;, 
                                   WS_CHILD | WS_VISIBLE, 
                                   251, 20, 100, 40, hwnd2, NULL, 
                                   (HINSTANCE) GetWindowLong (hwnd2, GWL_HINSTANCE), NULL);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1147151</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147151</guid><dc:creator><![CDATA[Rabbit 007]]></dc:creator><pubDate>Sat, 30 Sep 2006 17:23:45 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 17:25:35 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">case WM_COMMAND:
      hwnd2 = CreateWindow( &quot;EDIT&quot;, &quot;Eingabefenster&quot;, WS_CHILDWINDOW | WS_OVERLAPPEDWINDOW | WS_VISIBLE, 300, 500, 500, 200,
           hwnd, (HMENU)(1), (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL );
      return 0;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1147153</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147153</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 30 Sep 2006 17:25:35 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 17:32:19 GMT]]></title><description><![CDATA[<p>Das bringt das System nur zum Stillstand. Schade</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147161</guid><dc:creator><![CDATA[Rabbit 007]]></dc:creator><pubDate>Sat, 30 Sep 2006 17:32:19 GMT</pubDate></item><item><title><![CDATA[Reply to Edit geht nicht ?! on Sat, 30 Sep 2006 18:14:54 GMT]]></title><description><![CDATA[<p>Rabbit 007 schrieb:</p>
<blockquote>
<p>Das bringt das System nur zum Stillstand. Schade</p>
</blockquote>
<p>Junge, lern WinAPI, am besten von Anfang an!</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

#define BTN_CREATE_EDIT_BOX  (4001)
#define EBX_SHOW_SOME_INFO   (4002)

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

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    PSTR szCmdLine, int iCmdShow)
{
   static TCHAR szAppName[] = TEXT (&quot;Klassenname&quot;);
   HWND         hwnd;
   MSG          msg;
   WNDCLASSEX   wndclassex = {0};

   wndclassex.cbSize        = sizeof(WNDCLASSEX);
   wndclassex.style         = CS_HREDRAW | CS_VREDRAW;
   wndclassex.lpfnWndProc   = WndProc;
   wndclassex.cbClsExtra    = 0;
   wndclassex.cbWndExtra    = 0;
   wndclassex.hInstance     = hInstance;
   wndclassex.hIcon         = LoadIcon (NULL, IDI_APPLICATION);
   wndclassex.hCursor       = LoadCursor (NULL, IDC_ARROW);
   wndclassex.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
   wndclassex.lpszMenuName  = NULL;
   wndclassex.lpszClassName = szAppName;
   wndclassex.hIconSm       = wndclassex.hIcon;

   if (!RegisterClassEx (&amp;wndclassex))
   {
      MessageBox (NULL, TEXT (&quot;RegisterClassEx fehlgeschlagen!&quot;),
                  szAppName, MB_ICONERROR);
      return (0);
   }

   hwnd = CreateWindowEx (WS_EX_OVERLAPPEDWINDOW, // erweiterter Fensterstil
                  szAppName, // Name der Fensterklasse
                  TEXT (&quot;Fenstertitel&quot;), // Fenstertitel
                  WS_OVERLAPPEDWINDOW, // Fensterstil
                  CW_USEDEFAULT, // X-Position des Fensters                      
                  CW_USEDEFAULT, // Y-Position des Fensters       
                  400, // Fensterbreite                 
                  400, // 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;
}

// Die Hauptnachrichtenschleife
LRESULT CALLBACK WndProc (HWND hwnd, UINT uiMessage, WPARAM wParam, LPARAM lParam)
{
   static HWND hebxShow,
               hbtCreate;

   switch (uiMessage)
   {
   case WM_CREATE:
      hbtCreate = CreateWindowEx(0L, TEXT(&quot;BUTTON&quot;), TEXT(&quot;Erstelle das Editfeld!&quot;), 
         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, (400 - 100) / 2, (400 - 20) / 2, 100, 20, hwnd, reinterpret_cast&lt;HMENU&gt;(BTN_CREATE_EDIT_BOX),
         reinterpret_cast&lt;LPCREATESTRUCT&gt;(lParam)-&gt;hInstance, NULL);
      return (0L);

   case WM_COMMAND:
      if(LOWORD(wParam) == BTN_CREATE_EDIT_BOX)
      {
         ShowWindow(hbtCreate, SW_HIDE);
         hebxShow = CreateWindowEx(WS_EX_CLIENTEDGE, TEXT(&quot;EDIT&quot;), TEXT(&quot;Das ist wirklich nicht schwer!&quot;), 
              WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL,                  
              0, 0, 400, 400, hwnd, reinterpret_cast&lt;HMENU&gt;(EBX_SHOW_SOME_INFO), reinterpret_cast&lt;LPCREATESTRUCT&gt;(lParam)-&gt;hInstance,
              NULL);
      }
      return (0L);

   case WM_DESTROY:
      PostQuitMessage(0);
      return (0L);
   }

   return (DefWindowProc(hwnd, uiMessage, wParam, lParam));
}
</code></pre>
<p>EDIT: Hab das NICHT getestet....Dazu kb mehr gehabt... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1147186</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1147186</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sat, 30 Sep 2006 18:14:54 GMT</pubDate></item></channel></rss>