<?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[Linie wird nicht gezeichnet]]></title><description><![CDATA[<pre><code class="language-cpp">long GridControl::OnPaint(WPARAM wparam, LPARAM lparam)
{
	if(GetUpdateRect(m_hwnd, NULL, 0))
	{
		PAINTSTRUCT ps;
		HDC hdc;
		bool callpaint = true;

		if(wparam)
		{
			hdc = (HDC)wparam;
			callpaint = false;
		}

		if(callpaint)
			BeginPaint(m_hwnd,&amp;ps);

		//drawing the grid
		RECT rect;
		GetClientRect(m_hwnd, &amp;rect);

		HPEN blackpen = CreatePen(PS_SOLID, 1, RGB(0x00, 0x00, 0x00));
		HPEN oldpen = (HPEN)SelectObject(hdc, (HGDIOBJ)blackpen);

		for(long y = 0; y &lt; rect.bottom - rect.top; y += m_gridy)
		{
			for(long x = 0; x &lt; rect.right - rect.left; x += m_gridx)
			{
				MoveToEx(hdc, x, y, NULL);
				LineTo(hdc, x + m_gridx, y + m_gridy);
			}
		}

		DeleteObject(SelectObject(hdc, (HGDIOBJ)oldpen));

		if(callpaint)
			EndPaint(m_hwnd,&amp;ps);
	}
	return 0; 
}
</code></pre>
<p>die funktion wird ausgeführt;<br />
es erscheinen aber keine schwarzen linien.<br />
Tipp?<br />
OS: XP Pro</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/94935/linie-wird-nicht-gezeichnet</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 12:36:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/94935.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Dec 2004 14:30:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Linie wird nicht gezeichnet on Tue, 14 Dec 2004 14:30:09 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">long GridControl::OnPaint(WPARAM wparam, LPARAM lparam)
{
	if(GetUpdateRect(m_hwnd, NULL, 0))
	{
		PAINTSTRUCT ps;
		HDC hdc;
		bool callpaint = true;

		if(wparam)
		{
			hdc = (HDC)wparam;
			callpaint = false;
		}

		if(callpaint)
			BeginPaint(m_hwnd,&amp;ps);

		//drawing the grid
		RECT rect;
		GetClientRect(m_hwnd, &amp;rect);

		HPEN blackpen = CreatePen(PS_SOLID, 1, RGB(0x00, 0x00, 0x00));
		HPEN oldpen = (HPEN)SelectObject(hdc, (HGDIOBJ)blackpen);

		for(long y = 0; y &lt; rect.bottom - rect.top; y += m_gridy)
		{
			for(long x = 0; x &lt; rect.right - rect.left; x += m_gridx)
			{
				MoveToEx(hdc, x, y, NULL);
				LineTo(hdc, x + m_gridx, y + m_gridy);
			}
		}

		DeleteObject(SelectObject(hdc, (HGDIOBJ)oldpen));

		if(callpaint)
			EndPaint(m_hwnd,&amp;ps);
	}
	return 0; 
}
</code></pre>
<p>die funktion wird ausgeführt;<br />
es erscheinen aber keine schwarzen linien.<br />
Tipp?<br />
OS: XP Pro</p>
]]></description><link>https://www.c-plusplus.net/forum/post/673048</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/673048</guid><dc:creator><![CDATA[esskar]]></dc:creator><pubDate>Tue, 14 Dec 2004 14:30:09 GMT</pubDate></item><item><title><![CDATA[Reply to Linie wird nicht gezeichnet on Tue, 14 Dec 2004 15:00:28 GMT]]></title><description><![CDATA[<p>Tipp: Code vereinfachen. Dann findet man den Fehler besser. <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>
]]></description><link>https://www.c-plusplus.net/forum/post/673075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/673075</guid><dc:creator><![CDATA[Grober.]]></dc:creator><pubDate>Tue, 14 Dec 2004 15:00:28 GMT</pubDate></item><item><title><![CDATA[Reply to Linie wird nicht gezeichnet on Tue, 14 Dec 2004 15:09:50 GMT]]></title><description><![CDATA[<p>mist; ich hab den hdc nicht auf den return-wert von Beginpaint gesetzt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/673088</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/673088</guid><dc:creator><![CDATA[esskar]]></dc:creator><pubDate>Tue, 14 Dec 2004 15:09:50 GMT</pubDate></item></channel></rss>