<?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[Farbe einer bestimmten Position ermitteln]]></title><description><![CDATA[<p>Hallo,</p>
<p>mit welcher Funktion ist es möglich die Farbe einer bestimmten Position am Bildschirm auszulesen?</p>
<p>GetPixel?</p>
<p>Lg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/166613/farbe-einer-bestimmten-position-ermitteln</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 01:50:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/166613.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 30 Nov 2006 19:34:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 19:34:47 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>mit welcher Funktion ist es möglich die Farbe einer bestimmten Position am Bildschirm auszulesen?</p>
<p>GetPixel?</p>
<p>Lg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184856</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 19:34:47 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 20:06:11 GMT]]></title><description><![CDATA[<p>Genau, damit solltest du das machen können - und wenn du nur einen einzelnen Pixel abfragen willst, ist das auch recht vernünftig.<br />
Willst du aber von sehr vielen Pixeln die Farbwerte ermitteln, so gibt es effizientere Möglichkeiten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184878</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184878</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Thu, 30 Nov 2006 20:06:11 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 20:31:18 GMT]]></title><description><![CDATA[<p>hmmm ne idee wieso das nicht klappt?</p>
<p>COLORREF pixel;<br />
HDC dcDesktop;<br />
dcDesktop=GetWindowDC(GetDesktopWindow);</p>
<p>pixel=GetPixel(dcDesktop, 8, 8);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184902</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184902</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 20:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 21:00:51 GMT]]></title><description><![CDATA[<p>Versuch es mal so:</p>
<pre><code class="language-cpp">HDC dcDesktop = GetDC(NULL);
pixel=GetPixel(dcDesktop, 8, 8);
int red = GetRValue(pixel);
int blue = GetBValue(pixel);
int green = GetGValue(pixel);
ReleaseDC(NULL,dcDesktop);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1184906</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184906</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Thu, 30 Nov 2006 21:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 20:47:04 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="😃"
    /> Hab vorher eh die Boardsuche verwendet und diesen Code-Schnipsel verwendet, geht leider auch ned^^.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184920</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184920</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 20:47:04 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 20:53:51 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="😃"
    /> Hab vorher eh die Boardsuche verwendet und diesen Code-Schnipsel verwendet, geht leider auch ned^^.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184927</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 20:53:51 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 20:56:57 GMT]]></title><description><![CDATA[<p>Hmm ich hab mir mal mit GetDc und dem Handle vom Desktop (hab da mal SysListView32 gnommen als ersten Parameter von Findwindow)<br />
den hwc-handle holen wollen liefert aber immer noch -1 zurück.</p>
<p>Ich denke das liegt am Parameter oder?</p>
<p>Lg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184929</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 20:56:57 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 21:02:22 GMT]]></title><description><![CDATA[<p>Ich hatte bei ReleaseDC noch nen Fehler und habe jetzt auch mal noch die einzelnen Farbwerte abgeprüft (Änderungen siehe oben) - also bei mir läuft das ohne Probleme...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184934</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Thu, 30 Nov 2006 21:02:22 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 21:20:20 GMT]]></title><description><![CDATA[<p>Kanns leider ned überprüfen,egal ob ich if(pixel==-1)oder (pixel==0) etc eingebe ich bekomm keine Testausgabe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184947</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184947</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 21:20:20 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 21:59:06 GMT]]></title><description><![CDATA[<p>RUM KOKOS schrieb:</p>
<blockquote>
<p>egal ob ich if(pixel==-1)oder (pixel==0) etc eingebe ich bekomm keine Testausgabe.</p>
</blockquote>
<p>Wieso sollte das auch gerade 0 oder -1 sein? Entweder das ist ein Farbwert oder CLR_INVALID...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184972</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184972</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Thu, 30 Nov 2006 21:59:06 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 22:11:10 GMT]]></title><description><![CDATA[<p>k CRL_INVALID ist es nicht, also vermutlich ein gültiger wert.</p>
<p>ich will üperprüfen wann ein bestimmtes pixel eine bestimmte farbe hat.<br />
die 2 möglichen farben habe ich ermittelt, nur leider finde ich nirgends (bei google) ne Möglichkeit wie ich nachsehen kann ob ein pixel den von mir ermittelten Farb-Wert hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184977</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184977</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 22:11:10 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 22:24:08 GMT]]></title><description><![CDATA[<p>die farben habe ich über ein anderen programm ermittelt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184983</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184983</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 22:24:08 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 22:45:27 GMT]]></title><description><![CDATA[<p>So ist dieser Vergleich in Ordnung?</p>
<pre><code class="language-cpp">COLORREF pixel; 
HDC dcDesktop = GetDC(0); 
pixel=GetPixel(dcDesktop, 546, 118); 

	if (pixel==CLR_INVALID)
{
MessageBox(NULL,  (LPCTSTR)  &quot;nix-ok&quot;,NULL, MB_OK | MB_ICONINFORMATION); 
}
    return 0; 

int red = GetRValue(pixel); 
int blue = GetBValue(pixel); 
int green = GetGValue(pixel); 
ReleaseDC(NULL,dcDesktop);

COLORREF pixel_2; 
HDC dcDesktop_2 = GetDC(0); 
pixel_2=GetPixel(dcDesktop_2, 546, 118); 
int red_2 = GetRValue(pixel_2); 
int blue_2 = GetBValue(pixel_2); 
int green_2 = GetGValue(pixel_2); 
ReleaseDC(NULL,dcDesktop_2);

if ((red==red_2)&amp;&amp;(blue==blue_2)&amp;&amp;(green==green_2))
{
MessageBox(NULL,  TEXT  (&quot;In Ordnung&quot;),NULL, MB_OK | MB_ICONINFORMATION); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1184989</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184989</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 22:45:27 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Thu, 30 Nov 2006 22:54:30 GMT]]></title><description><![CDATA[<p>ok thx habs, thread kann gelöscht werden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1184991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1184991</guid><dc:creator><![CDATA[RUM KOKOS]]></dc:creator><pubDate>Thu, 30 Nov 2006 22:54:30 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe einer bestimmten Position ermitteln on Fri, 01 Dec 2006 06:44:30 GMT]]></title><description><![CDATA[<p>Du kannst dir auch mit dem <a href="http://msdn.microsoft.com/library/en-us/gdi/colors_8bvm.asp" rel="nofollow">RGB-Makro</a> einen Farbwert zusammensetzen und &quot;pixel&quot; dann damit vergleichen.</p>
<p>PS: Du holst in deinem Code zweimal die Farbe des selbe Pixels - warum sollte diese beim 2. Aufruf anders sein?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1185026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1185026</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 01 Dec 2006 06:44:30 GMT</pubDate></item></channel></rss>