Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detecting new window

Status
Not open for further replies.

ViperInc

Programmer
Mar 13, 2001
24
AU
Hi,


I managed to work out what i need, and then figured out i needed to use C/C++ to use the API functions(.

The problem now is, that i have very limited use of c/c++.
so far i have;

#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.

i am very un-skilled at c, any help would be greatly appreciated.

thank-you
VPR

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top