<?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[recv bei WINAPI Anwendungen]]></title><description><![CDATA[<p>Hi,ich hab ein Programm geschrieben,erst mal der ganze Source:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;string&gt;
using namespace std;
/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
int startWinsock(void);

/*  Make the class name into a global variable  */
char szClassName[ ] = &quot;WindowsApp&quot;;
HWND hEdit;
HWND hEdit1;
HWND hdit;
HWND hCon;
HINSTANCE hInstGlobal;
long rc;             
SOCKET s;  
BOOL connected = FALSE;
char buf[] = &quot;&quot;;
char set_buf[] = &quot;&quot;;
char ip_adresse[25];

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    hInstGlobal=hThisInstance;

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&amp;wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           &quot;Keylogger-Client by Xalon&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           500,                 /* Windows decides the position */
           500,                 /* where the window ends up on the screen */
           530,                 /* The programs width */
           400,                 /* and height in pixels */
           NULL,                /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
  ShowWindow (hwnd, SW_SHOW);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&amp;messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&amp;messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&amp;messages);

    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */

  //aufraeumen
  closesocket(s);
  WSACleanup();
  return messages.wParam;
}

/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{

      if (connected == TRUE)
      {
        rc=recv(s,buf,256,0);                          //vom server empfangen
        buf[rc]='\0';                                  //buf mit NULL Byte abschliesen
        //strcat(set_buf,buf);
        MessageBox(hwnd,buf,&quot;Fehler!&quot;,MB_OK);       
        //SendMessage (hdit, WM_SETTEXT,NULL,(LPARAM) set_buf);

      }

    switch (message)                  /* handle the messages */
    {
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        case WM_CREATE:
           HWND hButton;

           hdit = CreateWindow(&quot;EDIT&quot;,&quot;&quot;,
           WS_CHILD | WS_VISIBLE |
           WS_BORDER | ES_MULTILINE | WS_VSCROLL,
           10,10,500,300,
           hwnd,(HMENU) 1,
           hInstGlobal, NULL);

           hEdit = CreateWindow(&quot;EDIT&quot;,&quot;&quot;,
           WS_CHILD | WS_VISIBLE |
           WS_BORDER ,
           10,320,300,20,
           hwnd,(HMENU) 1,
           hInstGlobal, NULL);

           hCon = CreateWindow(&quot;BUTTON&quot;,&quot;Connect!&quot;,
           WS_CHILD | WS_VISIBLE |
           BS_PUSHBUTTON,
           320,320,170,20,
           hwnd,(HMENU) 1,
           hInstGlobal, NULL);

           break;       

        case WM_COMMAND:
        if (HIWORD(wParam) == BN_CLICKED)
         {
        char *string1;
        string1 = new char[2048];

          if (LOWORD(wParam) == 1)
           {

            SOCKADDR_IN addr;    //Nimmt Daten fuer Socket auf
            rc=startWinsock();   //Winsock starten

            s=socket(AF_INET,SOCK_STREAM,0);                  //Den socket &quot;starten&quot; xD
            memset(&amp;addr,0,sizeof(SOCKADDR_IN)); 
            addr.sin_family=AF_INET;                         //TCP
            addr.sin_port=htons(123);                      //Port 1234 verwenden

            SendMessage (hEdit, WM_GETTEXT, 1024,(LPARAM) ip_adresse);

            addr.sin_addr.s_addr=inet_addr(ip_adresse);     //IP des Servers
            rc=connect(s,(SOCKADDR*)&amp;addr,sizeof(SOCKADDR)); //Socket verbinden

             if(rc==SOCKET_ERROR)
               {
                 MessageBox(hwnd,&quot;Konnte nicht verbinden...&quot;,&quot;Fehler!&quot;,MB_OK);
               }
             else
              {
               MessageBox(hwnd,&quot;Verbunden mit Server!&quot;,&quot;Ok&quot;,MB_OK);
               connected = TRUE ;
               EnableWindow(hCon,FALSE);
              }

            }

         }
           break;
        default:                      
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}

/* ################################################################### */

int startWinsock(void) /* WSDATA Struktur erstellen und Winsock starten */
{
  WSADATA wsa;
  return WSAStartup(MAKEWORD(2,0),&amp;wsa);
}

/* ################################################################### */
</code></pre>
<p>Ich connecte zu einem Server,und empfange dann Daten vom server mit</p>
<pre><code class="language-cpp">if (connected == TRUE)
      {
        rc=recv(s,buf,256,0);                          //vom server empfangen
        buf[rc]='\0';                                  //buf mit NULL Byte abschliesen
        //strcat(set_buf,buf);
        MessageBox(hwnd,buf,&quot;Fehler!&quot;,MB_OK);       
        //SendMessage (hdit, WM_SETTEXT,NULL,(LPARAM) set_buf);

      }
</code></pre>
<p>und zwar bei jedem Durchlauf der CALLBACK funktion.<br />
Aber der Client hängt sich immer auf <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /><br />
Der Server sendet andauernd einzelne Buchstaben zum Client (ein Testserver <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="😃"
    /> )<br />
Weiß jamand warum und was ich dagegen machen kann?</p>
<p>Danke im voraus,<br />
ICZ</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/138384/recv-bei-winapi-anwendungen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Apr 2026 18:26:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/138384.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Feb 2006 19:39:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Sat, 25 Feb 2006 19:39:25 GMT]]></title><description><![CDATA[<p>Hi,ich hab ein Programm geschrieben,erst mal der ganze Source:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;string&gt;
using namespace std;
/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
int startWinsock(void);

/*  Make the class name into a global variable  */
char szClassName[ ] = &quot;WindowsApp&quot;;
HWND hEdit;
HWND hEdit1;
HWND hdit;
HWND hCon;
HINSTANCE hInstGlobal;
long rc;             
SOCKET s;  
BOOL connected = FALSE;
char buf[] = &quot;&quot;;
char set_buf[] = &quot;&quot;;
char ip_adresse[25];

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    hInstGlobal=hThisInstance;

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&amp;wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           &quot;Keylogger-Client by Xalon&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           500,                 /* Windows decides the position */
           500,                 /* where the window ends up on the screen */
           530,                 /* The programs width */
           400,                 /* and height in pixels */
           NULL,                /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
  ShowWindow (hwnd, SW_SHOW);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&amp;messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&amp;messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&amp;messages);

    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */

  //aufraeumen
  closesocket(s);
  WSACleanup();
  return messages.wParam;
}

