<?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[Dialog wird nicht angezeigt]]></title><description><![CDATA[<p>Moin,<br />
ich versuche grade, mir einen kleinen taschenrechner zu schreiben, um bissjen was über das WinApi zu lernen.<br />
Jedoch wird das fenster nicht angezeigt.<br />
Kann mir jemand sagen, warum das so ist und was ich ändern muss ?</p>
<p>Thx</p>
<p>hier ist mein quellcode:</p>
<pre><code>// taschenrechner.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
//

#include &quot;stdafx.h&quot;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;windows.h&gt;

#include &quot;resource.h&quot;

HWND hWnd = NULL;
HANDLE hEvent;
HINSTANCE hInst;

void test(HWND hDlg) {

}

BOOL WINAPI Taschenrechner(HWND hDlg,unsigned msg,WPARAM wP,LPARAM lp) 
{
	switch(msg) {
	  case WM_INITDIALOG:
		  test(hDlg);
          break;
	  case WM_COMMAND:
		  switch(LOWORD(wP)) {

	        case IDC_BUTTON1:
			    test(hDlg);
				return true;
		  }
	}

	return true;
}

int WINAPI WinMain(HINSTANCE hInst1,HINSTANCE hPrevInst,LPSTR lpCmd,int nShowCmd)
{
  MSG msg;
  hInst=hInst1;

  hWnd = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_Dialog1),NULL,Taschenrechner,NULL);
  ShowWindow(hWnd, SW_SHOW);

  while(GetMessage(&amp;msg,0,0,0))
  {
	  if(IsWindow(hWnd)) 
	  {
          TranslateMessage(&amp;msg);
		  DispatchMessage(&amp;msg);
	   }
	       else
		   {
		    TranslateMessage(&amp;msg);
			DispatchMessage(&amp;msg);
    	   }
    }
  return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/200067/dialog-wird-nicht-angezeigt</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 02:53:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/200067.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Dec 2007 12:59:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dialog wird nicht angezeigt on Mon, 10 Dec 2007 12:59:21 GMT]]></title><description><![CDATA[<p>Moin,<br />
ich versuche grade, mir einen kleinen taschenrechner zu schreiben, um bissjen was über das WinApi zu lernen.<br />
Jedoch wird das fenster nicht angezeigt.<br />
Kann mir jemand sagen, warum das so ist und was ich ändern muss ?</p>
<p>Thx</p>
<p>hier ist mein quellcode:</p>
<pre><code>// taschenrechner.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
//

#include &quot;stdafx.h&quot;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;windows.h&gt;

#include &quot;resource.h&quot;

HWND hWnd = NULL;
HANDLE hEvent;
HINSTANCE hInst;

void test(HWND hDlg) {

}

BOOL WINAPI Taschenrechner(HWND hDlg,unsigned msg,WPARAM wP,LPARAM lp) 
{
	switch(msg) {
	  case WM_INITDIALOG:
		  test(hDlg);
          break;
	  case WM_COMMAND:
		  switch(LOWORD(wP)) {

	        case IDC_BUTTON1:
			    test(hDlg);
				return true;
		  }
	}

	return true;
}

int WINAPI WinMain(HINSTANCE hInst1,HINSTANCE hPrevInst,LPSTR lpCmd,int nShowCmd)
{
  MSG msg;
  hInst=hInst1;

  hWnd = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_Dialog1),NULL,Taschenrechner,NULL);
  ShowWindow(hWnd, SW_SHOW);

  while(GetMessage(&amp;msg,0,0,0))
  {
	  if(IsWindow(hWnd)) 
	  {
          TranslateMessage(&amp;msg);
		  DispatchMessage(&amp;msg);
	   }
	       else
		   {
		    TranslateMessage(&amp;msg);
			DispatchMessage(&amp;msg);
    	   }
    }
  return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1418093</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1418093</guid><dc:creator><![CDATA[Das-wiesel123]]></dc:creator><pubDate>Mon, 10 Dec 2007 12:59:21 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog wird nicht angezeigt on Mon, 10 Dec 2007 13:10:20 GMT]]></title><description><![CDATA[<p>Retunriert CreateDialogParam einen Wert?<br />
Wenn nicht, was sagt GetLastError?<br />
Ist die Ressource IDD_Dialog1 wirklich vorhanden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1418104</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1418104</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 10 Dec 2007 13:10:20 GMT</pubDate></item><item><title><![CDATA[Reply to Dialog wird nicht angezeigt on Mon, 10 Dec 2007 15:24:55 GMT]]></title><description><![CDATA[<p>Martin Richter schrieb:</p>
<blockquote>
<p>Retunriert CreateDialogParam einen Wert?<br />
Wenn nicht, was sagt GetLastError?<br />
Ist die Ressource IDD_Dialog1 wirklich vorhanden?</p>
</blockquote>
<p>Keine ahnung, ob CreateDialogParam einen wert zurück gibt.<br />
Ich bin mir aber 100%tig sicher, dass IDD_Dialog1 exisitert.</p>
<p>frohe weihnachten :xmas1:</p>
<p>Wiesel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1418216</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1418216</guid><dc:creator><![CDATA[Das-Wiesel~]]></dc:creator><pubDate>Mon, 10 Dec 2007 15:24:55 GMT</pubDate></item></channel></rss>