?
Solved

How can I make my mouse cursor invisible in my Visual C++ windows application?

Posted on 2003-02-26
2
Medium Priority
?
991 Views
Last Modified: 2008-03-06
I am working on a windows application written in Visual C++ and I am trying to make my mouse cursor invisible when one of the windows is active.  Does anyone know how to make this happen?
0
Comment
Question by:pm77
[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
2 Comments
 
LVL 1

Accepted Solution

by:
gstock earned 300 total points
ID: 8027955
This function should do the trick:

int ShowCursor(
    BOOL bShow
);

When the window you want to hide the mouse cursor in gains focus, simply call the function passing a FALSE value.

ShowCursor(FALSE);

MSDN Reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Resources/Cursors/CursorReference/CursorFunctions/ShowCursor.asp

Hope this helps,
0
 

Author Comment

by:pm77
ID: 8028120
Thanks, that worked great the first time I tried it.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
In this post we will learn different types of Android Layout and some basics of an Android App.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Introduction to Processes
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

764 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