<?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[Sim bei Enter drücken (Geräusch)]]></title><description><![CDATA[<p>hallo,<br />
ich habe ein prolem:</p>
<p>ich habe ine EDITBOX mit folglenden eigenschaften: WS_VISIBLE|WS_CHILD|WS_BORDER|ES_AUTOHSCROLL</p>
<p>und wennn ich in der Edit box enter drücke wird eine function aufgerufen,d as fucntioneir ganz gut, nur das problem ist, dieses Geräusch was kommt, dieses sim <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="😞"
    /></p>
<p>wie kann ich dieses geräusch bei enterdrücken deaktivieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/140311/sim-bei-enter-drücken-geräusch</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 03:01:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/140311.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Mar 2006 20:00:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Mon, 13 Mar 2006 20:00:51 GMT]]></title><description><![CDATA[<p>hallo,<br />
ich habe ein prolem:</p>
<p>ich habe ine EDITBOX mit folglenden eigenschaften: WS_VISIBLE|WS_CHILD|WS_BORDER|ES_AUTOHSCROLL</p>
<p>und wennn ich in der Edit box enter drücke wird eine function aufgerufen,d as fucntioneir ganz gut, nur das problem ist, dieses Geräusch was kommt, dieses sim <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="😞"
    /></p>
<p>wie kann ich dieses geräusch bei enterdrücken deaktivieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1015684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1015684</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Mon, 13 Mar 2006 20:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Mon, 13 Mar 2006 22:44:12 GMT]]></title><description><![CDATA[<p>edit control subclassen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1015759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1015759</guid><dc:creator><![CDATA[suchfunktion]]></dc:creator><pubDate>Mon, 13 Mar 2006 22:44:12 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Tue, 14 Mar 2006 12:47:55 GMT]]></title><description><![CDATA[<p>ja, was nützt mir subclassing?<br />
wenn ich nicht weis wie ich das geräusch abschalten kann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016015</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016015</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Tue, 14 Mar 2006 12:47:55 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Tue, 14 Mar 2006 13:15:01 GMT]]></title><description><![CDATA[<p>AFAIK musst Du uMsg von WM_KEYDOWN, WM_CHAR, WM_KEYUP auf wParam == VK_RETURN abfragen und dann gleich zurpckspringen und nicht die standard-WndProc aufrufen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016035</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016035</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 14 Mar 2006 13:15:01 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Tue, 14 Mar 2006 18:49:37 GMT]]></title><description><![CDATA[<p>aber wie?</p>
<p>wenn ich return 0;<br />
break;<br />
etc eingäbe, wird es trotzt augeführt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016264</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Tue, 14 Mar 2006 18:49:37 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Tue, 14 Mar 2006 19:27:29 GMT]]></title><description><![CDATA[<p>Was wird wie ausgeführt? Hast Du das Control Subclassed?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016286</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 14 Mar 2006 19:27:29 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Tue, 14 Mar 2006 19:31:33 GMT]]></title><description><![CDATA[<p>jo, ist subclassed</p>
<pre><code class="language-cpp">LRESULT CALLBACK MsgControl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    char text[255]; //text von hMsg
    char txt[255];
    switch(msg)
    {
        case WM_KEYDOWN :
            if (wParam == VK_RETURN)
            {
                SendMessage(hMsg, WM_GETTEXT, sizeof(text), (ULONG)text);
                SendMessage(hChat, WM_GETTEXT, sizeof(txt), (ULONG)txt);
                send_msg(text, txt);
            }
            break;
        default :
            return CallWindowProc ((WNDPROC) PrevhMsg, hwnd, msg, wParam, lParam);  
    }
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1016291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016291</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Tue, 14 Mar 2006 19:31:33 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Tue, 14 Mar 2006 19:46:58 GMT]]></title><description><![CDATA[<p>Dann bin ich auch überfragt...müsste mich jetzt auch zuerst mal gaaaanz tief einlesen, warum der Beep überhaupt kommt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016300</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016300</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 14 Mar 2006 19:46:58 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 06:56:13 GMT]]></title><description><![CDATA[<p>Der Beep wird eventuell von IsDialogMessage erzeugt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016435</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016435</guid><dc:creator><![CDATA[~]]></dc:creator><pubDate>Wed, 15 Mar 2006 06:56:13 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 07:00:21 GMT]]></title><description><![CDATA[<p>Wenn sich Edit-Control also auf einem Dialog befindet, müsstest du glaube ich noch die Nachricht WM_GETDLGCODE behandeln.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016437</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016437</guid><dc:creator><![CDATA[~]]></dc:creator><pubDate>Wed, 15 Mar 2006 07:00:21 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 12:16:16 GMT]]></title><description><![CDATA[<p>nene, ist auf nem normalen window :</p>
<pre><code class="language-cpp">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 */

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

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, (LPCTSTR)IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, (LPCTSTR)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;Sintima Multi-Chnnel Support System&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           610,                 /* The programs width */
           400,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1016633</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016633</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Wed, 15 Mar 2006 12:16:16 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 12:55:38 GMT]]></title><description><![CDATA[<p>ich werds jetzt testen und dann die lösung hier posten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016671</guid><dc:creator><![CDATA[Gelangweilt]]></dc:creator><pubDate>Wed, 15 Mar 2006 12:55:38 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 13:06:16 GMT]]></title><description><![CDATA[<p>WM_CHAR musst du abfangen dann ist der beep weg hier</p>
<pre><code>LRESULT CALLBACK EditProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
	switch(msg)
	{
		case WM_CHAR:
		case WM_KEYDOWN:
			if( wParam == VK_RETURN )
				return 0;
		break;
	}

	return CallWindowProc( oldEditProc, hWnd, msg, wParam, lParam );
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1016680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016680</guid><dc:creator><![CDATA[Gelangweilt]]></dc:creator><pubDate>Wed, 15 Mar 2006 13:06:16 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 13:10:39 GMT]]></title><description><![CDATA[<p>das problem ist jetzt, das ich in das Edit net schreiben kann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016687</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016687</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Wed, 15 Mar 2006 13:10:39 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 13:21:04 GMT]]></title><description><![CDATA[<p>jop dann machste was falsch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016693</guid><dc:creator><![CDATA[Gelangweilt]]></dc:creator><pubDate>Wed, 15 Mar 2006 13:21:04 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 20:40:46 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">LRESULT CALLBACK MsgControl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    char text[255]; //text von hMsg
    char txt[255];
    switch(msg)
    {
        case WM_CHAR:
        case WM_KEYDOWN:
            if (wParam == VK_RETURN)
            {
                SendMessage(hMsg, WM_GETTEXT, sizeof(text), (ULONG)text);
                SendMessage(hChat, WM_GETTEXT, sizeof(txt), (ULONG)txt);
                send_msg(text, txt);
                return 0;
            }
            break;
        default :
            return CallWindowProc ((WNDPROC) PrevhMsg, hwnd, msg, wParam, lParam);  
    }
    return 0;
}
</code></pre>
<p>is das calback</p>
<p>und hier der ganze code :</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &quot;SinSupport_private.h&quot;
#include&lt;Richedit.h&gt;
/* ::::::: controlls IDs :::::::: */

const int TXT_CHAT = 870;
const int TXT_MSG = 535;
const int BTN_SEND = 90;
const int BTN_CONNECT = 100;
const int CMB_CHANNEL = 54;
const int BTN_DICONNECT = -100;

/* ::::::::::::: CONTROLLS HWNDs :::::::::::: */

static HWND hChat;
static HWND hMsg;
static HWND hSend;
static HWND hChannel;
/* SUBCLASSING VARS */
static LONG_PTR PrevhMsg;
static LONG_PTR PrevhChat;
static LONG_PTR PrevhChannel;

/*  CAllBACK FÜR WINDOW  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* CALLBACK FÜR hCHAT */
LRESULT CALLBACK ChatControl (HWND, UINT, WPARAM, LPARAM);
/* CALLBACK FÜR hMsg */ 
LRESULT CALLBACK MsgControl (HWND, UINT, WPARAM, LPARAM);
/* CHANNEL */
LRESULT CALLBACK ChannelControl (HWND, UINT, WPARAM, LPARAM);
/* SEND FUCNTION */
int send_msg(char *, char *);
/* ADD TEXTFUCNTION */
/*  Make the class name into a global variable  */
char szClassName[ ] = &quot;support&quot;;

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

{
    HINSTANCE insChat =  insChat = LoadLibrary(&quot;RichEd32.dll&quot;); /* LOAD RICHTEXT CONTROLL DLL */
    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 */

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

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, (LPCTSTR)IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, (LPCTSTR)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;Sintima Multi-Chnnel Support System&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           610,                 /* The programs width */
           400,                 /* and height in pixels */
           HWND_DESKTOP,        /* 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, nFunsterStil);

    /* 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 */
    FreeLibrary(insChat);
    return messages.wParam;
}
</code></pre>
<pre><code class="language-cpp">/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    char txt[256]; // Vtext of hMsg
    char text[256];
    int index_design_0;
    int index_code_0;
    int index_info_0;
    int index_info_1;
    int index_support_0;
    switch (message)                  /* handle the messages */
    {
        case WM_CREATE:
            /* ::::: DIE COMBOBOX UND BUTTON ::: */
            hChannel = CreateWindowEx(WS_EX_CLIENTEDGE, &quot;ComboBox&quot;, &quot;&quot;, WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|CBS_HASSTRINGS,
                100,
                10,
                200,
                500,
                hwnd, (HMENU)CMB_CHANNEL, ((LPCREATESTRUCT) lParam) -&gt; hInstance, 0);
            PrevhChannel = SetWindowLongPtr (hChannel, GWLP_WNDPROC, (LONG_PTR) ChannelControl);
            CreateWindowEx(WS_EX_CLIENTEDGE,&quot;Button&quot;,
                                  &quot;Verbinden&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  310, // x-pos
                                  10, //y-pos
                                  100, // width
                                  25, //height
                                  hwnd, (HMENU)BTN_CONNECT, ((LPCREATESTRUCT) lParam) -&gt; hInstance, NULL);
            CreateWindowEx(WS_EX_CLIENTEDGE,&quot;Button&quot;,
                                  &quot;Trennen&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  415, // x-pos
                                  10, //y-pos
                                  100, // width
                                  25, //height
                                  hwnd, (HMENU)BTN_DICONNECT, ((LPCREATESTRUCT) lParam) -&gt; hInstance, NULL);

             /* ::: Chat Control (RichText) */
             hChat = CreateWindowEx(WS_EX_CLIENTEDGE, &quot;RichEdit&quot;, &quot;&quot;, 
                 WS_VISIBLE|WS_CHILD|WS_VSCROLL|ES_MULTILINE|ES_READONLY|ES_AUTOVSCROLL, // style
                 10, // x -Position
                 40, // y-Postiotns
                 580,  // länge
                 290, // höhe
                 hwnd, (HMENU)TXT_CHAT, ((LPCREATESTRUCT) lParam) -&gt; hInstance, 0);
                SendMessage(hChat, EM_SETEVENTMASK, 0, ENM_LINK);
             PrevhChat = SetWindowLongPtr (hChat, GWLP_WNDPROC, (LONG_PTR) ChatControl);
             /* ::: MSG Control (EditBox) */
             hMsg = CreateWindowEx(WS_EX_CLIENTEDGE, &quot;Edit&quot;, &quot;&quot;, 
                 WS_VISIBLE|WS_CHILD|WS_BORDER|ES_AUTOHSCROLL, // style
                 10, // x -Position
                 335, // y-Postiotns
                 510,  // länge
                 25, // höhe
                 hwnd, (HMENU)TXT_MSG, ((LPCREATESTRUCT) lParam) -&gt; hInstance, 0);
                 /* CALLBACK */
             PrevhMsg = SetWindowLongPtr (hMsg, GWLP_WNDPROC, (LONG_PTR) MsgControl);
             /* ::: Button Send Controll ::: */
             hSend = CreateWindowEx(WS_EX_CLIENTEDGE,&quot;Button&quot;,
                                  &quot;Send&quot;,
                                  WS_CHILD | WS_VISIBLE,
                                  525, // x-pos
                                  335, //y-pos
                                  65, // width
                                  25, //height
                                  hwnd, (HMENU)BTN_SEND, ((LPCREATESTRUCT) lParam) -&gt; hInstance, NULL);
            /* SEND MESSAGES */
            index_design_0 = SendMessage(hChannel, CB_ADDSTRING, 0, (LPARAM)&quot;Design Channel&quot;);
            index_code_0 = SendMessage(hChannel, CB_ADDSTRING, 0, (LPARAM)&quot;Programmierer Channel&quot;);
            index_info_0 = SendMessage(hChannel, CB_ADDSTRING, 0, (LPARAM)&quot;Info Channel (allgemein)#1&quot;);
            index_info_1 = SendMessage(hChannel, CB_ADDSTRING, 0, (LPARAM)&quot;Info Channel (allgemein) #2&quot;);
            index_support_0 = SendMessage(hChannel, CB_ADDSTRING, 0, (LPARAM)&quot;Techn. SupportChannel &quot;);
            SetFocus(hMsg);
             break;
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
        case WM_COMMAND:
            if (wParam == BTN_SEND)
            {
                SendMessage(hMsg, WM_GETTEXT, sizeof(text), (ULONG)text);
                SendMessage(hChat, WM_GETTEXT, sizeof(txt), (ULONG)txt);
                send_msg(text, txt); 
            }
            break;
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
        case WM_PAINT:
            PAINTSTRUCT ps;
            HDC         hDC;
            hDC = BeginPaint(hwnd, &amp;ps);
            {
                SetBkMode(hDC,TRANSPARENT);// background color
                TextOut(hDC, 10, 12, &quot;Channel :&quot;, sizeof(&quot;Channel:&quot;));  // Text asugben 
            }
            EndPaint(hwnd, &amp;ps);
            break;
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/          
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }
    return 0;
}

/* :::::::::::::::::::: CALLBACK FÜR hChat :::::::::: */
LRESULT CALLBACK ChatControl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    static HMENU hMenu; // PopUp menu
    POINT  point; // Position
    int select;
    switch(msg)
    {
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ 
        case WM_CONTEXTMENU:
            hMenu = CreatePopupMenu ();    
            InsertMenu (hMenu, 0, MF_BYPOSITION, 0, &quot;Kopieren&quot;);
            POINTSTOPOINT (point, lParam);
            if ((point.x == -1) &amp;&amp; (point.y == -1))
            {
                point.x = point.y = GetSystemMetrics (SM_CXEDGE);
                ClientToScreen (hwnd, &amp;point); // Die Koordinaten auf unser Fenster legen 
            }
            select = (int) TrackPopupMenu (hMenu, TPM_CENTERALIGN|TPM_LEFTBUTTON|TPM_RETURNCMD, point.x, point.y, 0, hwnd, 0);
            if (select == 0)
            {
                // Copy to clipboard    
            }
            break;
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ 
        case WM_NOTIFY:
                if (wParam == EN_LINK)
                {
                MessageBox(NULL, &quot;dfsdf&quot;, &quot;dfsdf&quot;, MB_OK);
                ShellExecute(hChat, &quot;open&quot;, &quot;http://www.Meine-Hompage.de/cpp&quot;, NULL,NULL,SW_SHOWDEFAULT);
                }  
            break;
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ 
        case WM_DESTROY:
            DestroyMenu (hMenu);
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default :    
        return CallWindowProc ((WNDPROC) PrevhChat, hwnd, msg, wParam, lParam);     
    }
    return 0;
}

/* :::::::::::::::::::: CALLBACK FÜR hMsg :::::::::: */
LRESULT CALLBACK MsgControl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    char text[255]; //text von hMsg
    char txt[255];
    switch(msg)
    {
        case WM_CHAR:
        case WM_KEYDOWN:
            if (wParam == VK_RETURN)
            {
                SendMessage(hMsg, WM_GETTEXT, sizeof(text), (ULONG)text);
                SendMessage(hChat, WM_GETTEXT, sizeof(txt), (ULONG)txt);
                send_msg(text, txt);
                return 0;
            }
            break;
        default :
            return CallWindowProc ((WNDPROC) PrevhMsg, hwnd, msg, wParam, lParam);  
    }
    return 0;
}

/* ::::::::::::::::::: CALLBACK FÜR hCHANNEL ::::::::: */

LRESULT CALLBACK ChannelControl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch(msg)
    {

    default:
       return CallWindowProc ((WNDPROC) PrevhChannel, hwnd, msg, wParam, lParam);       
    }
    return 0;
}

