keetsh
May 2nd, 2000, 02:46 AM
Hi there,
I'm trying to use GetCursorPos and it points to a POINT structure that receives the screen coordinates of the cursor.
Here's my code but I can't get it work with C++ though it worked with VB!! I actually have a problem with the POINT structure.
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "winuser.h"
#include "windef.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
typedef lp1 *tagPOINT;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
long retval;
retval = GetCursorPos(lp1);
}
Tnx in advance,
See you,
keetsh
I'm trying to use GetCursorPos and it points to a POINT structure that receives the screen coordinates of the cursor.
Here's my code but I can't get it work with C++ though it worked with VB!! I actually have a problem with the POINT structure.
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "winuser.h"
#include "windef.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
typedef lp1 *tagPOINT;
void __fastcall TForm1::Button1Click(TObject *Sender)
{
long retval;
retval = GetCursorPos(lp1);
}
Tnx in advance,
See you,
keetsh