<?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[Mehrere WinProc]]></title><description><![CDATA[<p>Hallo!<br />
Ich möchte von meinem Hauptfenster aus noch ein paar &quot;nebenfenster&quot; aufmachen. Is es möglich, dass diese &quot;nebenfenster&quot; eine eigene WinProc-funktion haben oder muss ich die ereignisse alle im hauptfenster bearbeiten (was mir noch einfallen würde wäre eine eigene funktion mit den selben parametern zu schreiben, welche jedes mal von der WinProc aufgerufen wird..)</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/219763/mehrere-winproc</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 07:14:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/219763.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Aug 2008 10:21:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mehrere WinProc on Thu, 07 Aug 2008 10:21:56 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich möchte von meinem Hauptfenster aus noch ein paar &quot;nebenfenster&quot; aufmachen. Is es möglich, dass diese &quot;nebenfenster&quot; eine eigene WinProc-funktion haben oder muss ich die ereignisse alle im hauptfenster bearbeiten (was mir noch einfallen würde wäre eine eigene funktion mit den selben parametern zu schreiben, welche jedes mal von der WinProc aufgerufen wird..)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560731</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560731</guid><dc:creator><![CDATA[spong3bob]]></dc:creator><pubDate>Thu, 07 Aug 2008 10:21:56 GMT</pubDate></item><item><title><![CDATA[Reply to Mehrere WinProc on Thu, 07 Aug 2008 11:27:06 GMT]]></title><description><![CDATA[<p>Nein! Grndsätzlich kannst Du beliebige Fensterklassen registrieren und jede kann Ihre eigene WndProc haben.<br />
Theoretisch kannst Du auich nachträglich Fenster subclassen und dadurch eigene/neue WndProc's zuordnen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560782</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 07 Aug 2008 11:27:06 GMT</pubDate></item><item><title><![CDATA[Reply to Mehrere WinProc on Thu, 07 Aug 2008 12:28:02 GMT]]></title><description><![CDATA[<p>ich hab mich gespielt, brings aber nicht zusammen, dass ich 2 fenster aufmach...</p>
<pre><code class="language-cpp">HWND createObjectEditor (HINSTANCE hInstance, HWND hwnd)
{
	WNDCLASSEX wc;
	wc.cbSize        = sizeof(WNDCLASSEX);
    wc.style         = 0;
    wc.lpfnWndProc   = OEWndProc;
    wc.cbClsExtra    = 0;
    wc.cbWndExtra    = 0;
    wc.hInstance     = hInstance;
    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    wc.lpszClassName = NAME_OE;

	RegisterClassEx(&amp;wc);

	objekteditor=CreateWindowEx(
        WS_EX_CLIENTEDGE,
        NAME_OE,
        &quot;ObjektEditor&quot;,
        WS_OVERLAPPEDWINDOW | WS_CHILD,
        CW_USEDEFAULT, CW_USEDEFAULT, 1024, 768,
        hwnd, NULL, hInstance, NULL);

	if(objekteditor == NULL)
		MessageBox(NULL, NAME_OE, &quot;ASDAS&quot;, MB_ICONEXCLAMATION | MB_OK);
	ShowWindow (objekteditor, SW_HIDE);
	return objekteditor;
}
</code></pre>
<pre><code class="language-cpp">int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    WNDCLASSEX wc;
    HWND hwnd;
    MSG Msg;

    wc.cbSize        = sizeof(WNDCLASSEX);
    wc.style         = 0;
    wc.lpfnWndProc   = WndProc;
    wc.cbClsExtra    = 0;
    wc.cbWndExtra    = 0;
    wc.hInstance     = hInstance;
    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    wc.lpszClassName = &quot;-----------&quot;;

    wc.hIcon  = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MYICON));
    wc.hIconSm  = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON, 16, 16, 0);

    if(!RegisterClassEx(&amp;wc))
    {
        MessageBox(NULL, &quot;Window Registration Failed!&quot;, &quot;Error!&quot;,
            MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }
	hInst=hInstance;

    hwnd = CreateWindowEx(
        WS_EX_CLIENTEDGE,
        &quot;-----------------&quot;,
        &quot;------------------------&quot;,
        WS_OVERLAPPEDWINDOW,
        CW_USEDEFAULT, CW_USEDEFAULT, 1024, 768,
        NULL, NULL, hInstance, NULL);
    if(hwnd == NULL)
    {
        MessageBox(NULL, &quot;Window Creation Failed!&quot;, &quot;Error!&quot;,
            MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }
	//InitCommonControls();

    ShowWindow(hwnd, nCmdShow);
    UpdateWindow(hwnd);
	createObjectEditor(hInstance, hwnd);

    while(GetMessage(&amp;Msg, NULL, 0, 0) &gt; 0)
    {
        TranslateMessage(&amp;Msg);
        DispatchMessage(&amp;Msg);
    }
    return (int)Msg.wParam;
}
</code></pre>
<p>die MEssagebox mim namen kommt leider <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>bzw die namen nicht beachen, die wurden bearbeitet</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1560824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1560824</guid><dc:creator><![CDATA[spong3bob]]></dc:creator><pubDate>Thu, 07 Aug 2008 12:28:02 GMT</pubDate></item></channel></rss>