Expand Minimize

RegisterScaleChangeNotifications function

Registers a window to receive callbacks when scaling information changes.

Note  This function is not supported as of Windows 8.1. Use RegisterScaleChangeEvent instead.

Syntax


STDAPI RegisterScaleChangeNotifications(
  _In_   DISPLAY_DEVICE_TYPE displayDevice,
  _In_   HWND hwndNotify,
  _In_   UINT uMsgNotify,
  _Out_  DWORD *pdwCookie
);

Parameters

displayDevice [in]

Type: DISPLAY_DEVICE_TYPE

The enum value that indicates which display device to receive notifications about.

hwndNotify [in]

Type: HWND

The handle of the window that will receive the notifications.

uMsgNotify [in]

Type: UINT

An application-defined message that is passed to the window specified by hwndNotify when scaling information changes. Typically, this should be set to WM_APP+x, where x is an integer value.

pdwCookie [out]

Type: DWORD*

Pointer to a value that, when this function returns successfully, receives a registration token. This token is used to revoke notifications by calling RevokeScaleChangeNotifications.

Return value

Type: STDAPI

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This message specified by uMsgNotify is posted to the registered window through PostMessage. The wParam of the message can contain a combination of SCALE_CHANGE_FLAGS that describe the change that occurred.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

ShellScalingAPI.h

DLL

Shcore.dll

See also

GetScaleFactorForMonitor
RegisterScaleChangeEvent
UnregisterScaleChangeEvent

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.