<?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[Kindfenster in ist nur ein clone -.- vom erstfenster]]></title><description><![CDATA[<p>Hallo , ich habe ein problem:<br />
wenn ich ein kindfenstererstelle steht da nur das gleiche drin wie vom 1.fenster</p>
<pre><code class="language-cpp">HWND hwnd = CreateWindow          // Fenster 1
(
    szName,
    &quot;Dies ist unser erstes kleines Fenster&quot;,
    WS_OVERLAPPEDWINDOW,
    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
    NULL, // Handle des Elternfensters nicht vorhanden
    NULL,
    hI,
    NULL
);

ShowWindow   (hwnd, iCmdShow);
UpdateWindow (hwnd);

HWND hwnd2 = CreateWindow        // Fenster 2
(
    szName,
    &quot;Dies ist unser zweites kleines Fenster&quot;,
    WS_OVERLAPPEDWINDOW,
    200, 200, 200, 50,
    hwnd, // Handle des Elternfensters
    NULL,
    NULL,
    NULL
);

ShowWindow   (hwnd2, SW_SHOWNORMAL);
UpdateWindow (hwnd2);
</code></pre>
<p>so schön aber wie mache ich das dass ein einen fenster ein Button mit &quot;A&quot; drauf steht und im anderen fenster ein butten mit &quot;B&quot; ???</p>
<p>ich hoffe ich hab genau mein problem beschrieben</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/206607/kindfenster-in-ist-nur-ein-clone-vom-erstfenster</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 11:13:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/206607.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Feb 2008 19:41:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 19:41:05 GMT]]></title><description><![CDATA[<p>Hallo , ich habe ein problem:<br />
wenn ich ein kindfenstererstelle steht da nur das gleiche drin wie vom 1.fenster</p>
<pre><code class="language-cpp">HWND hwnd = CreateWindow          // Fenster 1
(
    szName,
    &quot;Dies ist unser erstes kleines Fenster&quot;,
    WS_OVERLAPPEDWINDOW,
    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
    NULL, // Handle des Elternfensters nicht vorhanden
    NULL,
    hI,
    NULL
);

ShowWindow   (hwnd, iCmdShow);
UpdateWindow (hwnd);

HWND hwnd2 = CreateWindow        // Fenster 2
(
    szName,
    &quot;Dies ist unser zweites kleines Fenster&quot;,
    WS_OVERLAPPEDWINDOW,
    200, 200, 200, 50,
    hwnd, // Handle des Elternfensters
    NULL,
    NULL,
    NULL
);

ShowWindow   (hwnd2, SW_SHOWNORMAL);
UpdateWindow (hwnd2);
</code></pre>
<p>so schön aber wie mache ich das dass ein einen fenster ein Button mit &quot;A&quot; drauf steht und im anderen fenster ein butten mit &quot;B&quot; ???</p>
<p>ich hoffe ich hab genau mein problem beschrieben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1463534</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463534</guid><dc:creator><![CDATA[Mini-Weich (Mirco Soft)]]></dc:creator><pubDate>Tue, 26 Feb 2008 19:41:05 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 19:44:59 GMT]]></title><description><![CDATA[<p>also ich meine fenster1 + button &quot;A&quot;<br />
fenster1 + button &quot;B&quot;</p>
<p>mfg: MINI-WEICH</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1463536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463536</guid><dc:creator><![CDATA[Mini-Weich (Mirco Soft)]]></dc:creator><pubDate>Tue, 26 Feb 2008 19:44:59 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 19:56:33 GMT]]></title><description><![CDATA[<p>du musst für das 2. fenster eine eigene WNDCLASS registrieren, mit eigener Callback-Routine und eigenem klassennamen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1463551</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463551</guid><dc:creator><![CDATA[Fake oder Echt]]></dc:creator><pubDate>Tue, 26 Feb 2008 19:56:33 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 20:19:15 GMT]]></title><description><![CDATA[<p>ja aber wie ??? ich hab das schonmal probirt aber der zickt dann mit</p>
<pre><code class="language-cpp">int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

int WINAPI WinMain2 (HINSTANCE hThisInstance2,
                    HINSTANCE hPrevInstance2,
                    LPSTR lpszArgument2,
                    int nFunsterStil2)

////////////////////////////////////////////
{
    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;      
    wincl.style = CS_DBLCLKS;                 
    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;Windows App&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           544,                 /* The programs width */
           375,                 /* 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 */
    return messages.wParam;
}

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
 PAINTSTRUCT ps;
 HWND hwndButton;

 switch (message)
 {

  case WM_PAINT:
      hdc = BeginPaint (hwnd, &amp;ps);
      SetBkColor(hdc, RGB(212,208,200) ); 
      TextOut (hdc, 100, 40, &quot;Telefon Nummer:&quot;, 15);
      EndPaint (hwnd, &amp;ps);

  return 0;

  case WM_DESTROY:
    PostQuitMessage (0);
  return 0;
 }

 return DefWindowProc (hwnd, message, wParam, lParam);
}
</code></pre>
<p>aber ab wincl. nimmt der terror sein lauf</p>
<p>oder erstellt project aber es kommt kein fenster mehr ! -.- nur die beispiel.exe im taskt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1463578</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463578</guid><dc:creator><![CDATA[Mini-Weich (Mirco Soft)]]></dc:creator><pubDate>Tue, 26 Feb 2008 20:19:15 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 20:37:39 GMT]]></title><description><![CDATA[<p>nein bitte tue das nicht, bitte!!! xD xD</p>
<p>ne so gehts auch wirklich nicht. es kann nur eine main-funktion geben und in der winapi ist das WinMain, da kannst du nicht einfach eine 2. machen.</p>
<pre><code class="language-cpp">HINSTANCE g_hInst;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ConPrefProc (HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, LPSTR szCmdLine, int iCmdShow)
{
	char MainWin[] = &quot;fenster1&quot;;
	char ConnectWin[] = &quot;fenster2&quot;;

	UNREFERENCED_PARAMETER (hPrI);
	UNREFERENCED_PARAMETER (szCmdLine);

	g_hInst = hI;
	WNDCLASS wc;

	wc.style = CS_HREDRAW | CS_VREDRAW;
	wc.lpfnWndProc = WndProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = hI;
	wc.hIcon = NULL;
	wc.hCursor = LoadCursor (NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
	wc.lpszMenuName = NULL;
	wc.lpszClassName = MainWin;

	RegisterClass (&amp;wc);

	hMain = CreateWindow (MainWin, &quot;test&quot;, WS_OVERLAPPEDWINDOW, 300, 300, x + 410, y + 250, NULL, NULL, hI, NULL);
	ShowWindow (hMain, iCmdShow);
	UpdateWindow (hMain);

	wc.lpfnWndProc = ConPrefProc;
	wc.lpszMenuName = NULL;
	wc.lpszClassName = ConnectWin;

	RegisterClass (&amp;wc);

	hConnectWnd = CreateWindow (ConnectWin, &quot;test2&quot;, WS_SYSMENU | WS_MINIMIZEBOX, 400, 400, x + 285, y + 112, NULL, NULL, hI, NULL);
	ShowWindow (hConnectWnd, SW_HIDE);

	MSG msg;
	while (GetMessage (&amp;msg, NULL, 0, 0))
	{
		TranslateMessage (&amp;msg);
		DispatchMessage (&amp;msg);
	}
	return msg.wParam;
}

LRESULT CALLBACK WndProc (HWND hMain, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
		case WM_DESTROY:
			PostQuitMessage (0);
		return 0;
	}

	return DefWindowProc (hMain, message, wParam, lParam);
}

LRESULT CALLBACK ConPrefProc (HWND hConnectWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
		case WM_DESTROY:
			PostQuitMessage (0);
		return 0;
	}

	return DefWindowProc (hConnectWnd, message, wParam, lParam);
}
</code></pre>
<p>ist mal ein bsp. sollte so funzen <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="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1463594</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463594</guid><dc:creator><![CDATA[Fake oder Echt]]></dc:creator><pubDate>Tue, 26 Feb 2008 20:37:39 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 20:40:20 GMT]]></title><description><![CDATA[<p>DANKE!!!!!!!!!!!!!!!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1463598</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463598</guid><dc:creator><![CDATA[Mini-Weich (Mirco Soft)]]></dc:creator><pubDate>Tue, 26 Feb 2008 20:40:20 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 20:49:44 GMT]]></title><description><![CDATA[<p>so für alle anderen zum complieren berreit !!!</p>
<pre><code class="language-cpp">#include&lt;windows.h&gt;

HINSTANCE g_hInst;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ConPrefProc (HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, LPSTR szCmdLine, int iCmdShow)
{
    char MainWin[] = &quot;fenster1&quot;;

    char ConnectWin[] = &quot;fenster2&quot;;

    UNREFERENCED_PARAMETER (hPrI);
    UNREFERENCED_PARAMETER (szCmdLine);

    g_hInst = hI;
    WNDCLASS wc;
    HWND  hConnectWnd,hMain;

    wc.style = CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc = WndProc;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = hI;
    wc.hIcon = NULL;
    wc.hCursor = LoadCursor (NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
    wc.lpszMenuName = NULL;
    wc.lpszClassName = MainWin;

    RegisterClass (&amp;wc);

    hMain = CreateWindow (MainWin, &quot;test&quot;, WS_OVERLAPPEDWINDOW, 300, 300,410, 250, NULL, NULL, hI, NULL);
    ShowWindow (hMain, iCmdShow);

    UpdateWindow (hMain);

    wc.lpfnWndProc = ConPrefProc;
    wc.lpszMenuName = NULL;
    wc.lpszClassName = ConnectWin;

    RegisterClass (&amp;wc);

    hConnectWnd = CreateWindow (ConnectWin, &quot;test2&quot;, WS_OVERLAPPEDWINDOW , 300, 300, 410, 250, NULL, NULL, hI, NULL);
    ShowWindow (hConnectWnd, iCmdShow);

    MSG msg;
    while (GetMessage (&amp;msg, NULL, 0, 0))
    {
        TranslateMessage (&amp;msg);
        DispatchMessage (&amp;msg);
    }
    return msg.wParam;
}

LRESULT CALLBACK WndProc (HWND hMain, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
        case WM_DESTROY:
            PostQuitMessage (0);
        return 0;
    }

    return DefWindowProc (hMain, message, wParam, lParam);
}

LRESULT CALLBACK ConPrefProc (HWND hConnectWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
        case WM_DESTROY:
            PostQuitMessage (0);
        return 0;
    }

    return DefWindowProc (hConnectWnd, message, wParam, lParam);
}
</code></pre>
<p><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="😉"
    /> <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="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1463606</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463606</guid><dc:creator><![CDATA[Mini-Weich (Mirco Soft)]]></dc:creator><pubDate>Tue, 26 Feb 2008 20:49:44 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Tue, 26 Feb 2008 21:02:08 GMT]]></title><description><![CDATA[<p>so mit text (sorry fürs 3er posten ! ) <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="😉"
    /> <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="😃"
    /></p>
