Expand Minimize
This topic has not yet been rated - Rate this topic

RegisterScaleChangeNotifications function

Registers a window to receive callbacks when scaling information changes.

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

RevokeScaleChangeNotifications

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.