Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Administrator
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
case WM_RBUTTONDOWN: hdc = GetDC(hWnd); i = 0; i2 = 0; while(i <= 200) { MessageBox(hWnd, "For", "For1", MB_OK); while(i2 <= 200) { MessageBox(hWnd, "For", "For1", MB_OK); if(GetPixel(hdc, i, i2) == 000000) { MessageBox(hWnd, "Pixel gefunden", "Pixel gefunden", MB_OK); drawData[i + (i2*200)] = 1; SetPixel(hdc, i, i2, 999999); }; i2++; }; i++; }; ReleaseDC(hWnd, hdc); |
Administrator
Administrator
Zitat von »"42"«
DAs mit den For Schleifen tut nichts zur Sache... habe ich auch schon ausprobiert, da fühklt sich mein Computer überlastet und ignoriert eine, also lieber mit weil, aber was meinst du warum das mit dem GetPixel nicht funktioniert?=
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
case WM_RBUTTONDOWN: MessageBox(hWnd, "For", "Klick", MB_OK); hdc = GetDC(hWnd); MessageBox(hWnd, "For", "HDC", MB_OK); for(x = 0; x > 199; x++) { MessageBox(hWnd, "For", "For1", MB_OK); for(y = 0; y > 199; y++) { MessageBox(hWnd, "For", "For2", MB_OK); if(GetPixel(hdc, x, y) == 000000) { MessageBox(hWnd, "Pixel gefunden", "Pixel gefunden", MB_OK); drawData[x + (y*200)] = 1; SetPixel(hdc, x, y, 999999); }; }; }; MessageBox(hWnd, "For", "Release", MB_OK); ReleaseDC(hWnd, hdc); break; |
Quellcode |
|
1 |
for(x = 0; x > 199; x++) |
Quellcode |
|
1 |
for(int x = 0; x < 199; x++) |
Werbeanzeige