<pre><code class="language-cpp">#include&lt;windows.h&gt;

HINSTANCE g_hInst;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK ConPrefProc (HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, LPSTR szCmdLine, int iCmdShow)
{
    char MainWin[] = &quot;fenster1&quot;;

    char ConnectWin[] = &quot;fenster2&quot;;

    UNREFERENCED_PARAMETER (hPrI);
    UNREFERENCED_PARAMETER (szCmdLine);

    g_hInst = hI;
    WNDCLASS wc;
    HWND  hConnectWnd,hMain;

    wc.style = CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc = WndProc;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = hI;
    wc.hIcon = NULL;
    wc.hCursor = LoadCursor (NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
    wc.lpszMenuName = NULL;
    wc.lpszClassName = MainWin;

    RegisterClass (&amp;wc);

    hMain = CreateWindow (MainWin, &quot;test&quot;, WS_OVERLAPPEDWINDOW, 300, 300,410, 250, NULL, NULL, hI, NULL);
    ShowWindow (hMain, iCmdShow);

    UpdateWindow (hMain);

    wc.lpfnWndProc = ConPrefProc;
    wc.lpszMenuName = NULL;
    wc.lpszClassName = ConnectWin;

    RegisterClass (&amp;wc);

    hConnectWnd = CreateWindow (ConnectWin, &quot;test2&quot;,WS_SYSMENU | WS_MINIMIZEBOX, 400, 400, 285,112, NULL, NULL, hI, NULL);
    ShowWindow (hConnectWnd, iCmdShow);

    MSG msg;
    while (GetMessage (&amp;msg, NULL, 0, 0))
    {
        TranslateMessage (&amp;msg);
        DispatchMessage (&amp;msg);
    }
    return msg.wParam;
}

LRESULT CALLBACK WndProc (HWND hMain, UINT message, WPARAM wParam, LPARAM lParam)
{
   HDC hdc;
  PAINTSTRUCT ps;

 switch (message)
 {

  case WM_PAINT:
      hdc = BeginPaint (hMain, &amp;ps);
      SetBkColor(hdc, RGB(212,208,200) );
      TextOut (hdc, 100, 40, &quot;Fenster A&quot;, 9);
      EndPaint (hMain, &amp;ps);

  return 0; 
        case WM_DESTROY:
            PostQuitMessage (0);
        return 0;
    }

    return DefWindowProc (hMain, message, wParam, lParam);
}

LRESULT CALLBACK ConPrefProc (HWND hConnectWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    HDC hdc;
  PAINTSTRUCT ps;

 switch (message)
 {

  case WM_PAINT:
      hdc = BeginPaint (hConnectWnd, &amp;ps);
      SetBkColor(hdc, RGB(212,208,200) );
      TextOut (hdc, 100, 40, &quot;Fenster B&quot;, 9);
      EndPaint (hConnectWnd, &amp;ps);

  return 0; 
        case WM_DESTROY:
            PostQuitMessage (0);
        return 0;
    }

    return DefWindowProc (hConnectWnd, message, wParam, lParam);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1463619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463619</guid><dc:creator><![CDATA[Mini-Weich (Mirco Soft)]]></dc:creator><pubDate>Tue, 26 Feb 2008 21:02:08 GMT</pubDate></item><item><title><![CDATA[Reply to Kindfenster in ist nur ein clone -.- vom erstfenster on Wed, 27 Feb 2008 08:08:53 GMT]]></title><description><![CDATA[<p>Mini-Weich (Mirco Soft) schrieb:</p>
<blockquote>
<p>(sorry fürs 3er posten ! )</p>
</blockquote>
<p>Wenn Du Dich registrieren lassen würdest, könntest Du Deine eigenen Posts nachträglich bearbeiten. Erspart die Mehrfachposts. <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/1463754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1463754</guid><dc:creator><![CDATA[Elektronix]]></dc:creator><pubDate>Wed, 27 Feb 2008 08:08:53 GMT</pubDate></item></channel></rss>