<?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[Fenster ohne Titlebar bewegen ?]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie beweg ich einen Win32 Dialog der keine Titelleiste hat, sondern nur ein Fenster.<br />
Ich halte die Maus drauf und fenster soll sich bewegen</p>
<p><strong>WM_LBUTTONDOWN irgendwie, weiss jemand mehr ??</strong></p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/47117/fenster-ohne-titlebar-bewegen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 16:56:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/47117.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Aug 2003 18:38:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Tue, 26 Aug 2003 18:38:22 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie beweg ich einen Win32 Dialog der keine Titelleiste hat, sondern nur ein Fenster.<br />
Ich halte die Maus drauf und fenster soll sich bewegen</p>
<p><strong>WM_LBUTTONDOWN irgendwie, weiss jemand mehr ??</strong></p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/341079</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/341079</guid><dc:creator><![CDATA[Jeffrey]]></dc:creator><pubDate>Tue, 26 Aug 2003 18:38:22 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Tue, 26 Aug 2003 18:51:04 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">SendMessage(hWnd,WM_NCLBUTTONDOWN,HTCAPTION,lParam);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/341090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/341090</guid><dc:creator><![CDATA[Shlo]]></dc:creator><pubDate>Tue, 26 Aug 2003 18:51:04 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Wed, 27 Aug 2003 05:30:05 GMT]]></title><description><![CDATA[<p>funktioniert aber nicht so ganz;<br />
eigentlich gar nicht;</p>
<pre><code class="language-cpp">case WM_LBUTTONDOWN:
					SendMessage(hwnd,WM_NCLBUTTONDOWN,HTCAPTION,lParam);
				break;
