<?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[Position per Mausklick]]></title><description><![CDATA[<p>Hi Leute,<br />
ich hab gerade mal was gebastelt. Und zwar soll ein ein kleiner Button an der Stelle erscheinen wo geklickt wurde. Dazu frage ich alle Werte ab und wenn er ungleich 0 ist, wird er an eine float übergeben. Diesen float Wert will ich dann direkt an den Button übergeben. Nur irgendwie kommt da kein Button. Bin schon die ganze Zeit ma üüberlegen, wäre sehr nett wenn mir einer helfen könnte!</p>
<pre><code class="language-cpp">case WM_RBUTTONDOWN:
{
	POINT point;
	point.x = LOWORD(lParam);
	point.y = HIWORD(lParam);

	if((LOWORD(lParam) != 0) &amp;&amp; (HIWORD(lParam) != 0))
	{
		point.x = pos_x;
		point.y = pos_y;
		if((pos_x != 0) &amp;&amp; (pos_y != 0))
		{
			create_child_1=true;

		}
		else
		{
			create_child_1=false;
		}
	}
	else
	{
		point.x = LOWORD(lParam);
		point.y = HIWORD(lParam);
	}

	return 0;
}

case WM_CREATE:
	{

		child_1=CreateWindow(  &quot;button&quot;,
                                 NULL,
                                 WS_CHILD | WS_VISIBLE | WS_DLGFRAME,
                                 pos_x,
                                 pos_y,
                                 100,
                                 100,
                                 hWnd,
                                 NULL,
                                 ((LPCREATESTRUCT) lParam)-&gt;hInstance,
                                 NULL);

return 0;
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/213458/position-per-mausklick</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 14:51:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/213458.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 May 2008 12:08:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Position per Mausklick on Sun, 18 May 2008 12:08:14 GMT]]></title><description><![CDATA[<p>Hi Leute,<br />
ich hab gerade mal was gebastelt. Und zwar soll ein ein kleiner Button an der Stelle erscheinen wo geklickt wurde. Dazu frage ich alle Werte ab und wenn er ungleich 0 ist, wird er an eine float übergeben. Diesen float Wert will ich dann direkt an den Button übergeben. Nur irgendwie kommt da kein Button. Bin schon die ganze Zeit ma üüberlegen, wäre sehr nett wenn mir einer helfen könnte!</p>
<pre><code class="language-cpp">case WM_RBUTTONDOWN:
{
	POINT point;
	point.x = LOWORD(lParam);
	point.y = HIWORD(lParam);

	if((LOWORD(lParam) != 0) &amp;&amp; (HIWORD(lParam) != 0))
	{
		point.x = pos_x;
		point.y = pos_y;
		if((pos_x != 0) &amp;&amp; (pos_y != 0))
		{
			create_child_1=true;

		}
		else
		{
			create_child_1=false;
		}
	}
	else
	{
		point.x = LOWORD(lParam);
		point.y = HIWORD(lParam);
	}

	return 0;
}

case WM_CREATE:
	{

		child_1=CreateWindow(  &quot;button&quot;,
                                 NULL,
                                 WS_CHILD | WS_VISIBLE | WS_DLGFRAME,
                                 pos_x,
                                 pos_y,
                                 100,
                                 100,
                                 hWnd,
                                 NULL,
                                 ((LPCREATESTRUCT) lParam)-&gt;hInstance,
                                 NULL);

return 0;
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1511477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511477</guid><dc:creator><![CDATA[WiredCoder]]></dc:creator><pubDate>Sun, 18 May 2008 12:08:14 GMT</pubDate></item><item><title><![CDATA[Reply to Position per Mausklick on Sun, 18 May 2008 12:29:26 GMT]]></title><description><![CDATA[<p>was?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511491</guid><dc:creator><![CDATA[steak]]></dc:creator><pubDate>Sun, 18 May 2008 12:29:26 GMT</pubDate></item><item><title><![CDATA[Reply to Position per Mausklick on Sun, 18 May 2008 12:36:16 GMT]]></title><description><![CDATA[<p>was?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511493</guid><dc:creator><![CDATA[pifke]]></dc:creator><pubDate>Sun, 18 May 2008 12:36:16 GMT</pubDate></item><item><title><![CDATA[Reply to Position per Mausklick on Sun, 18 May 2008 13:26:44 GMT]]></title><description><![CDATA[<p>drück dich mal besser aus .. du fragst mehrere Werte ab und guckst dann ob ER (kein Plural) 0 ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511537</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511537</guid><dc:creator><![CDATA[dust]]></dc:creator><pubDate>Sun, 18 May 2008 13:26:44 GMT</pubDate></item><item><title><![CDATA[Reply to Position per Mausklick on Sun, 18 May 2008 15:44:04 GMT]]></title><description><![CDATA[<p>Nein ich frage den Wetrt ab, ob er ungleich 0 ist. Wenn ja wird der Wert von point.x an pos_x übergeben. So, pos_x soll jetzt an den Button übergeben werden. Sodass das Fenster genau an der Stelle erstellt werden soll. Aber das funktiponiert irgendwie nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511632</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511632</guid><dc:creator><![CDATA[WiredCoder]]></dc:creator><pubDate>Sun, 18 May 2008 15:44:04 GMT</pubDate></item><item><title><![CDATA[Reply to Position per Mausklick on Mon, 19 May 2008 06:07:39 GMT]]></title><description><![CDATA[<p>Hab jetzt nochmal ein wenig herumprobiert und versucht es auf die einfache Methode gebacken zu kriegen. Funzt aber nicht.</p>
<pre><code class="language-cpp">case WM_RBUTTONDOWN:
{

	point.x = LOWORD(lParam);
	point.y = HIWORD(lParam);

	if(point.x != -1)
	{
		point.x=pos_x;
		point.y=pos_y;
		create_child_1=true;
		return create_child_1=false;
	}
	else
	{
		create_child_1=false;
	}

		if(create_child_1=true)
		{

		child_1=CreateWindow(  &quot;button&quot;,
                                 NULL,
                                 WS_CHILD | WS_VISIBLE | WS_DLGFRAME,
                                 LOWORD(lParam),
                                 HIWORD(lParam),
                                 100,
                                 100,
                                 hWnd,
                                 NULL,
                                 ((LPCREATESTRUCT) lParam)-&gt;hInstance,
                                 NULL);

		RedrawingWindow (child_1, GetRect(child_1,&amp;rect), NULL, RDW_UPDATENOW);

		return create_child_1=false;
		}

	return 0;
}

case WM_CREATE:
	{
	point.x = -1;
	point.y = -1;
return 0;
	}
</code></pre>
<p>Ich versteh das einfach nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511933</guid><dc:creator><![CDATA[WiredCoder]]></dc:creator><pubDate>Mon, 19 May 2008 06:07:39 GMT</pubDate></item></channel></rss>