Mousemovepoint

This is a discussion on Mousemovepoint within the Windows Programming forums, part of the Platform Specific Boards category; hi folks, I am new to windows programming, i have the following code: #include <windows.h> int main(){ MOUSEMOVEPOINT lppt; ...... ...

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    5

    Question Mousemovepoint

    hi folks,
    I am new to windows programming, i have the following code:
    #include <windows.h>

    int main(){
    MOUSEMOVEPOINT lppt;
    ......
    }

    but MOUSEMOVEPOINT was not defined, what headers should I include?
    thanks

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>I am new to windows programming<<

    Then you should post your windows questions on the windows board.

    MOUSEMOVEPOINT is declared in winuser.h, which is included when you #include <windows.h> so you don't have to include any other headers to use it. You will have to #define WINVER 0x0500 prior to #including windows to use it, though.

    For future reference for this type of problem, steps to get this information:

    1. MOUSEMOVEPOINT search on google yields:

    2. msdn description for MOUSEMOVEPOINT from which the header it is declared in, winuser.h, can be read.

    3. 'Find' the occurence(s) of the string MOUSEMOVEPOINT in winuser.h which reveals:
    Code:
    #if(WINVER >= 0x0500)
    typedef struct tagMOUSEMOVEPOINT {
        int   x;
        int   y;
        DWORD time;
        DWORD dwExtraInfo;
    } MOUSEMOVEPOINT, *PMOUSEMOVEPOINT, FAR* LPMOUSEMOVEPOINT;
    /* blah blah blah*/
    Doesn't always work, but at least it eliminates it as a possible source of error.

    Hope that helps. Good luck

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    5
    thanks Ken, that was very helpful.
    However I ran into another problem after the program was executing, it says"the procedure entr point GetMouseMovePOints could not be located in the dynamic link library USER32.dll,
    I tried to include lots of other libraries, but none worked. how do I go about solving this problem.
    thanks, and I will post my future problems to the windows section

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    I can only assume you are trying to run it on win98 which gives rise to the reported error. It works ok on win2k and presumably xp(?). msdn seems to point to the function being intended primarily for use with win ce.

  5. #5
    Registered User
    Join Date
    Dec 2002
    Posts
    5
    actually I"m running it on windows xp... , dunno what other lib i need to load.
    thanx

  6. #6
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>actually I"m running it on windows xp<<

    My apologies. The fn I was actually referring to and is declared in winuser.h is GetMouseMovePointsEx which compiles and runs on win2k so should be good for xp too. Whether it actually 'works' or not is another matter entirely.

    Hope that helps.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21