</code></pre>
<p>Kann mir jemand helfen ?</p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/341267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/341267</guid><dc:creator><![CDATA[Jeffrey]]></dc:creator><pubDate>Wed, 27 Aug 2003 05:30:05 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Wed, 27 Aug 2003 06:42:49 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">case WM_NCHITTEST:
    if( DefWindowProc( hWnd, msg, wParam, lParam) == HTCLIENT)
      return HTCAPTION;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/341295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/341295</guid><dc:creator><![CDATA[NCHITTEST]]></dc:creator><pubDate>Wed, 27 Aug 2003 06:42:49 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Wed, 27 Aug 2003 09:46:35 GMT]]></title><description><![CDATA[<p>Funtkioniert aber immer noch nicht ...<br />
Was mach ich falsh</p>
<p>Hier mein kleiner Win32 code:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

#include &quot;resource.h&quot; 

HBRUSH g_hbrBackground = NULL;

BOOL CALLBACK DlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
	switch(Message)
	{
		case WM_INITDIALOG:
			g_hbrBackground = CreateSolidBrush(RGB(198, 195, 198));

			SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(NULL, 
				MAKEINTRESOURCE(IDI_APPLICATION)));
			SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(NULL, 
				MAKEINTRESOURCE(IDI_APPLICATION)));

		break;
		case WM_CLOSE:
			EndDialog(hwnd, 0);
		break;
		case WM_CTLCOLORDLG:	
			return (LONG)g_hbrBackground;
		case WM_CTLCOLORSTATIC:
		{
			HDC hdcStatic = (HDC)wParam;
			SetTextColor(hdcStatic, RGB(255, 255, 255));
			SetBkMode(hdcStatic, TRANSPARENT);
			return (LONG)g_hbrBackground;
		}
		break;
		case WM_COMMAND:
			switch(LOWORD(wParam))
			{
				case IDOK:
					EndDialog(hwnd, 0);
				break;

				case WM_NCHITTEST: 
					 if( DefWindowProc(hwnd, Message, wParam, lParam) == HTCLIENT) 
				return HTCAPTION;

			}
		break;
		case WM_DESTROY:
			DeleteObject(g_hbrBackground);
		break;
		default:
			return FALSE;
	}
	return TRUE;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
	LPSTR lpCmdLine, int nCmdShow)
{
	return DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, DlgProc);
}
</code></pre>
<p>Wo liegt der Fehler ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/341413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/341413</guid><dc:creator><![CDATA[Jeffey]]></dc:creator><pubDate>Wed, 27 Aug 2003 09:46:35 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Thu, 28 Aug 2003 01:22:16 GMT]]></title><description><![CDATA[<p>WM_NCHITTEST gehört nicht in die WM_COMMAND switch.<br />
Bei Fenstern kann man den HT*-Wert via return zurückgeben - bei Dialogen muss man mit SetWindowLong arbeiten. Du bekommst aber dann keine Nachrichten mehr wie z.B. WM_LBUTTONDOWN.<br />
Habe ein bisschen probiert und es nun so hinbekommen:</p>
<pre><code class="language-cpp">switch(Message)
    {        
	case WM_NCHITTEST:
		{
			UINT ht = DefWindowProc(hwnd,Message,wParam,lParam);
			if(ht == HTCLIENT)
				ht = HTCAPTION;
			SetWindowLong(hwnd,DWL_MSGRESULT,ht);
			return true;
		}
    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/342110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/342110</guid><dc:creator><![CDATA[Oliver]]></dc:creator><pubDate>Thu, 28 Aug 2003 01:22:16 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Thu, 28 Aug 2003 18:10:06 GMT]]></title><description><![CDATA[<p>mit</p>
<pre><code class="language-cpp">case WM_NCHITTEST:  
                     if( DefWindowProc(hwnd, Message, wParam, lParam) == HTCLIENT)  
                return HTCAPTION;
</code></pre>
<p>kannst du nicht eigenen kursor setzen und noch auf mehrere sachen verzichten.<br />
so funktioniert besser</p>
<p>[cpp]static POINTS m;<br />
switch (message)<br />
{<br />
case WM_LBUTTONDOWN:<br />
SetCapture(hwnd);<br />
m=MAKEPOINTS(lParam);<br />
return 0;</p>
<p>case WM_LBUTTONUP:<br />
ReleaseCapture();<br />
return 0;</p>
<p>case WM_MOUSEMOVE:<br />
if(wParam==MK_LBUTTON)<br />
{<br />
POINTS p=MAKEPOINTS(lParam);<br />
RECT rect;<br />
GetWindowRect(hwnd, &amp;rect);</p>
<p>rect.left += p.x - m.x;<br />
rect.top += p.y - m.y;</p>
<p>SetWindowPos(hwnd,NULL,rect.left,rect.top,0,0,<br />
SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOZORDER);<br />
}<br />
return 0;<br />
[/code]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/342831</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/342831</guid><dc:creator><![CDATA[_alex_]]></dc:creator><pubDate>Thu, 28 Aug 2003 18:10:06 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Thu, 28 Aug 2003 19:17:08 GMT]]></title><description><![CDATA[<p><em>alex</em> schrieb:</p>
<blockquote>
<p>kannst du nicht eigenen kursor setzen und noch auf mehrere sachen verzichten.</p>
</blockquote>
<p>Das ist richtig. Die LEDs auf dem keyboard kann man damit auch nicht blinken lassen! Aber was war nochmal die Frage?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/342877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/342877</guid><dc:creator><![CDATA[-King-]]></dc:creator><pubDate>Thu, 28 Aug 2003 19:17:08 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Fri, 29 Aug 2003 03:39:28 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/342967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/342967</guid><dc:creator><![CDATA[Jeffrey]]></dc:creator><pubDate>Fri, 29 Aug 2003 03:39:28 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Fri, 29 Aug 2003 07:35:24 GMT]]></title><description><![CDATA[<p>@-King-: Es ging _alex_ imho eben darum, dass durch die anderen Varianten manches andere (z.B. setzten eines eigenen Cursors?) nicht mehr möglich ist - dies hatte er versucht zu beheben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/343034</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/343034</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 29 Aug 2003 07:35:24 GMT</pubDate></item><item><title><![CDATA[Reply to Fenster ohne Titlebar bewegen ? on Fri, 11 Mar 2005 08:39:31 GMT]]></title><description><![CDATA[<p>Hey alle miteinander. Ich das gleiche Problem. Eine Form ohne Titelleiste und ich kann die Form nicht mehr verschieben. Jetzt schau ich mir hier euren Code an und versteh NUR Bahnhof....</p>
<pre><code>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
</code></pre>
<p>wann wird das denn aufgerufen und wie funktioniert denn das hier--&gt;</p>
<pre><code>return DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, DlgProc);
</code></pre>
<p>???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/742041</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/742041</guid><dc:creator><![CDATA[Nevertheless]]></dc:creator><pubDate>Fri, 11 Mar 2005 08:39:31 GMT</pubDate></item></channel></rss>