PDA

Click to See Complete Forum and Search --> : Please HELP


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

keetsh
May 2nd, 2000, 11:52 PM
Tnx rchiav, you're WONDERFUL!

It worked so properly! Let me know if you're interested by what I'm programing and I'll send you something... :)

I was actually reading a book chapter about pointers and references.

See you,

keetsh