65.9K
CodeProject is changing. Read more.
Home

MousePos

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.79/5 (16 votes)

Aug 26, 2002

viewsIcon

87697

downloadIcon

2790

A mouse tracking window that displaying the current mouse position or current local time.

Introduction

The "MousePos" is a Win32 SDK application that displays the current mouse position or current local time inside a window (looks like ToolTip) which follows the mouse cursor

I get the Current Mouse Position or Current Local Time inside WM_TIMER processing switch/case, then format this information as a string using the Win32 API function GetTextExtentPoint32 to calculate the size that the string will occupy in the displaying window.

You can click the "MousePos" button on the Windows Taskbar to popup it's menu, switch the displaying mode or change the displaying background/font & color.

So, with this demo you can develop your own variation on the Mouse cursor!.

Thank you for your viewing this article!