<?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[EditBox, Textausgabe]]></title><description><![CDATA[<p>Was mache ich hir falsch. Der Text den man in eine EditBox schreibt soll per Knopfdruck ausgegeben werden</p>
<p>LRESULT CALLBACK WndProc(HWND hwnd,UINT message, WPARAM wParam, LPARAM lParam)<br />
{<br />
static HWND hwndButton;<br />
static HWND hwndEdit;<br />
int leng=50;<br />
char derText[50];</p>
<p>HDC hdc;<br />
PAINTSTRUCT ps;</p>
<p>switch(message)<br />
{<br />
case WM_CREATE:<br />
hwndButton=CreateWindow(TEXT(&quot;Button&quot;),<br />
TEXT(&quot;Weiter&quot;),<br />
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,<br />
300,200,60,30,hwnd,(HMENU) 1,<br />
((LPCREATESTRUCT) lParam)-&gt;hInstance,NULL);</p>
<p>hwndEdit = CreateWindow (TEXT (&quot;edit&quot;), NULL,<br />
WS_CHILD | WS_VISIBLE | WS_BORDER |<br />
ES_LEFT | ES_AUTOHSCROLL,<br />
0, 0, 0, 0, hwnd, (HMENU) 2,<br />
((LPCREATESTRUCT) lParam) -&gt; hInstance, NULL) ;</p>
<p>return 0;<br />
case WM_SETFOCUS:<br />
SetFocus(hwndEdit);<br />
return 0;</p>
<p>case WM_SIZE:<br />
MoveWindow(hwndEdit,20,20,200,25,TRUE);<br />
return 0;</p>
<p>case WM_PAINT:<br />
hdc = BeginPaint(hwnd,&amp;ps);<br />
TextOut(hdc,20,200,derText,leng);<br />
EndPaint(hwnd,&amp;ps);</p>
<p>case WM_COMMAND :<br />
if (LOWORD (wParam) == 2)<br />
if (HIWORD (wParam) == EN_ERRSPACE ||<br />
HIWORD (wParam) == EN_MAXTEXT)<br />
MessageBox (hwnd, TEXT (&quot;Edit control out of space.&quot;),<br />
TEXT(&quot;Hallo&quot;), MB_OK | MB_ICONSTOP) ;<br />
return 0 ;</p>
<p>switch(wParam)<br />
{<br />
case 1:</p>
<p>leng = Edit_GetTextLength(hwndEdit) + 1;<br />
Edit_GetText(hwndEdit, derText, leng);</p>
<p>break;<br />
}<br />
case WM_DESTROY:<br />
PostQuitMessage(0);<br />
return 0;</p>
<p>}<br />
return DefWindowProc(hwnd,message,wParam,lParam);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/88786/editbox-textausgabe</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 10:09:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/88786.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Oct 2004 11:31:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to EditBox, Textausgabe on Wed, 13 Oct 2004 11:31:56 GMT]]></title><description><![CDATA[<p>Was mache ich hir falsch. Der Text den man in eine EditBox schreibt soll per Knopfdruck ausgegeben werden</p>
<p>LRESULT CALLBACK WndProc(HWND hwnd,UINT message, WPARAM wParam, LPARAM lParam)<br />
{<br />
static HWND hwndButton;<br />
static HWND hwndEdit;<br />
int leng=50;<br />
char derText[50];</p>
<p>HDC hdc;<br />
PAINTSTRUCT ps;</p>
<p>switch(message)<br />
{<br />
case WM_CREATE:<br />
hwndButton=CreateWindow(TEXT(&quot;Button&quot;),<br />
TEXT(&quot;Weiter&quot;),<br />
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,<br />
300,200,60,30,hwnd,(HMENU) 1,<br />
((LPCREATESTRUCT) lParam)-&gt;hInstance,NULL);</p>
<p>hwndEdit = CreateWindow (TEXT (&quot;edit&quot;), NULL,<br />
WS_CHILD | WS_VISIBLE | WS_BORDER |<br />
ES_LEFT | ES_AUTOHSCROLL,<br />
0, 0, 0, 0, hwnd, (HMENU) 2,<br />
((LPCREATESTRUCT) lParam) -&gt; hInstance, NULL) ;</p>
<p>return 0;<br />
case WM_SETFOCUS:<br />
SetFocus(hwndEdit);<br />
return 0;</p>
<p>case WM_SIZE:<br />
MoveWindow(hwndEdit,20,20,200,25,TRUE);<br />
return 0;</p>
<p>case WM_PAINT:<br />
hdc = BeginPaint(hwnd,&amp;ps);<br />
TextOut(hdc,20,200,derText,leng);<br />
EndPaint(hwnd,&amp;ps);</p>
<p>case WM_COMMAND :<br />
if (LOWORD (wParam) == 2)<br />
if (HIWORD (wParam) == EN_ERRSPACE ||<br />
HIWORD (wParam) == EN_MAXTEXT)<br />
MessageBox (hwnd, TEXT (&quot;Edit control out of space.&quot;),<br />
TEXT(&quot;Hallo&quot;), MB_OK | MB_ICONSTOP) ;<br />
return 0 ;</p>
<p>switch(wParam)<br />
{<br />
case 1:</p>
<p>leng = Edit_GetTextLength(hwndEdit) + 1;<br />
Edit_GetText(hwndEdit, derText, leng);</p>
<p>break;<br />
}<br />
case WM_DESTROY:<br />
PostQuitMessage(0);<br />
return 0;</p>
<p>}<br />
return DefWindowProc(hwnd,message,wParam,lParam);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/627569</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/627569</guid><dc:creator><![CDATA[WinAPI-Freund]]></dc:creator><pubDate>Wed, 13 Oct 2004 11:31:56 GMT</pubDate></item><item><title><![CDATA[Reply to EditBox, Textausgabe on Wed, 13 Oct 2004 11:38:32 GMT]]></title><description><![CDATA[<p>was wird eigentlich ausgegeben (oder auch nicht ausgegeben...)<br />
Wird zum Beispiel der Knopf nicht angezeigt oder eine Fehlermeldung auf Knopfdruck ausgegeben????</p>
<p>Erzähl was das problem eigentlich ist</p>
<p>jeanlebon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/627577</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/627577</guid><dc:creator><![CDATA[jeanlebon]]></dc:creator><pubDate>Wed, 13 Oct 2004 11:38:32 GMT</pubDate></item><item><title><![CDATA[Reply to EditBox, Textausgabe on Wed, 13 Oct 2004 11:49:18 GMT]]></title><description><![CDATA[<p>Es soll nur der Text ausgegeben werden, den man zuvor reingeschrieben hat und zwar unterhalb der EditBox</p>
]]></description><link>https://www.c-plusplus.net/forum/post/627591</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/627591</guid><dc:creator><![CDATA[WinAPI]]></dc:creator><pubDate>Wed, 13 Oct 2004 11:49:18 GMT</pubDate></item><item><title><![CDATA[Reply to EditBox, Textausgabe on Wed, 13 Oct 2004 11:52:07 GMT]]></title><description><![CDATA[<p>Ich weiß nicht richtig wie ich Text aus der EditBox in eine Variable speichern soll, weil es eine art Stringvariable ist und wie ich den Text nachher mit TextOut ausgeben soll</p>
]]></description><link>https://www.c-plusplus.net/forum/post/627596</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/627596</guid><dc:creator><![CDATA[WINAPI]]></dc:creator><pubDate>Wed, 13 Oct 2004 11:52:07 GMT</pubDate></item><item><title><![CDATA[Reply to EditBox, Textausgabe on Wed, 13 Oct 2004 12:41:00 GMT]]></title><description><![CDATA[<p>Was mir so auffällt:</p>
<ol>
<li>Bitte mit Code-Tags Quellcode posten (dann bleiben z.B. Tabstops heile und der Quellcode ist besser zu lesen ;D)</li>
<li>z.B. bei WM_PAINT scheint kein break oder return vorhanden zu sein.</li>
<li>Du solltest bei WM_CREATE schonmal derText und leng irgendwie initialisieren.</li>
<li>Bei WM_COMMAND meinst du statt &quot;switch(wParam)&quot; wahrscheinlich &quot;switch(LOWORD(wParam))&quot;</li>
</ol>
]]></description><link>https://www.c-plusplus.net/forum/post/627689</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/627689</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Wed, 13 Oct 2004 12:41:00 GMT</pubDate></item><item><title><![CDATA[Reply to EditBox, Textausgabe on Thu, 14 Oct 2004 07:55:06 GMT]]></title><description><![CDATA[<p>Danke, das müßte gehen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/628472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/628472</guid><dc:creator><![CDATA[WinAPI-Freund]]></dc:creator><pubDate>Thu, 14 Oct 2004 07:55:06 GMT</pubDate></item></channel></rss>