Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TrackMouseEvent

Posted on 1998-04-16
7
Medium Priority
?
429 Views
Last Modified: 2013-12-03
in winuser.h this is defined, I am using VC++5 dev. studio.
some how I get
error C2065: 'TrackMouseEvent' : undeclared identifier

that means I have to define some settings in my project menu
I am on a NT machine so this should let me use this API,
how ?
0
Comment
Question by:has
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 150 total points
ID: 1412812
It does not matter what type of machine your are on.  What matters is what the target machine for the application is.  You must indicate that this appliucation is for windows NT
0
 
LVL 22

Expert Comment

by:nietod
ID: 1412813
To indicate that an application target is windows NT, I think you just need to #define NT_INCLUDED.
0
 

Author Comment

by:has
ID: 1412814
what I meant was once I define and link properly,
the TrackMouseEvent will function, will not return
not implemented error. (remember it only works in 98, nt not
on 95) so that is what i mean. but the problem is to
compile and link it properly with certain settings.
I guess if you look at winuser.h you may tell what is
needed. it is strange that it knows the structure but
not the function, see below

// end_r_winuser

typedef struct tagTRACKMOUSEEVENT {
    DWORD cbSize;
    DWORD dwFlags;
    HWND  hwndTrack;
    DWORD dwHoverTime;
} TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;

WINUSERAPI
BOOL
WINAPI
TrackMouseEvent(
    LPTRACKMOUSEEVENT lpEventTrack);
this is from winuser.h, so in my project TRACKMOUSEEVENT
is recognized no problem, but just below it TrackMouseEvent
is not recognized ?? may be because of WINUSERAPI use, I dont know that is why I asked the question, any ideas ?


0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:has
ID: 1412815
by the way if I directly include
extern "C" WINUSERAPI BOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack); in my own header
it works. but I need to know what makes is not working
from winuser.h
0
 
LVL 22

Expert Comment

by:nietod
ID: 1412816
the include files define structures for every version of windows (NT, 95, 3.1) because your program can create instances of these structure on any computer.  That is, you can create a structure regardless of what operating system you are running on.  However, the provedures provided by the operating system vary from system to system, so they are not always defined.  On a windows 95 computer you can create a TRACkMOUSEEVENT structure (and use it for whatever you want), but you cannot call TrackMouseEvent() because it is not provided by the operating system.

Does this answer your question?  I'm having a hard time understanding you.
0
 

Author Comment

by:has
ID: 1412817
For some API calls, you can call them but they may simply return false or null what ever (not implemented) when they function. but this does not prevent you compiling your program. such as
this one. any way i solved my problem, thanks.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1412818
It seems like you are confusing different issues.  

You say
  this does not prevent you compiling your program

What matters at compile time is the target OS.  I can compile a program that is targeted for NT on a 95 machine.  That program can use NT specific procedures and it will compile fine.  I will not be able to run it however.  It will only run on NT.

You also say
   For some API calls, you can call them but they may simply return false or null what ever (not implemented).

This is not true.  If you application contains calls to API procedures that are not available on the operating system it runs on the application will not run.  That is, this error will be detected at load time and the application will never execute.  For example if you use a NT only procedure and try to run under 95, The program will not run.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question