Citrix Multi-Monitor Server Side Registry Flags

This article contains information about Citrix Multi-Monitor server side registry settings.

Background

Multi-monitor configuration is performed by setting registry values.

Procedure

Caution! Refer to the Disclaimer at the end of this article before using Registry Editor.

On 32-bit servers the registry key is:

HKLMSoftwareCitrixCtxHookAppInit_dllsMultiple Monitor Hook

On 64-bit servers registry key is:

HKLMSoftwareWow6432NodeCitrixCtxHookAppInit_dllsMultiple Monitor Hook

Setting a DWORD named DefaultHooks changes the set of hooks used by all applications on the server.

The preferred method to work with a problematic application is to set a DWORD [ImageName] that overrides the server defaults for the specific application.

Note: The DWORD for Citrix Presentation Server 4.0 required brackets [ ]. For Citrix Presentation Server 4.5, the brackets are no longer required.

The following sample screen shot shows the multiple-monitor hooking for an application named PWConsole.exe:

User-added image

Calculating the DWORD

Each hook has an associated value as displayed in the following table:

Notes:

  • The hooks marked with **, are enabled by default.

  • The hooks marked with +, are enabled by default in Hotfix Rollup Pack 2 for Presentation Server 4.5 and later.

Flag Name

Decimal Value

Hex Value

When to Use

**COLORADOHOOKS

1

0x1

This hook is part of the base set of hooks and should not be turned off, unless you wish to disable hooks for an application. It is responsible for correct maximizing/minimizing and clipping of top-level windows.

**SYSTEMMETRICSHOOK

2

0x2

This hook is part of the base set of hooks and should not be turned off, unless you wish to disable hooks for an application. It is responsible for reporting the correct number of client monitors (SM_CMONITORS) within the session. See GetSystemMetrics function for more details.

**GETMONFROMWINDOWHOOK

4

0x4

Use this hook to ensure the MonitorFromWindow API works correctly. Applications use this API to determine which monitor a window resides on. See MonitorFromWindow function for more details.

**GETMONFROMRECTHOOK

8

0x8

Use this hook to ensure that the MonitorFromRect API works correctly. Applications use this API to determine which monitor a specified rectangle (for example, window rectangle) resides on. See MonitorFromRect function for more details.

**GETMONFROMPOINTHOOK

16

0x10

Use this hook to ensure that the MonitorFromPoint API works correctly. Applications use this API to determine which monitor a specified point (for example, window coordinate) resides on. See MonitorFromPoint functionfor more details.

**GETMONINFOHOOK

32

0x20

Use this hook to ensure that the GetMonitorInfo API returns a correctly populated MONITORINFO structure. Applications usually use this API during monitor enumeration, and use the results to position top-level windows accordingly. See GetMonitorInfo function for more details.

**ENUMDISPMONHOOK

64

0x40

Use this hook to ensure that the EnumDisplayMonitors API enumerates the correct number of client monitors. This hook is usually used in conjunction with GETMONINFOHOOK. Applications that enumerate monitors (for example, PowerPoint in Presenter mode allows you to select which monitor the presentation should be displayed on) should have this hook turned on. See EnumDisplayMonitors function for more details.

+ ENUMDISPDEVHOOK

128

0x80

Use this hook to ensure that the EnumDisplayDevices API enumerates the correct number of client monitors (devices). The DISPLAY_DEVICE structure will be populated with client monitor information. Some applications use this API to query device specific information (such as device name). See EnumDisplayDevices function for more details.

+ ENUMDISPSETHOOK

256

0x100

Use this hook to ensure that the EnumDisplaySettings API retrieves graphics mode information for each monitor. The DEV_MODE structure will be partially populated with graphics mode information. Some applications use this API to determine specific graphics mode capabilities. Applications suffering from drawing/painting issues (for example, client area not painted correctly on resize) should try this hook. See EnumDisplaySettings function for more details.

**CREATEDCHOOK

512

0x200

Use this hook to ensure that the CreateDC API correctly creates a device context associated with the primary display, and not individual client monitors (display). Applications use this API to permit drawing to a specified monitor in a desired format (for example, monitors on the same system can have different pixel formats). However, because the session is a single display, the hook is used to force create device contexts associated with the primary display device. Use this hook if an application suffers from painting issues. See CreateDC function for more details.

**CBTDIALOGHOOK

1024

0x400

This hook is part of the base set of hooks and should not be turned off, unless you wish to disable hooks for an application. It is responsible for correct placing/centering child dialogs (for example, message boxes).

LAUNCHONMONITORHOOK

2048

0x800

This hook attempts to position an application on a particular monitor, on startup. If enabled, the default monitor can be specified by the ICA parameter PreferredLaunchMonitor which accepts a value from 0 (n-1) where n is the number of client monitors. The monitors are enumerated in row-major order in other words, top-left to bottom-right. Currently, the Colorado server-side DefaultLaunchMonitor registry value is disabled.

**WINDOWLONGHOOKS

4096

0x1000

This hook is part of the base set of hooks and should not be turned off, unless you wish to disable hooks for an application. It is responsible for catching applications that dynamically subclass windows, and enforcing MMHook’s COLORADOHOOKS. For more details see:

IGNORE_WS_MAXIMIZE_BOX

8192

0x2000

Before sub classing a window (applying COLORADOHOOKS), MMHook examines a window’s style to ensure a maximize box is present. This is used as a marker for the maximize window capability, and to ensure MMHook does not subclass windows unnecessarily. If a window can be maximized (for example, from the taskbar), but does not have a maximize button, this check can be turned off by setting this flag.

**SUBCLASS_OWNED_WINDOWS

16384

0x4000

MMHook identifies a top-level window as a window that does not have a parent. However, some applications use, as their main window, an owned window. If an application window is maximizing across screens, try turning this flag on as it might be an owned window.

SYSTEMPARAMETERSINFOHOOK

32768

0x8000

Used to return the work-area of the primary monitor. See SystemParametersInfo function for more details.

FORCEMAXIMIZETOMONITOR

65536

0x10000

Applications that intercept the WM_GETMINMAXINFO notification can restrict the area a window is maximized to. To override this behavior, set this flag. See WM_GETMINMAXINFO message for more details.

DISABLEGHOSTWINDOW 4194304 0x400000 Used to disable ghost windows.

This value was introduced by the fix (LC3783) starting from these versions:

  • Current Release: XenDesktop/XenApp 7.8
  • Long Term Support Release: XenDeskop/XenApp 7.6.1000 (LTSR CU1)
  • XenApp 6.5: Hotfix Rollup Pack 7

To change the behavior from the default, choose the hooks you want enabled and add them together. Remember to use decimal mode when entering the value in the registry, or first convert to HEX.

Setting a value of zero (0) is the same as disabling MMHook. This can be done for all processes or per application as described in the preceding section.

Important! Do not disable only winlogon.exe. This could cause reduced system performance because every process tries to find the mapped file that does not exist.

Related:

Leave a Reply