<?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[Problem mit Popup-Fenstern]]></title><description><![CDATA[<p>Hi,<br />
wenn ich ein Popup-Fenster erstelle und dann draufklicke, kann ich ein paar Sekunden nicht mehr klicken bzw. beim Klicken tut sich nichts. Bei normalen Fenstern ist das nicht so.</p>
<p>Hier ist mal der Code:</p>
<pre><code class="language-cpp">#undef UNICODE
#define _WIN32_WINNT 0x0500

#include &lt;windows.h&gt;

// Variablen
HWND mainwindow;

// MessageHandler
LRESULT _stdcall MessageHandler( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
	switch( uMsg )
	{
		case WM_CLOSE:
			exit( 0 );
			break;
	}

	return DefWindowProc( hWnd, uMsg, wParam, lParam );
}

int CreateMainWindow( )
{
	HINSTANCE instance = GetModuleHandle( 0 );

	// Window-Klasse
	WNDCLASSEX wndClass = { 0 };
	wndClass.cbSize = sizeof( wndClass );
	wndClass.style = 0;
	wndClass.lpfnWndProc = MessageHandler;
	wndClass.cbClsExtra = 0;
	wndClass.cbWndExtra = 0;
	wndClass.hInstance = instance;
	wndClass.hIcon = 0;
	wndClass.hCursor = LoadCursor( 0, IDC_ARROW );
	wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
	wndClass.lpszMenuName = 0;
	wndClass.lpszClassName = &quot;MeineFensterKlasse&quot;;
	wndClass.hIconSm = 0;

	RegisterClassEx( &amp;wndClass );

	// Window
	unsigned long style = WS_POPUP;

	RECT area;
	SystemParametersInfo( SPI_GETWORKAREA, 0, &amp;area, 0 );

	mainwindow = CreateWindowEx( WS_EX_LAYERED, &quot;MeineFensterKlasse&quot;, &quot;MeinFenster&quot;, style, 
		area.right-280-20, area.bottom-300-20, 280, 300, 0, 0, instance, 0 );

		SetLayeredWindowAttributes( mainwindow, 0, 192, LWA_ALPHA );

		ShowWindow( mainwindow, true );

	return 0;
}

// Main-Funktion
int _stdcall WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
	// Hauptfenster erstellen
	CreateMainWindow( );

	// Hauptschleife
	MSG msg = { 0 };

	while( msg.message != WM_QUIT )
	{
		MsgWaitForMultipleObjects( 0, 0, 0, INFINITE, QS_ALLINPUT );

		while( PeekMessage( &amp;msg, mainwindow, 0, 0, PM_REMOVE ) )
		{
			TranslateMessage( &amp;msg );
			DispatchMessage( &amp;msg );
		}
	}

	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/182489/problem-mit-popup-fenstern</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 16:45:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/182489.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 May 2007 12:53:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Popup-Fenstern on Fri, 25 May 2007 12:53:54 GMT]]></title><description><![CDATA[<p>Hi,<br />
wenn ich ein Popup-Fenster erstelle und dann draufklicke, kann ich ein paar Sekunden nicht mehr klicken bzw. beim Klicken tut sich nichts. Bei normalen Fenstern ist das nicht so.</p>
<p>Hier ist mal der Code:</p>
<pre><code class="language-cpp">#undef UNICODE
#define _WIN32_WINNT 0x0500

#include &lt;windows.h&gt;

// Variablen
HWND mainwindow;

// MessageHandler
LRESULT _stdcall MessageHandler( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
	switch( uMsg )
	{
		case WM_CLOSE:
			exit( 0 );
			break;
	}

	return DefWindowProc( hWnd, uMsg, wParam, lParam );
}

int CreateMainWindow( )
{
	HINSTANCE instance = GetModuleHandle( 0 );

	// Window-Klasse
	WNDCLASSEX wndClass = { 0 };
	wndClass.cbSize = sizeof( wndClass );
	wndClass.style = 0;
	wndClass.lpfnWndProc = MessageHandler;
	wndClass.cbClsExtra = 0;
	wndClass.cbWndExtra = 0;
	wndClass.hInstance = instance;
	wndClass.hIcon = 0;
	wndClass.hCursor = LoadCursor( 0, IDC_ARROW );
	wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
	wndClass.lpszMenuName = 0;
	wndClass.lpszClassName = &quot;MeineFensterKlasse&quot;;
	wndClass.hIconSm = 0;

	RegisterClassEx( &amp;wndClass );

	// Window
	unsigned long style = WS_POPUP;

	RECT area;
	SystemParametersInfo( SPI_GETWORKAREA, 0, &amp;area, 0 );

	mainwindow = CreateWindowEx( WS_EX_LAYERED, &quot;MeineFensterKlasse&quot;, &quot;MeinFenster&quot;, style, 
		area.right-280-20, area.bottom-300-20, 280, 300, 0, 0, instance, 0 );

		SetLayeredWindowAttributes( mainwindow, 0, 192, LWA_ALPHA );

		ShowWindow( mainwindow, true );

	return 0;
}

// Main-Funktion
int _stdcall WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
	// Hauptfenster erstellen
	CreateMainWindow( );

	// Hauptschleife
	MSG msg = { 0 };

	while( msg.message != WM_QUIT )
	{
		MsgWaitForMultipleObjects( 0, 0, 0, INFINITE, QS_ALLINPUT );

		while( PeekMessage( &amp;msg, mainwindow, 0, 0, PM_REMOVE ) )
		{
			TranslateMessage( &amp;msg );
			DispatchMessage( &amp;msg );
		}
	}

	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1292224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292224</guid><dc:creator><![CDATA[ProGamer.Coder]]></dc:creator><pubDate>Fri, 25 May 2007 12:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Popup-Fenstern on Fri, 25 May 2007 13:21:08 GMT]]></title><description><![CDATA[<p>Wie sollen wir wissen, was in Deinem Popup vorgeht, wenn Du nur den Code für das Hauptfenster postest?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292242</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292242</guid><dc:creator><![CDATA[Elektronix]]></dc:creator><pubDate>Fri, 25 May 2007 13:21:08 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Popup-Fenstern on Fri, 25 May 2007 13:23:25 GMT]]></title><description><![CDATA[<p>Popupfenster = Hauptfenster<br />
Ich habe Popupfenster geschrieben, weil es mit WS_POPUP erstellt wurde.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292244</guid><dc:creator><![CDATA[ProGamer.Coder]]></dc:creator><pubDate>Fri, 25 May 2007 13:23:25 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Popup-Fenstern on Fri, 25 May 2007 16:15:02 GMT]]></title><description><![CDATA[<p>(OT: Hmm, hat MsgWaitForMultipleObjects()+PeekMessage() irgendwelche Vorteile gegenüber einfach GetMessage() ?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292335</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292335</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Fri, 25 May 2007 16:15:02 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Popup-Fenstern on Fri, 25 May 2007 16:26:25 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/41">@geeky</a>, jetzt wo du's sagst ... eigentlich nicht. Zumindest sind mir noch keine aufgefallen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1292344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1292344</guid><dc:creator><![CDATA[ProGamer.Coder]]></dc:creator><pubDate>Fri, 25 May 2007 16:26:25 GMT</pubDate></item></channel></rss>