Windows Dev Center

IApplicationDesignModeSettings::SetNativeDisplaySize method

Sets a spoofed native display size to be used for a Windows Store app running in design mode.

You must call IInitializeWithWindow::Initialize to set a proxy core window before calling this method.

SetNativeDisplaySize must be called before calling ComputeApplicationSize.

Syntax


HRESULT SetNativeDisplaySize(
  [in] SIZE nativeDisplaySizePixels
);

Parameters

nativeDisplaySizePixels [in]

The native size of the display to spoof, as a SIZE structure. The specified size will be normalized to a landscape orientation. To spoof orientation, see SetApplicationViewState.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code, including the following:

Return codeDescription
E_NOT_SET

IInitializeWithWindow::Initialize has not been called to set a proxy core window.

E_MONITOR_RESOLUTION_TOO_LOW

You cannot launch or switch to an immersive app when the resolution is this low. This is currently defined as any resolution below 800 horizontal or 600 vertical pixels when in landscape orientation.

 

Examples

See IApplicationDesignModeSettings for example use of this method.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Twinapi.dll

See also

IApplicationDesignModeSettings

 

 

Community Additions

ADD
Show:
© 2015 Microsoft