Good luck, feel free to give us a preview of it working if you like.
GetSystemMetrics or GetClientRect for 4)
I put them in an array as fleep did in his tutorial.
Also do I need to use World2Screen?
Edit : I put my current source so far in an attachment, if someone could comment in or show me what I'm doing wrong.
Last edited by bzh; 06-30-2013 at 04:11 PM.
I really would just appreciate it if someone helped me.
I figured out that I should use a Pen to draw the lines as it's easier. As I also found out brushes are mainly used for filling objects.
I'm using this to create and select a drawing device
Now how do I just grab the Resolution variables of the X/Y coords for my CenterofScreen array for the UpdateResolution function Fleep used in his examples?Code://Assign a Drawing Device //Select Pen Sytle, Width, Color HPEN REDPEN = CreatePen(PS_SOLID, 3, RGB(255,0,0)); HGDIOBJ oldPen=SelectObject(hdesktop,REDPEN);
Last edited by bzh; 06-30-2013 at 06:18 PM.
Figured all of it out so far by using MSDN.
Few problems now, how do I hook WM_PAINT to keep my GDI Draw concurrent without using a resource hogging while(1) loop?
Next, how to take the values from my RECT structure (left,top,right,bottom) of the window, to calculate the center of the window for my crosshair?
MSDN : https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
This gives me Width and Height, now when I divide them.Code:xCenter = REC.right - REC.left; yCenter = REC.bottom - REC.top;
I don't get the center, or even half of the value. That's the problem. To give you the simple reason why I don't want the SCREEN metrics is because the window won't always be in the center of my screen.Code:xCenter = REC.right - REC.left / 2; yCenter = REC.bottom - REC.top / 2;