<?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[MDI - Problem]]></title><description><![CDATA[<p>hallo leute,</p>
<p>ich wollte heute zum ersten mal eine anwendung schreiben, die aus diesen MDI-fenstern besteht.</p>
<p>das frame-window ist mein hauptdialog, mein MDIClient-Window konnte ich auch schon problemlos erstellen.<br />
Mittlerweile habe ich auch ein Child, dass ich auf der Client-Ebene bewegen, vergrößern, maximieren usw kann.</p>
<p>nur habe ich ein problem:<br />
selbst wenn das child angeklickt und aktiviert ist, bleibt die titelleiste grau.<br />
muss ich irgendeine bestimmte nachricht abfangen damit das aktivierte child-fenster eine blaue titelleiste erhält?</p>
<p>ty</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/118944/mdi-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 17:08:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/118944.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Aug 2005 18:59:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MDI - Problem on Thu, 25 Aug 2005 18:59:30 GMT]]></title><description><![CDATA[<p>hallo leute,</p>
<p>ich wollte heute zum ersten mal eine anwendung schreiben, die aus diesen MDI-fenstern besteht.</p>
<p>das frame-window ist mein hauptdialog, mein MDIClient-Window konnte ich auch schon problemlos erstellen.<br />
Mittlerweile habe ich auch ein Child, dass ich auf der Client-Ebene bewegen, vergrößern, maximieren usw kann.</p>
<p>nur habe ich ein problem:<br />
selbst wenn das child angeklickt und aktiviert ist, bleibt die titelleiste grau.<br />
muss ich irgendeine bestimmte nachricht abfangen damit das aktivierte child-fenster eine blaue titelleiste erhält?</p>
<p>ty</p>
]]></description><link>https://www.c-plusplus.net/forum/post/858614</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/858614</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Thu, 25 Aug 2005 18:59:30 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Thu, 25 Aug 2005 19:15:58 GMT]]></title><description><![CDATA[<p>achso es handelt sich wie gesagt um einen dialog...normalerweise geb ich dort immer 0 zurück wenn eine nachricht unbehandelt bleibt (bzw DefDlgProc)...</p>
<p>aber jetzt soll ich ja DefFrameProc verwenden...dann bekomm ich aber komische anzeigefehler sobald ich das fenster maximiere...deswegen geb ich DefFrameProc nur zurück, wenn die nachricht WM_COMMAND, WM_MENUCHAR oder WM_SETFOCUS ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/858622</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/858622</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Thu, 25 Aug 2005 19:15:58 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Sun, 28 Aug 2005 13:49:34 GMT]]></title><description><![CDATA[<p>help pls!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/860082</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/860082</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Sun, 28 Aug 2005 13:49:34 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Sun, 28 Aug 2005 16:34:47 GMT]]></title><description><![CDATA[<p>wenn du hilfe brauchst, zeige den code <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/860178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/860178</guid><dc:creator><![CDATA[coolio]]></dc:creator><pubDate>Sun, 28 Aug 2005 16:34:47 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Sun, 28 Aug 2005 19:30:18 GMT]]></title><description><![CDATA[<p>erstellung des hauptfensters (dient als frame):</p>
<pre><code>// create the main dialog window
m_mainWindow = CreateDialogParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_MAIN), NULL, WndCallback, (LPARAM)this);
</code></pre>
<p>so oft wie möglich:</p>
<pre><code>if (PeekMessage(&amp;message, NULL, 0, 0, PM_REMOVE))
{
	if (!TranslateMDISysAccel(m_mdiClientWindow, &amp;message))
	{
		TranslateMessage(&amp;message);
		DispatchMessage(&amp;message);
	}
}
</code></pre>
<p>bei WM_INITDIALOG:</p>
<pre><code>// create the mdi client window
CLIENTCREATESTRUCT ccs;
ZeroMemory(&amp;ccs, sizeof(CLIENTCREATESTRUCT));

client-&gt;m_mdiClientWindow = CreateWindowEx(WS_EX_CLIENTEDGE, &quot;MDIClient&quot;, NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL, 0, 0, 0, 0, dialog, NULL, GetModuleHandle(NULL), &amp;ccs);

if (!client-&gt;m_mdiClientWindow)
{
	client-&gt;m_mainWindow					= NULL;

	return FALSE;
}

// set the right size of all elements of the window
RECT clientRect;

if (!GetClientRect(dialog, &amp;clientRect))
{
	client-&gt;m_mainWindow					= NULL;

	return FALSE;
}

// set the main icon
SetClassLong(dialog, GCL_HICON, (LONG)(LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAIN_ICON))));
SetClassLong(dialog, GCL_HICONSM, (LONG)(LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAIN_ICON))));

// litte test
MDICREATESTRUCT mcs;
ZeroMemory(&amp;mcs, sizeof(MDICREATESTRUCT));

mcs.hOwner = GetModuleHandle(NULL);
mcs.szClass = &quot;MDIChild&quot;;
mcs.szTitle = &quot;test :)&quot;;
mcs.x = 100; mcs.y = 100; mcs.cx = 300; mcs.cy = 200;
mcs.style = WS_VISIBLE | WS_CHILD | WS_OVERLAPPEDWINDOW;
SendMessage(client-&gt;m_mdiClientWindow, WM_MDICREATE, 0, (LPARAM)&amp;mcs);

client-&gt;ResizeChildWindows(clientRect.right, clientRect.bottom);

ShowWindow(dialog, SW_SHOW);
SetForegroundWindow(dialog);