/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{

      if (connected == TRUE)
      {
        rc=recv(s,buf,256,0);                          //vom server empfangen
        buf[rc]='\0';                                  //buf mit NULL Byte abschliesen
        //strcat(set_buf,buf);
        MessageBox(hwnd,buf,&quot;Fehler!&quot;,MB_OK);       
        //SendMessage (hdit, WM_SETTEXT,NULL,(LPARAM) set_buf);

      }

    switch (message)                  /* handle the messages */
    {
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        case WM_CREATE:
           HWND hButton;

           hdit = CreateWindow(&quot;EDIT&quot;,&quot;&quot;,
           WS_CHILD | WS_VISIBLE |
           WS_BORDER | ES_MULTILINE | WS_VSCROLL,
           10,10,500,300,
           hwnd,(HMENU) 1,
           hInstGlobal, NULL);

           hEdit = CreateWindow(&quot;EDIT&quot;,&quot;&quot;,
           WS_CHILD | WS_VISIBLE |
           WS_BORDER ,
           10,320,300,20,
           hwnd,(HMENU) 1,
           hInstGlobal, NULL);

           hCon = CreateWindow(&quot;BUTTON&quot;,&quot;Connect!&quot;,
           WS_CHILD | WS_VISIBLE |
           BS_PUSHBUTTON,
           320,320,170,20,
           hwnd,(HMENU) 1,
           hInstGlobal, NULL);

           break;       

        case WM_COMMAND:
        if (HIWORD(wParam) == BN_CLICKED)
         {
        char *string1;
        string1 = new char[2048];

          if (LOWORD(wParam) == 1)
           {

            SOCKADDR_IN addr;    //Nimmt Daten fuer Socket auf
            rc=startWinsock();   //Winsock starten

            s=socket(AF_INET,SOCK_STREAM,0);                  //Den socket &quot;starten&quot; xD
            memset(&amp;addr,0,sizeof(SOCKADDR_IN)); 
            addr.sin_family=AF_INET;                         //TCP
            addr.sin_port=htons(123);                      //Port 1234 verwenden

            SendMessage (hEdit, WM_GETTEXT, 1024,(LPARAM) ip_adresse);

            addr.sin_addr.s_addr=inet_addr(ip_adresse);     //IP des Servers
            rc=connect(s,(SOCKADDR*)&amp;addr,sizeof(SOCKADDR)); //Socket verbinden

             if(rc==SOCKET_ERROR)
               {
                 MessageBox(hwnd,&quot;Konnte nicht verbinden...&quot;,&quot;Fehler!&quot;,MB_OK);
               }
             else
              {
               MessageBox(hwnd,&quot;Verbunden mit Server!&quot;,&quot;Ok&quot;,MB_OK);
               connected = TRUE ;
               EnableWindow(hCon,FALSE);
              }

            }

         }
           break;
        default:                      
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}

/* ################################################################### */

int startWinsock(void) /* WSDATA Struktur erstellen und Winsock starten */
{
  WSADATA wsa;
  return WSAStartup(MAKEWORD(2,0),&amp;wsa);
}

/* ################################################################### */
</code></pre>
<p>Ich connecte zu einem Server,und empfange dann Daten vom server mit</p>
<pre><code class="language-cpp">if (connected == TRUE)
      {
        rc=recv(s,buf,256,0);                          //vom server empfangen
        buf[rc]='\0';                                  //buf mit NULL Byte abschliesen
        //strcat(set_buf,buf);
        MessageBox(hwnd,buf,&quot;Fehler!&quot;,MB_OK);       
        //SendMessage (hdit, WM_SETTEXT,NULL,(LPARAM) set_buf);

      }
</code></pre>
<p>und zwar bei jedem Durchlauf der CALLBACK funktion.<br />
Aber der Client hängt sich immer auf <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /><br />
Der Server sendet andauernd einzelne Buchstaben zum Client (ein Testserver <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="😃"
    /> )<br />
Weiß jamand warum und was ich dagegen machen kann?</p>
<p>Danke im voraus,<br />
ICZ</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1002934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1002934</guid><dc:creator><![CDATA[ICZ]]></dc:creator><pubDate>Sat, 25 Feb 2006 19:39:25 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Sat, 25 Feb 2006 19:42:58 GMT]]></title><description><![CDATA[<p>Erstell nen Thread für die Netzwerkkommunikation oder nutze WSAAsyncSelect.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1002937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1002937</guid><dc:creator><![CDATA[..............]]></dc:creator><pubDate>Sat, 25 Feb 2006 19:42:58 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Sat, 25 Feb 2006 20:45:59 GMT]]></title><description><![CDATA[<p>.............. schrieb:</p>
<blockquote>
<p>Erstell nen Thread für die Netzwerkkommunikation</p>
</blockquote>
<p>richtich... denn wenn du funktionen innerhalb der wndproc aufrufst, die etwas länger brauchen, dann friert das window ein. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1002973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1002973</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 25 Feb 2006 20:45:59 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Sat, 25 Feb 2006 22:00:39 GMT]]></title><description><![CDATA[<p>Ok danke euch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Jetzt hab ich aber noch ein Problem und zwar bei folgendem Code:</p>
<pre><code class="language-cpp">while(rc!=SOCKET_ERROR) 
  {  
   rc=recv(s,buf,256,0);                         
   buf[rc]='\0';                                  
   strcat(set_buf,buf);
   SendMessage (hdit, WM_SETTEXT,NULL,(LPARAM) set_buf); 
  }
</code></pre>
<p>Ich lese ja immer einen buchstaben aus häng ihn dann an set_buf an und sende dann die SETTEXT Nachricht...<br />
Aber es wird immer nur der als letztes ausgelesene buchstabe in hdit angezeigt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /><br />
Überseh ich da was?<br />
Schon mal danke</p>
<p>Icz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003017</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003017</guid><dc:creator><![CDATA[Icz]]></dc:creator><pubDate>Sat, 25 Feb 2006 22:00:39 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Sat, 25 Feb 2006 22:23:21 GMT]]></title><description><![CDATA[<p>Icz schrieb:</p>
<blockquote>
<pre><code class="language-cpp">while(rc!=SOCKET_ERROR) 
  {  
   rc=recv(s,buf,256,0);                         
   buf[rc]='\0';                                  
   strcat(set_buf,buf);
   SendMessage (hdit, WM_SETTEXT,NULL,(LPARAM) set_buf); 
  }
</code></pre>
</blockquote>
<p>probier dies:</p>
<pre><code class="language-cpp">while(rc!=SOCKET_ERROR) 
  {  
   rc=recv(s,buf,256,0);                         
   buf[rc]='\0';                                  
   strcat(set_buf,buf);
  }
SendMessage (hdit, WM_SETTEXT,NULL,(LPARAM) set_buf);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1003034</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003034</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 25 Feb 2006 22:23:21 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Sun, 26 Feb 2006 11:14:25 GMT]]></title><description><![CDATA[<p>Hmm... das müsste wo wie net es geschrieben hat funzen, da du mit WM_SETTEXT bei einem EditCtrl den gesammten Text, der darin steht durch den den du im LPARAM übergibst ersetzt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003192</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003192</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 26 Feb 2006 11:14:25 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Sun, 26 Feb 2006 11:46:20 GMT]]></title><description><![CDATA[<p>@(D)Evil:<br />
Ich weiß darum hab ichs ja auch mit strcat angehängt<br />
<a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/3162">@net</a>:Der server sendet STÄNDIG Buchstaben,und die sollen sofort angehängt und ins editfeld gesetzt werden,niucht erst nach der Schleife.<br />
Das sollte so doch eigentlich funktionieren o_O</p>
<p>Danke im voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003203</guid><dc:creator><![CDATA[ICZ]]></dc:creator><pubDate>Sun, 26 Feb 2006 11:46:20 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Mon, 27 Feb 2006 19:27:15 GMT]]></title><description><![CDATA[<p>ICZ schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/3162">@net</a>:Der server sendet STÄNDIG Buchstaben,und die sollen sofort angehängt und ins editfeld gesetzt werden,niucht erst nach der Schleife.</p>
</blockquote>
<p>dann kannste mit GetWindowText() oder so erstmal alles aus dem editctrl rausholen, den neuen text anhängen und wieder zurückschreiben. ist aber nicht die beste lösung. es gibt da noch einen trick, cursor ans ende positionieren und dann mit EM_REPLACESEL neuen text anhängen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004581</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004581</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Mon, 27 Feb 2006 19:27:15 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Mon, 27 Feb 2006 20:05:22 GMT]]></title><description><![CDATA[<p>wie man anhängt steht auf <a href="http://www.winapi.net" rel="nofollow">www.winapi.net</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004626</guid><dc:creator><![CDATA[werpunk]]></dc:creator><pubDate>Mon, 27 Feb 2006 20:05:22 GMT</pubDate></item><item><title><![CDATA[Reply to recv bei WINAPI Anwendungen on Fri, 03 Mar 2006 07:52:11 GMT]]></title><description><![CDATA[<p>Machs doch so:</p>
<pre><code class="language-cpp">int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
   MSG msg;
   bool appRunning = true;

   while (appRunning)
   {
      if (PeekMessage(&amp;msg,NULL,0,0,PM_REMOVE))
      {
          TranslateMessage(&amp;msg);
          DispatchMessage(&amp;msg);
      }
      else
      {
          /* Nachrichten empfangen... */

      }
   }

   return 0;   
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1007305</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1007305</guid><dc:creator><![CDATA[xindon (@school)]]></dc:creator><pubDate>Fri, 03 Mar 2006 07:52:11 GMT</pubDate></item></channel></rss>