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
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
>>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:Doesn't always work, but at least it eliminates it as a possible source of error.Code:#if(WINVER >= 0x0500) typedef struct tagMOUSEMOVEPOINT { int x; int y; DWORD time; DWORD dwExtraInfo; } MOUSEMOVEPOINT, *PMOUSEMOVEPOINT, FAR* LPMOUSEMOVEPOINT; /* blah blah blah*/
Hope that helps. Good luck
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
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.
actually I"m running it on windows xp... , dunno what other lib i need to load.
thanx
>>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.