|
-
May 2nd, 2000, 02:46 AM
#1
Thread Starter
Member
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.
Code:
#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
-
May 2nd, 2000, 11:52 PM
#2
Thread Starter
Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|