return TRUE;
</code></pre>
<pre><code>case WM_COMMAND:
case WM_MENUCHAR:
case WM_SETFOCUS:
{
	if (client)
	{
		return DefFrameProc(dialog, client-&gt;m_mdiClientWindow, message, wParam, lParam);
	}
} break;
</code></pre>
<p>die mdi-child-callback ruft nur DefMDIChildProc() auf...</p>
<p>thx 4 help, mdi <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/860280</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/860280</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Sun, 28 Aug 2005 19:30:18 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Sun, 28 Aug 2005 19:51:40 GMT]]></title><description><![CDATA[<p>wieso ist dein mainwnd ein dialog? vermutlich ist das das problem.<br />
wieso nicht einfach<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/multipledocumentinterface/multipledocumentinterfacereference/multipledocumentinterfacefunctions/createmdiwindow.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/multipledocumentinterface/multipledocumentinterfacereference/multipledocumentinterfacefunctions/createmdiwindow.asp</a><br />
allgemeines<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/WindowsUserInterface/Windowing/MultipleDocumentInterface.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/WindowsUserInterface/Windowing/MultipleDocumentInterface.asp</a><br />
beispiel<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/multipledocumentinterface/usingthemultipledocumentinterface.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/multipledocumentinterface/usingthemultipledocumentinterface.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/860292</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/860292</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Sun, 28 Aug 2005 19:51:40 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Sun, 28 Aug 2005 19:56:12 GMT]]></title><description><![CDATA[<p>thx erstmal.</p>
<p>hab die msdn auch schon durchwühlt.<br />
CreateMDIWindow macht keinen unterschied zu WM_MDICREATE.</p>
<p>mit dem dialog: naja wär halt für mich praktischer zu designen...ich werds mal mit nem normalen window probieren. wär echt schade wenns am dialog liegen würde.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/860296</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/860296</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Sun, 28 Aug 2005 19:56:12 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Mon, 29 Aug 2005 16:07:36 GMT]]></title><description><![CDATA[<p>öhm, normal nimmt man für nen normalen dialog in so nem fall nen formview, alledings weiß ich net, ob die nur bei mfc existiert..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/860795</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/860795</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 29 Aug 2005 16:07:36 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Mon, 29 Aug 2005 16:43:27 GMT]]></title><description><![CDATA[<p>@(D)Evil<br />
es geht auch mit der winapi, du musst nur den dialog als child vom fenster machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/860815</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/860815</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Mon, 29 Aug 2005 16:43:27 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Tue, 06 Sep 2005 12:52:07 GMT]]></title><description><![CDATA[<p>ok es geht jetzt einigermaßen gut wenn ich mein hauptfenster mit CreateWindow() erstelle.</p>
<p>beim hauptfenster ist das auch kein problem, da sind nur ein paar buttons und das client-fenster drauf.<br />
allerdings würde ich gerne für die mdi-childs dialoge verwenden.</p>
<p>ist das irgendwie möglich?</p>
<p>ty</p>
]]></description><link>https://www.c-plusplus.net/forum/post/866217</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/866217</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Tue, 06 Sep 2005 12:52:07 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Wed, 21 Sep 2005 20:03:00 GMT]]></title><description><![CDATA[<p>keine möglichkeit?<br />
es ist doch sehr umständlich jedes eingabefeld/label usw mit createwindow zu erstellen...es muss doch eine komfortablere lösung geben ?!?<br />
außerdem muss man alle styles manuell setzen, schriftart usw...</p>
<p>pls help!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/877397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/877397</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Wed, 21 Sep 2005 20:03:00 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Wed, 21 Sep 2005 20:31:46 GMT]]></title><description><![CDATA[<p>miller_m schrieb:</p>
<blockquote>
<p>@(D)Evil<br />
es geht auch mit der winapi, du musst nur den dialog als child vom fenster machen.</p>
</blockquote>
<p>so geht es. afaik findest du in den msdn samples etwas darüber.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/877417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/877417</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Wed, 21 Sep 2005 20:31:46 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Thu, 22 Sep 2005 11:47:34 GMT]]></title><description><![CDATA[<p>aha...also sollte das mdi-child WS_OVERLAPPEDWINDOW sein, der dialog ein fenster komplett ohne rahmen, den ich dann ins mdi-child als child-window einbinde?</p>
<p>und in der callback des mdi-childs sollte es in etwa so aussehen(?):</p>
<pre><code>LRESULT CALLBACK MdiChildCallback(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
        case WM_CREATE:
        {
            CreateDialog(...);
        } break;
    }

    return DefMDIChildProc(window, message, wParam, lParam);
}
</code></pre>
<p>und dann bräuchte ich noch eine zusätzliche callback funktion für den dialog?</p>
<p>danke, mdi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/877774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/877774</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Thu, 22 Sep 2005 11:47:34 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Thu, 22 Sep 2005 14:35:45 GMT]]></title><description><![CDATA[<p>so in etwa, hab es schon lange nicht mehr gemacht, aber es hört sich vernünftig an. du könntest ja in der dlgcallback einfach die msg weiterleiten ala</p>
<pre><code class="language-cpp">SendMessage(GetParent(hwnd), msg, wParam, lParam);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/877934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/877934</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Thu, 22 Sep 2005 14:35:45 GMT</pubDate></item><item><title><![CDATA[Reply to MDI - Problem on Thu, 22 Sep 2005 16:51:58 GMT]]></title><description><![CDATA[<p>ok vielen dank es funktioniert jetzt soweit!<br />
zwar etwas umständlich wegen der 2ten callback, aber immer noch besser als alles manuell zu erstellen!</p>
<p>und die einzige nachricht, die ich weiterleite, ist WM_SIZE, den rest brauche ich gar nicht.</p>
<p>10x, mdi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/878021</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/878021</guid><dc:creator><![CDATA[mdi]]></dc:creator><pubDate>Thu, 22 Sep 2005 16:51:58 GMT</pubDate></item></channel></rss>