<?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[Zeichenbeschränkung bei EditBox]]></title><description><![CDATA[<p>Hi, mit welcher Funktion kann ich bei einer Edit Box die Zeichen / Ziffern beschränken?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/235316/zeichenbeschränkung-bei-editbox</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 11:31:17 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/235316.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Feb 2009 12:09:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeichenbeschränkung bei EditBox on Sat, 28 Feb 2009 12:09:23 GMT]]></title><description><![CDATA[<p>Hi, mit welcher Funktion kann ich bei einer Edit Box die Zeichen / Ziffern beschränken?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1671881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1671881</guid><dc:creator><![CDATA[Anonymouse123]]></dc:creator><pubDate>Sat, 28 Feb 2009 12:09:23 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichenbeschränkung bei EditBox on Sat, 28 Feb 2009 12:12:36 GMT]]></title><description><![CDATA[<p>Dies ist machbar mit dem ES_NUMBER Stil!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1671886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1671886</guid><dc:creator><![CDATA[Bernibutt]]></dc:creator><pubDate>Sat, 28 Feb 2009 12:12:36 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichenbeschränkung bei EditBox on Sat, 28 Feb 2009 12:47:28 GMT]]></title><description><![CDATA[<p>Nein, ich glaub du hast mich falsch verstanden, ich will dass maximal 4 Zeichen eingegeben werden können</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1671927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1671927</guid><dc:creator><![CDATA[Anonymouse123]]></dc:creator><pubDate>Sat, 28 Feb 2009 12:47:28 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichenbeschränkung bei EditBox on Sat, 28 Feb 2009 13:43:00 GMT]]></title><description><![CDATA[<p>SendMessage () mit EM_LIMITTEXT.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1671970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1671970</guid><dc:creator><![CDATA[WM_EM]]></dc:creator><pubDate>Sat, 28 Feb 2009 13:43:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichenbeschränkung bei EditBox on Sat, 28 Feb 2009 14:59:01 GMT]]></title><description><![CDATA[<p>Kann hier eventuell jemand einen Sourcecode von einem GUI mit EditBox (auch wenns nur die EditBox ist) posten? Kriege es nähmlich nicht hin, aus der EditBox auszulesen und diesen String dann als &quot;Ordner stellen&quot; (also _mkdir(editbox_string) weiterzuverarbeiten.. =[</p>
<p>Wäre demjenigen unendlich dankbar!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1671995</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1671995</guid><dc:creator><![CDATA[EditBox]]></dc:creator><pubDate>Sat, 28 Feb 2009 14:59:01 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichenbeschränkung bei EditBox on Sat, 28 Feb 2009 18:46:39 GMT]]></title><description><![CDATA[<p>Der Source hier ist absoluter Blödsinn, ich verwende ihn nur, um die Editbox zu testen (man beachte: &quot;Beenden&quot; liest die Editbox aus :P)</p>
<p>Müsstest die GetDlgItemInt Funktion zur GetDlgItemTxt umschreiben, und den ausgangswert natürlich auch in einem char speichern.</p>
<pre><code class="language-cpp">#define STRICT

#include &lt;windows.h&gt;
#include &lt;iostream&gt;
#include &lt;stdio.h&gt;

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

const char szAppName[]    = &quot;blablabla&quot;;

int WINAPI WinMain(  HINSTANCE hInstance, HINSTANCE hPrevInstance,
                     PSTR szCmdLine, int iCmdShow)
{
   MSG        msg;
   HWND       hWnd;
   WNDCLASS   wc;

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

   RegisterClass(&amp;wc);

   hWnd = CreateWindow(   szAppName,
                          szAppName,
                          WS_OVERLAPPEDWINDOW,
                          CW_USEDEFAULT,
                          CW_USEDEFAULT,
                          CW_USEDEFAULT,
                          CW_USEDEFAULT,
                          NULL,
                          NULL,
                          hInstance,
                          NULL);

   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 HWND hLogin_User;
    static HWND hButton;
   switch (message)
   {
    case WM_DESTROY:
      {
         PostQuitMessage(0);
         return 0;
      }
    case WM_CREATE:

    hButton = CreateWindow(  &quot;button&quot;,
                                  &quot;Beenden&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  550,550, 100, 100,
                                  hWnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -&gt; hInstance,
                                  NULL);

    hLogin_User = CreateWindowEx(WS_EX_CLIENTEDGE,
    &quot;EDIT&quot;,
    &quot;&quot;,
    WS_CHILD |
    WS_VISIBLE |
    WS_BORDER
    | ES_NUMBER,
    20,30,200,20,
    hWnd,
    (HMENU) 1,
    (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),
    NULL);
    return 0;
    break;

    case WM_COMMAND:
        {
            if (lParam == (LPARAM)hButton)
            {
                if (HIWORD(wParam) == BN_CLICKED)
                {
                    BOOL bSuccess;
                    int nTimes = GetDlgItemInt(hWnd, GetDlgCtrlID( hLogin_User), NULL, FALSE);
                    char asdf[30];
                    sprintf(asdf, &quot;%i&quot;, nTimes);
                    MessageBox(0, asdf, NULL, MB_OK);
                }
            }
        }
   }

   return DefWindowProc(hWnd, message, wParam, lParam);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1672115</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1672115</guid><dc:creator><![CDATA[Anonymouse123]]></dc:creator><pubDate>Sat, 28 Feb 2009 18:46:39 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichenbeschränkung bei EditBox on Sat, 28 Feb 2009 18:49:06 GMT]]></title><description><![CDATA[<p>Ach ja, hier noch der Code für die Zeichenlimitierung, Danke an WM_EM!</p>
<p>SendMessage(hLogin_User, EM_LIMITTEXT, 4, NULL);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1672117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1672117</guid><dc:creator><![CDATA[Anonymouse123]]></dc:creator><pubDate>Sat, 28 Feb 2009 18:49:06 GMT</pubDate></item></channel></rss>