/* ::::::::::::::::::::::::::::::::::::::::::::::: FUNCTIONEN :::::::::::::::::::::::::::::::::: */

/*::: SEND FUCNTION ::::*/

int send_msg(char * text, char * txt)
{
    /* Formatierung vorbereiten */
    CHARFORMAT format;
    format.cbSize = sizeof(CHARFORMAT);
    format.dwMask  = CFM_COLOR;
    format.crTextColor = RGB(99, 99, 99);
    format.dwEffects = CFE_BOLD;
    /* Den Text ausgäben */
    SendMessage(hMsg, WM_SETTEXT, 0, (ULONG)&quot;&quot;); // Textfiel von hMsg leeren
    SendMessage(hChat, WM_SETTEXT, 0, (ULONG)strcat(strcat(txt, text), &quot;\r\n&quot;)); // text hinzufügen
    SendMessage(hChat, EM_SETSEL, (WPARAM)sizeof(txt)-1, (LPARAM)(strlen(txt)-1)+(strlen(text)-1)); // text auswählen
    SendMessage(hChat, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&amp;format); // Farbe setzen
    SendMessage(hChat, EM_SCROLL, SB_PAGEDOWN, 0); // Scrollen nach unten
    SetFocus(hMsg); // Focus setzen
    SendMessage(hChat, EM_AUTOURLDETECT, 1, 0);
    return 0;    
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1016697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016697</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Wed, 15 Mar 2006 20:40:46 GMT</pubDate></item><item><title><![CDATA[Reply to Sim bei Enter drücken (Geräusch) on Wed, 15 Mar 2006 21:52:43 GMT]]></title><description><![CDATA[<p>Dein Switchstatement ist falsch.</p>
<p>Du fängst ALLE WM_CHAR Nachrichten ab. Der code unter &quot;default&quot; wird ja nie ausgeführt sondern nachdem break und verlassen des Switchs gibst du dnan am ende der funktion 0 zurück. machs einfach so dann funzts auch</p>
<pre><code>LRESULT CALLBACK MsgControl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    char text[255]; //text von hMsg
    char txt[255];

    switch(msg)
    {
        case WM_CHAR:
        case WM_KEYDOWN:
            if (wParam == VK_RETURN)
            {
                SendMessage(hMsg, WM_GETTEXT, sizeof(text), (ULONG)text);
                SendMessage(hChat, WM_GETTEXT, sizeof(txt), (ULONG)txt);
                send_msg(text, txt);
                return 0;
            }
            break;

    }
    return CallWindowProc ((WNDPROC) PrevhMsg, hwnd, msg, wParam, lParam); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1017185</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017185</guid><dc:creator><![CDATA[Gelangweilt]]></dc:creator><pubDate>Wed, 15 Mar 2006 21:52:43 GMT</pubDate></item></channel></rss>