Top  Previous  Next



DisplayCreateDevice <devicename> [–resize on|off] [-rectangle <left> <top> <width> <height>] [–directdraw on|off] [–debugtouches]








Info: new display device <devicename> created

Error: can't create new display device

Error: device already exists

Error: can't create alias for device, so can't create device

SyntaxError: invalid parameters to DisplayCreateDevice

SyntaxError: insufficient parameters to DisplayCreateDevice


Response (immediate socket)







Creates a new display device — that is, a new window on the Windows desktop that you may move around. (Remember, the full-screen display devices are created for you by the server, and are managed by the server as a limited resource, meaning that two clients cannot gain access to the same monitor simultaneously. However, clients can create 'normal' windows as they wish, and use them in the same way as the full-screen displays.)


The new 'device' is referred to solely by its name, and is private to the client that creates it.


The rectangle parameter allows you to specify the initial size of the window. The top left of the rectangle is that of the whole window; the width/height are that of the client area (the usable part of the window, inside the window's borders).


The resize parameter allows you to prevent the user resizing the window.


The directdraw parameter allows you to choose whether the new device window is to use DirectDraw (on) or only the Windows GDI (off). As it gives better performance, DirectDraw is on by default.


Device names must be unique (across virtual displays and aliases for physical displays).


Note that as the window being created has a title bar, there is a minimum width that can be created – on my system the minimum client area width is 102 pixels for resizable windows or 100 pixels for non-resizable windows. If you try to create a window smaller than this, a 104-pixel-wide window is created. Use DisplayGetSize to retrieve the actual size – but note that DisplayGetSize will not return the correct information until the user-interface thread has displayed the window, which may be a few milliseconds after the client is first able to send a DisplayGetSize command to query the new display! Before the user-interface thread has created the window, DisplayGetSize will return –1 for all sizes.


The debugtouches option is used by the WhiskerSDK internally when requesting virtual monitor windows for claimed physical devices. If this option is used, then touches will be shown on all documents displayed on the device.


Revision history


Implemented by WhiskerServer version 2.3. DebugTouches option added in WhiskerServer 2.12.1


See also


Display devices