<?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[Einfache Dialog-Anwendung]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich programmiere mit VS2008.</p>
<p>Ich würde gerne ein Programm in C++ schreiben, welches auf einem Dialog statt auf einem normalen Window basiert.</p>
<p>Mein jetziger Code:</p>
<pre><code class="language-cpp">// tool.cpp : Definiert den Einstiegspunkt für die Anwendung.

#include &quot;stdafx.h&quot;
#include &quot;tool.h&quot;

// Vorwärtsdeklarationen der in diesem Codemodul enthaltenen Funktionen:
INT_PTR CALLBACK	DialogProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK	About(HWND, UINT, WPARAM, LPARAM);

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
	return DialogBox (hInstance, MAKEINTRESOURCE(IDD_MAINDLG), 0, DialogProc);
}

// Meldungshandler für HauptDialog.
INT_PTR CALLBACK DialogProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{    
     switch (message)
     {
	 case WM_INITDIALOG:
		 return TRUE;

     case WM_CLOSE:
		 EndDialog (hwnd,0);
		 return TRUE;  
     }
	 return FALSE;
}

// Meldungshandler für Infofeld.
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	UNREFERENCED_PARAMETER(lParam);
	switch (message)
	{
	case WM_INITDIALOG:
		return (INT_PTR)TRUE;

	case WM_COMMAND:
		if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
		{
			EndDialog(hDlg, LOWORD(wParam));
			return (INT_PTR)TRUE;
		}
		break;
	}
	return (INT_PTR)FALSE;
}
</code></pre>
<p>Ich weiß nicht, ob der Code vollkommen richtig ist, aber er funktioniert^^.<br />
Vielleicht habt ihr einen besseren Vorchlag..Wäre cool.</p>
<p>Also das eigentliche Problem ist, dass der IDD_MAINDLG im Editor ganz normal aussieht (er beinhaltet ein Tab Control), aber als kompilierte Anwendung das Tab Control nicht funktioniert und anders aussieht:</p>
<p><a href="http://img151.imageshack.us/my.php?image=toolir2.jpg" rel="nofollow">http://img151.imageshack.us/my.php?image=toolir2.jpg</a></p>
<p>Ich hoffe, ihr könnt mir helfen,</p>
<p>MfG,<br />
echo&lt;delta&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/217750/einfache-dialog-anwendung</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 08:49:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/217750.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Jul 2008 18:12:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Einfache Dialog-Anwendung on Thu, 10 Jul 2008 18:12:29 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich programmiere mit VS2008.</p>
<p>Ich würde gerne ein Programm in C++ schreiben, welches auf einem Dialog statt auf einem normalen Window basiert.</p>
<p>Mein jetziger Code:</p>
<pre><code class="language-cpp">// tool.cpp : Definiert den Einstiegspunkt für die Anwendung.

#include &quot;stdafx.h&quot;
#include &quot;tool.h&quot;

// Vorwärtsdeklarationen der in diesem Codemodul enthaltenen Funktionen:
INT_PTR CALLBACK	DialogProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK	About(HWND, UINT, WPARAM, LPARAM);

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
	return DialogBox (hInstance, MAKEINTRESOURCE(IDD_MAINDLG), 0, DialogProc);
}

// Meldungshandler für HauptDialog.
INT_PTR CALLBACK DialogProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{    
     switch (message)
     {
	 case WM_INITDIALOG:
		 return TRUE;

     case WM_CLOSE:
		 EndDialog (hwnd,0);
		 return TRUE;  
     }
	 return FALSE;
}

// Meldungshandler für Infofeld.
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	UNREFERENCED_PARAMETER(lParam);
	switch (message)
	{
	case WM_INITDIALOG:
		return (INT_PTR)TRUE;

	case WM_COMMAND:
		if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
		{
			EndDialog(hDlg, LOWORD(wParam));
			return (INT_PTR)TRUE;
		}
		break;
	}
	return (INT_PTR)FALSE;
}
</code></pre>
<p>Ich weiß nicht, ob der Code vollkommen richtig ist, aber er funktioniert^^.<br />
Vielleicht habt ihr einen besseren Vorchlag..Wäre cool.</p>
<p>Also das eigentliche Problem ist, dass der IDD_MAINDLG im Editor ganz normal aussieht (er beinhaltet ein Tab Control), aber als kompilierte Anwendung das Tab Control nicht funktioniert und anders aussieht:</p>
<p><a href="http://img151.imageshack.us/my.php?image=toolir2.jpg" rel="nofollow">http://img151.imageshack.us/my.php?image=toolir2.jpg</a></p>
<p>Ich hoffe, ihr könnt mir helfen,</p>
<p>MfG,<br />
echo&lt;delta&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1545256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1545256</guid><dc:creator><![CDATA[echo*lt*delta*gt*]]></dc:creator><pubDate>Thu, 10 Jul 2008 18:12:29 GMT</pubDate></item><item><title><![CDATA[Reply to Einfache Dialog-Anwendung on Thu, 10 Jul 2008 18:15:44 GMT]]></title><description><![CDATA[<p>Falsches Forum, gehört ins WinApi Forum.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1545258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1545258</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 10 Jul 2008 18:15:44 GMT</pubDate></item><item><title><![CDATA[Reply to Einfache Dialog-Anwendung on Thu, 10 Jul 2008 18:31:40 GMT]]></title><description><![CDATA[<p>sry, ich mache einen neuen Thread im WinApi-Forum auf.</p>
<p>Mfg,<br />
echo&lt;delta&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1545268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1545268</guid><dc:creator><![CDATA[echo*lt*delta*gt*]]></dc:creator><pubDate>Thu, 10 Jul 2008 18:31:40 GMT</pubDate></item></channel></rss>