Hi,
I'm currently trying to write a program which will detect a pop up or new window and print the related co-ordinates to a file. Looking the msdn API i have put together the following code. Being totally inexperienced at C I'm at a loss as how to implement the code below, or even if it will do what I hope.
#include "stdafx.h"
#include "Winuser.h"
#include "Windows.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
//for(!stop) - loop until stopped, maybe with button?
typedef struct coOrd { LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT;
BOOL GetClientRect(HWND GetForegroundWindow(VOID),LPRECT coOrd);
}
now, from what ive gathered, it will create the coOrd structure, and then put the forground co-orinated into it.
how can i access these co-ordinates, and put them into a file. how easy is it to add a go/stop button or add a timer.
i am very un-skilled at c, any help would be greatly appreciated.
thank-you
VPR
I'm currently trying to write a program which will detect a pop up or new window and print the related co-ordinates to a file. Looking the msdn API i have put together the following code. Being totally inexperienced at C I'm at a loss as how to implement the code below, or even if it will do what I hope.
#include "stdafx.h"
#include "Winuser.h"
#include "Windows.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
//for(!stop) - loop until stopped, maybe with button?
typedef struct coOrd { LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT;
BOOL GetClientRect(HWND GetForegroundWindow(VOID),LPRECT coOrd);
}
now, from what ive gathered, it will create the coOrd structure, and then put the forground co-orinated into it.
how can i access these co-ordinates, and put them into a file. how easy is it to add a go/stop button or add a timer.
i am very un-skilled at c, any help would be greatly appreciated.
thank-you
VPR