<?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[Rotate mit CDC]]></title><description><![CDATA[<p>Hallo Jungs!</p>
<p>Mein Problemm!</p>
<p>Ich habe eine Funktion die mit CDC Arbeitet, die Funktion zeichnet eine Vertikale und ein Horizentale, dabe soll sich das drehen nach Bass also umso mehr Bass um so mehr grad, aber ich weiss nicht wie ich das machen soll das es sich im Kreiss dreht!</p>
<p>Könnt ihr mir helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/6368/rotate-mit-cdc</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 22:17:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/6368.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Jun 2003 10:36:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 10:36:00 GMT]]></title><description><![CDATA[<p>Hallo Jungs!</p>
<p>Mein Problemm!</p>
<p>Ich habe eine Funktion die mit CDC Arbeitet, die Funktion zeichnet eine Vertikale und ein Horizentale, dabe soll sich das drehen nach Bass also umso mehr Bass um so mehr grad, aber ich weiss nicht wie ich das machen soll das es sich im Kreiss dreht!</p>
<p>Könnt ihr mir helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30861</guid><dc:creator><![CDATA[Sven Bechler]]></dc:creator><pubDate>Sat, 28 Jun 2003 10:36:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 10:51:00 GMT]]></title><description><![CDATA[<p>Hast du schon Sinus und Cosinus in der der Schule behandelt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30862</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 28 Jun 2003 10:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 12:34:00 GMT]]></title><description><![CDATA[<p>Schien ja extrem wichtig gewesen zu sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30863</guid><dc:creator><![CDATA[Knubbu]]></dc:creator><pubDate>Sat, 28 Jun 2003 12:34:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 12:38:00 GMT]]></title><description><![CDATA[<p>Jo, wirklich ein Riesenproblem<strong>m</strong> <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/30864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30864</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 28 Jun 2003 12:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 13:21:00 GMT]]></title><description><![CDATA[<p>Hmm, nein nix mit sinus und so weiter!</p>
<p>Könnt ihr mir ein Bsp. Code geben oder so?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30865</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30865</guid><dc:creator><![CDATA[Sven Bechler]]></dc:creator><pubDate>Sat, 28 Jun 2003 13:21:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 13:41:00 GMT]]></title><description><![CDATA[<p>Guck dir vorher einmal die Winkelfunktionen an: <a href="http://www.mathe-online.at/mathint/wfun/i.html#sincosRechtwDr" rel="nofollow">http://www.mathe-online.at/mathint/wfun/i.html#sincosRechtwDr</a></p>
<p>Dann gehst du wie folgt vor:</p>
<p>Du hast: Den Rotationswinkel und den Radius (In diesem Fall die Hypotenuse)...<br />
Du brauchst: Ankathete und Gegenkathete<br />
Es gilt: sin = G/H und cos = A/H und tan = G/A</p>
<p>Hilft dir dieser Denkansatz weiter?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30866</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30866</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 28 Jun 2003 13:41:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 13:43:00 GMT]]></title><description><![CDATA[<p>Btw: Bei solchen Sachen ist eine Skizze am &quot;Papiercomputer&quot; immer eine gute Hilfe... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/30867</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30867</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sat, 28 Jun 2003 13:43:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 13:55:00 GMT]]></title><description><![CDATA[<p>Bohhhhhh, versteh mich nicht falsch ich bin Hauptschüler!!</p>
<p>Kann mit dem nichts anfangen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30868</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30868</guid><dc:creator><![CDATA[Sven Bechler]]></dc:creator><pubDate>Sat, 28 Jun 2003 13:55:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 14:01:00 GMT]]></title><description><![CDATA[<p>Hier mein Bisheriger Code!</p>
<p>#include &lt;math.h&gt;</p>
<p>void CBalkenCtrl::DrawRotatFx(CDC* pDC)<br />
{<br />
//nPosition ist die Gesamtgrösse das Bass<br />
CRect rect;<br />
GetClientRect(rect);<br />
CPen pen(PS_SOLID, 1, RGB(255,180,0));<br />
pDC-&gt;SelectObject(pen);<br />
pDC-&gt;MoveTo(10, rect.Height() / 2);<br />
pDC-&gt;LineTo(rect.Width() - 10, rect.Height() / 2);<br />
pDC-&gt;MoveTo(rect.Width() / 2, 10);<br />
pDC-&gt;LineTo(rect.Width() / 2, rect.Height() - 10);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30869</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30869</guid><dc:creator><![CDATA[Sven Bechler]]></dc:creator><pubDate>Sat, 28 Jun 2003 14:01:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 14:16:00 GMT]]></title><description><![CDATA[<p>So habe gerade was hingekriegt ist aber nich das was ich will!</p>
<p>Hier der ganze code!</p>
<p>// BalkenCtrl.cpp: Implementierungsdatei<br />
//</p>
<p>#include &quot;stdafx.h&quot;<br />
#include &quot;BalkenCtrl.h&quot;</p>
<p>#ifdef <em>DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE</em>_;<br />
#endif</p>
<p>double m_Winkel;<br />
const double pi = 3.14159265359;<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CBalkenCtrl</p>
<p>CBalkenCtrl::CBalkenCtrl()<br />
{<br />
CurrentBalken = 0;<br />
for(int i=0;i&lt;9;i++)<br />
{<br />
BalkenPos[i] = 0;<br />
}<br />
Visual = 1;<br />
OldPoint.x = 0;<br />
OldPoint.y = 0;<br />
NewPoint.x = 0;<br />
NewPoint.y = 0;<br />
m_Winkel = pi / 4;<br />
}</p>
<p>CBalkenCtrl::~CBalkenCtrl()<br />
{<br />
}</p>
<p>BEGIN_MESSAGE_MAP(CBalkenCtrl, CStatic)<br />
//{{AFX_MSG_MAP(CBalkenCtrl)<br />
ON_WM_PAINT()<br />
//}}AFX_MSG_MAP<br />
END_MESSAGE_MAP()</p>
<p>/////////////////////////////////////////////////////////////////////////////<br />
// Behandlungsroutinen für Nachrichten CBalkenCtrl</p>
<p>void CBalkenCtrl::SetRange(float nMax)<br />
{<br />
CRect rect;<br />
GetClientRect(rect);<br />
nRange = rect.Height() / nMax;<br />
MaxRange = nMax;<br />
}</p>
<p>void CBalkenCtrl::SetPos(float nPos)<br />
{<br />
CRect rect;<br />
GetClientRect(rect);<br />
nPosition = nPos * nRange;<br />
if(CurrentBalken == <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8)"
      alt="😎"
    /><br />
{<br />
CurrentBalken = 0;<br />
}<br />
else<br />
{<br />
BalkenPos[CurrentBalken] = rect.Height() - nPosition;<br />
BalkenTopPos[CurrentBalken] = (rect.Height() - nPosition) - 3;<br />
CurrentBalken += 1;<br />
}<br />
RedrawWindow();</p>
<p>}</p>
<p>void CBalkenCtrl::SetNextVisual()<br />
{<br />
if(Visual == 4)<br />
{<br />
Visual = 0;<br />
}<br />
else<br />
{<br />
Visual += 1;<br />
}<br />
}</p>
<p>void CBalkenCtrl::OnPaint()<br />
{<br />
CPaintDC dc(this); // device context for painting<br />
CRect rect;<br />
GetClientRect(rect);<br />
CBrush m_brush;<br />
m_brush.CreateSolidBrush(RGB(0,0,0));<br />
dc.FillRect(&amp;rect, &amp;m_brush);<br />
if(Visual == 1)<br />
{<br />
DrawBalken(&amp;dc);<br />
}<br />
else if(Visual == 2)<br />
{<br />
DrawText(&amp;dc);<br />
}<br />
else if(Visual == 3)<br />
{<br />
DrawLineFx(&amp;dc);<br />
}<br />
else if(Visual == 4)<br />
{<br />
DrawRotatFx(&amp;dc);<br />
}<br />
else<br />
{<br />
dc.SetTextColor(RGB(255,0,0));<br />
dc.SetBkMode(TRANSPARENT);<br />
dc.DrawText(&quot;XMMS BETA&quot;, -1, rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);<br />
}<br />
ReleaseDC(&amp;dc);<br />
}</p>
<p>void CBalkenCtrl::DrawBalken(CDC* pDC)<br />
{<br />
CRect rect;<br />
GetClientRect(rect);</p>
<p>CBrush m_brush;<br />
m_brush.CreateSolidBrush(RGB(0,128,192));<br />
//<br />
int BalkenLenght = rect.Width() / 8;<br />
srand((unsigned)time(NULL));<br />
rect.right = 0;<br />
for(int i=0;i&lt;8;i++)<br />
{<br />
rect.left = rect.right + 4;<br />
rect.right += BalkenLenght;<br />
rect.top = BalkenPos[i];<br />
pDC-&gt;FillRect(&amp;rect, &amp;m_brush);<br />
CPen pen(PS_SOLID, 1, RGB(0,180,0));<br />
pDC-&gt;SelectObject(pen);<br />
pDC-&gt;MoveTo(rect.left, BalkenTopPos[i]);<br />
pDC-&gt;LineTo(rect.right, BalkenTopPos[i]);<br />
}<br />
}</p>
<p>void CBalkenCtrl::DrawText(CDC* pDC)<br />
{<br />
CRect rect;<br />
GetClientRect(rect);<br />
CFont font;<br />
srand((unsigned)time(NULL));<br />
font.CreateFont((nPosition / MaxRange) * 2, (nPosition / MaxRange),0,0,true,false,false,false,0,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,PROOF_QUALITY,DEFAULT_PITCH|FF_DONTCARE,&quot;Arial&quot;);<br />
pDC-&gt;SelectObject(&amp;font);<br />
pDC-&gt;SetTextColor(RGB(rand() % 255,rand() % 255,rand() % 255));<br />
pDC-&gt;SetBkMode(TRANSPARENT);<br />
pDC-&gt;DrawText(&quot;Boom&quot;, rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);<br />
}</p>
<p>void CBalkenCtrl::DrawLineFx(CDC* pDC)<br />
{<br />
CRect rect;<br />
GetClientRect(rect);<br />
CPen pen(PS_SOLID, 1, RGB(255,180,0));<br />
pDC-&gt;SelectObject(pen);<br />
pDC-&gt;MoveTo(rect.Width() / 2, 0);<br />
pDC-&gt;LineTo(rect.Width() / 2 - nPosition / 2, rect.Height() / 2);<br />
pDC-&gt;LineTo(rect.Width() / 2, rect.Height());<br />
pDC-&gt;LineTo(rect.Width() / 2 + nPosition / 2, rect.Height() / 2);<br />
pDC-&gt;LineTo(rect.Width() / 2, 0);<br />
}</p>
<p>#include &lt;math.h&gt;</p>
<p>void CBalkenCtrl::DrawRotatFx(CDC* pDC)<br />
{<br />
//nPosition ist die Gesamtgrösse das Bass<br />
CRect rect;<br />
GetClientRect(rect);<br />
const double l = rect.Width() - 10;<br />
const int h = rect.Height() / 2;<br />
m_Winkel += pi / 180;<br />
//----------------------<br />
CPen pen(PS_SOLID, 1, RGB(255,180,0));<br />
pDC-&gt;SelectObject(pen);</p>
<p>//------------<br />
pDC-&gt;MoveTo(rect.Width() / 2, rect.Height() / 2);<br />
pDC-&gt;LineTo(l * cos(m_Winkel), h-l * sin(m_Winkel));<br />
}</p>
<p>void CBalkenCtrl::OnTimer(UINT nIDEvent)<br />
{<br />
CDC* pDC = GetDC();<br />
CRect rect;<br />
GetClientRect(rect);<br />
CPen pen(PS_SOLID, 1, RGB(0,180,0));<br />
pDC-&gt;SelectObject(pen);<br />
NewPoint = OldPoint;<br />
pDC-&gt;MoveTo(OldPoint);<br />
if(NewPoint.x == rect.Width())<br />
{<br />
NewPoint.x = 0;<br />
OldPoint.x = 0;<br />
RedrawWindow();<br />
}<br />
else<br />
{<br />
NewPoint.x += 3;<br />
NewPoint.y = rect.Height() - nPosition;<br />
OldPoint = NewPoint;<br />
pDC-&gt;LineTo(NewPoint);<br />
}<br />
CStatic::OnTimer(nIDEvent);<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30870</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30870</guid><dc:creator><![CDATA[Sven Bechler]]></dc:creator><pubDate>Sat, 28 Jun 2003 14:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 14:28:00 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>ich weiß ja jetzt nicht was du genau rotieren willst... aber eine kreisfunktion sollte eigentlich so realisierbar sein !!!</p>
<pre><code class="language-cpp">// PSEUDO-CODE
int x,y; // x,y koordinaten welche die kreisbahn beschreibt

for ( double i = 0; i &lt; 2*PI; i + 0.1f ) 
{
    x = 80 * sin ( i ) + 320;
    y = 80 * cos ( i ) + 200;

    SetzePixel ( x,y );
}
</code></pre>
<p>sollte einen kreis zeichnen !!! mittelpunkt 320/200 und der durchmesser ist 80 pixel !!!</p>
<p>wenn du das jetzt mit 4 punkten machst und die punkte dann untereinander verbindest... sollte sich ein rechteck einmal um die achse drehen !!!</p>
<p>hoffe sehr das ich keinen stuß gepostet habe... aber seit 1995 kann man schon mal etwas vergessen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>MfG veganza</p>
<p>[ Dieser Beitrag wurde am 28.06.2003 um 16:30 Uhr von <strong>veganza</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30871</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30871</guid><dc:creator><![CDATA[veganza]]></dc:creator><pubDate>Sat, 28 Jun 2003 14:28:00 GMT</pubDate></item><item><title><![CDATA[Reply to Rotate mit CDC on Sat, 28 Jun 2003 14:29:00 GMT]]></title><description><![CDATA[<p>Wieso wird der Strich kleiner und macht keine ganze Elipes?</p>
<p>Der Hauptteil ist in DrawRotatFx(CDC* pDC)!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30872</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30872</guid><dc:creator><![CDATA[Sven Bechler]]></dc:creator><pubDate>Sat, 28 Jun 2003 14:29:00 GMT</pubDate></item></channel></rss>