Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1320 (closed defect: fixed)

Opened 1 month ago

Last modified 1 month ago

Incorrect enum values in win32 Types module.

Reported by: BenjiSmith Assigned to: kris
Priority: major Milestone: 0.99.8
Component: Core Functionality Version: trunk
Keywords: Cc:

Description

In tango/sys/win32/Types.di, there are a few incorrect enum values. On lines 324 and 325:

    SM_CXVIRTUALSCREEN = (76),
    SM_CYVIRTUALSCREEN = (77),

The correct values should be 78 and 79, respectively.

Details can be found here:

http://msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx

The SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN values are supposed to provide the width and height of the virtual screen (when passed into the GetSystemMetrics? function).

The currently used values (76 and 77) are for the similar metrics SM_XVIRTUALSCREEN and SM_YVIRTUALSCREEN, which request the *origin* of the virtual screen rather than the dimensions (though these names are missing from the current implementation).

Here's my patch that corrects the erroneous values and adds the missing names:

    SM_XVIRTUALSCREEN = (76),
    SM_YVIRTUALSCREEN = (77),
    SM_CXVIRTUALSCREEN = (78),
    SM_CYVIRTUALSCREEN = (79),

Change History

10/08/08 15:55:17 changed by kris

  • status changed from new to closed.
  • resolution set to fixed.

(In [3994]) fixes #1320 :: Incorrect enum values in win32 Types module

Big thank-you to BenjiSmith?