Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

GetSystemMetrics(SM_MOUSEWHEELPRESENT) returns 0 in remote desktop session in Windows 8.1 or Windows Server 2012 R2


View products that this article applies to.

Symptoms

Assume that you have an application that is running in a remote desktop session in Windows 8.1 or in Windows Server 2012 R2. The application calls
GetSystemMetrics(SM_MOUSEWHEELPRESENT) to check whether a mouse wheel is present on an attached mouse device. In this situation, Windows will always return 0 because the Remote Desktop service reports that a 2-button mouse is attached that does not include a mouse wheel. 

This can affect applications that rely upon GetSystemMetrics when it determines whether to process mouse wheel input. 

↑ Back to the top


More Information

Applications can call GetSystemMetrics together with the SM_MOUSEWHEELPRESENT flag to check whether a mouse wheel is present on an attached mouse device. GetSystemMetrics returns a nonzero value if a mouse device that includes a mouse wheel is installed. Otherwise, the function returns zero.

Applications or third-party controls that call GetSystemMetrics(SM_MOUSEWHEELPRESENT) to determine whether a mouse wheel is present may not process mouse wheel input when GetSystemMetrics reports that a mouse wheel is not present. These applications or third-party controls can be updated to process mouse wheel input regardless of whether GetSystemMetrics reports that a mouse wheel is present.

↑ Back to the top


Keywords: kbsurveynew, kbexpertiseadvanced, kbtshoot, kb

↑ Back to the top

Article Info
Article ID : 3015033
Revision : 1
Created on : 1/7/2017
Published on : 11/28/2014
Exists online : False
Views : 354