<?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[Warum hat SetViewportOrg keine Auswirkungen?]]></title><description><![CDATA[<p>Hallo ich hab mal wieder ne andere Frage:<br />
Ich will eine berechnete Kurve abtasten dazu hab ich folgenden Code in OnKeyDown geschrieben:</p>
<pre><code class="language-cpp">CTest2Doc *pDoc = GetDocument();

         CRect rect;
	GetClientRect(rect);

	CClientDC dc(this); 
	dc.SetViewportOrg(rect.Width()/2,rect.Height()/2);

	CPoint *point = new CPoint();

	if(nChar == VK_LEFT)
	{
		pos--;
		point-&gt;x = pos;
		point-&gt;y = int(-pDoc-&gt;CalcY(float(pos)));

		ClientToScreen(point);

		SetCursorPos(point-&gt;x, point-&gt;y);
	}

	if(nChar == VK_RIGHT)
	{
		pos++;
		point-&gt;x = pos;
		point-&gt;y = int(-pDoc-&gt;CalcY(float(pos)));

		ClientToScreen(point);

		SetCursorPos(point-&gt;x, point-&gt;y);
	}

	CView::OnKeyDown(nChar, nRepCnt, nFlags);
</code></pre>
<p>SetViewportOrg hat überhaupt keine Auswirkungen die Abtastung beginnt irgendwo am Rand(an den von CalcY berechneten Werten liegt es nicht).<br />
Wieso funktioniert das nicht? Hat es vielleicht etwas mit ClientToScreen zu tun? Ich hab nämlich keine Ahnung!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/51630/warum-hat-setviewportorg-keine-auswirkungen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 15:05:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/51630.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 12 Oct 2003 10:50:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Warum hat SetViewportOrg keine Auswirkungen? on Sun, 12 Oct 2003 10:50:30 GMT]]></title><description><![CDATA[<p>Hallo ich hab mal wieder ne andere Frage:<br />
Ich will eine berechnete Kurve abtasten dazu hab ich folgenden Code in OnKeyDown geschrieben:</p>
<pre><code class="language-cpp">CTest2Doc *pDoc = GetDocument();

         CRect rect;
	GetClientRect(rect);

	CClientDC dc(this); 
	dc.SetViewportOrg(rect.Width()/2,rect.Height()/2);

	CPoint *point = new CPoint();

	if(nChar == VK_LEFT)
	{
		pos--;
		point-&gt;x = pos;
		point-&gt;y = int(-pDoc-&gt;CalcY(float(pos)));

		ClientToScreen(point);

		SetCursorPos(point-&gt;x, point-&gt;y);
	}

	if(nChar == VK_RIGHT)
	{
		pos++;
		point-&gt;x = pos;
		point-&gt;y = int(-pDoc-&gt;CalcY(float(pos)));

		ClientToScreen(point);

		SetCursorPos(point-&gt;x, point-&gt;y);
	}

	CView::OnKeyDown(nChar, nRepCnt, nFlags);
</code></pre>
<p>SetViewportOrg hat überhaupt keine Auswirkungen die Abtastung beginnt irgendwo am Rand(an den von CalcY berechneten Werten liegt es nicht).<br />
Wieso funktioniert das nicht? Hat es vielleicht etwas mit ClientToScreen zu tun? Ich hab nämlich keine Ahnung!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/370655</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/370655</guid><dc:creator><![CDATA[Slayer]]></dc:creator><pubDate>Sun, 12 Oct 2003 10:50:30 GMT</pubDate></item><item><title><![CDATA[Reply to Warum hat SetViewportOrg keine Auswirkungen? on Sun, 12 Oct 2003 10:52:48 GMT]]></title><description><![CDATA[<p>Ach ja, und wenn ich den Abbildungsmodus auf (An)Isotropic ändere und die Anzahl der logischen Einheiten und der Pixel verändere hat das auch keine Auswirkungen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/370656</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/370656</guid><dc:creator><![CDATA[Slayer]]></dc:creator><pubDate>Sun, 12 Oct 2003 10:52:48 GMT</pubDate></item></channel></rss>