Results 1 to 2 of 2

Thread: Please HELP

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 1999
    Posts
    56

    Arrow

    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

  2. #2

    Thread Starter
    Member
    Join Date
    Feb 1999
    Posts
    56

    Cool

    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
  •  



Click Here to Expand Forum to Full Width