SetPixel in a console application not working?

https://pastebin.com/ktUXSXSH

Thread posted on PasteBin because this site wont let me post it for some reason :/ maybe some sort of filter to prevent XSS attacks, idk.
1
2
SetPixel((HDC)HWND_DESKTOP,  (BaseX + Index),  (BaseY + ((CrossHair_Variables::Size - 1) / 2)),
             Color);

You can't cast a HWND to a HDC. To get a DC you need to use GetDC
https://msdn.microsoft.com/de-de/library/windows/desktop/dd144871(v=vs.85).aspx
Thank you, that worked!
Topic archived. No new replies allowed.