<?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[Eigene Client-Windows mit Keyboard-Fokus?]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich habe eine Client-Klasse erstellt mit WNDCLASSEX + CreateWindowEx. Jedoch bekommt jenes Fenster kein Focus, wenn ich drauf klicke.</p>
<pre><code>WNDCLASSEX wc;

wc.cbSize			= sizeof( wc );
wc.cbClsExtra		= 0;
wc.cbWndExtra		= 0;
wc.hbrBackground	= (HBRUSH)(COLOR_APPWORKSPACE+1);
wc.hCursor			= LoadCursor( NULL, IDC_ARROW );
wc.hIcon			= LoadIcon  ( NULL, IDI_APPLICATION );
wc.hIconSm			= LoadIcon  ( NULL, IDI_APPLICATION );
wc.hInstance		= GetModuleHandle( NULL );
wc.lpfnWndProc		= CWindow::WindowProcedure;
wc.lpszClassName	= OPENGLWINDOW_CLASS;
wc.lpszMenuName		= NULL;
wc.style			= CS_HREDRAW | CS_VREDRAW | CS_OWNDC;

unsigned dwExStyle = WS_EX_CLIENTEDGE;
unsigned dwStyle   = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DLGFRAME;

// Create window
m_hWnd = CreateWindowEx( dwExStyle, OPENGLWINDOW_CLASS, &quot;OpenGL&quot;,
	dwStyle, 0, 0, 100, 100,
	pParent-&gt;GetHandle( ), NULL, GetModuleHandle( NULL ), this );
</code></pre>
<p>Was ist hier noch falsch? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":O"
      alt="😮"
    /></p>
<p>Danke für jede Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/165978/eigene-client-windows-mit-keyboard-fokus</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 23:56:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/165978.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 24 Nov 2006 19:30:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Eigene Client-Windows mit Keyboard-Fokus? on Fri, 24 Nov 2006 19:30:09 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich habe eine Client-Klasse erstellt mit WNDCLASSEX + CreateWindowEx. Jedoch bekommt jenes Fenster kein Focus, wenn ich drauf klicke.</p>
<pre><code>WNDCLASSEX wc;

wc.cbSize			= sizeof( wc );
wc.cbClsExtra		= 0;
wc.cbWndExtra		= 0;
wc.hbrBackground	= (HBRUSH)(COLOR_APPWORKSPACE+1);
wc.hCursor			= LoadCursor( NULL, IDC_ARROW );
wc.hIcon			= LoadIcon  ( NULL, IDI_APPLICATION );
wc.hIconSm			= LoadIcon  ( NULL, IDI_APPLICATION );
wc.hInstance		= GetModuleHandle( NULL );
wc.lpfnWndProc		= CWindow::WindowProcedure;
wc.lpszClassName	= OPENGLWINDOW_CLASS;
wc.lpszMenuName		= NULL;
wc.style			= CS_HREDRAW | CS_VREDRAW | CS_OWNDC;

unsigned dwExStyle = WS_EX_CLIENTEDGE;
unsigned dwStyle   = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DLGFRAME;

// Create window
m_hWnd = CreateWindowEx( dwExStyle, OPENGLWINDOW_CLASS, &quot;OpenGL&quot;,
	dwStyle, 0, 0, 100, 100,
	pParent-&gt;GetHandle( ), NULL, GetModuleHandle( NULL ), this );
</code></pre>
<p>Was ist hier noch falsch? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":O"
      alt="😮"
    /></p>
<p>Danke für jede Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1180927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180927</guid><dc:creator><![CDATA[_ProfEich]]></dc:creator><pubDate>Fri, 24 Nov 2006 19:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene Client-Windows mit Keyboard-Fokus? on Fri, 24 Nov 2006 19:33:27 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">case WM_LBUTTONDOWN:
    SetFocus(hwnd);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1180931</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180931</guid><dc:creator><![CDATA[...........]]></dc:creator><pubDate>Fri, 24 Nov 2006 19:33:27 GMT</pubDate></item><item><title><![CDATA[Reply to Eigene Client-Windows mit Keyboard-Fokus? on Fri, 24 Nov 2006 19:37:52 GMT]]></title><description><![CDATA[<p>Okay, danke. Wußte nicht, dass man wieder so um Ecken denken muss. Dachte man würde das von Anfang an festlegen, dass das Ding Keyboard-Focus erhalten kann.</p>
<p>Naja, danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1180932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180932</guid><dc:creator><![CDATA[_ProfEich]]></dc:creator><pubDate>Fri, 24 Nov 2006 19:37:52 GMT</pubDate></item></channel></rss>