GpiCreatePS
Appearance
It is used to create a presentation space (PS). A presentation space is a logical container that is used to hold and manage graphical objects, such as lines, curves, text, and images.
Syntax
GpiCreatePS( hab, hdc, psizlSize, flOptions)
Parameters
- hab (HAB) - input
- A handle to an anchor block (AB) that identifies the process that is creating the PS.
- hdc (HDC) - input
- A handle to a device context (DC) that specifies the device that the PS will be associated with.
- psizlSize (PSIZEL) - input
- A PSIZEL structure that specifies the size and resolution of the PS.
- flOptions (ULONG)
- A set of flags that specify options for creating the PS.
Returns
- rc (HPS)
The function returns a handle to the created PS, or NULL if an error occurs.
Sample
HAB hab; HDC hdc; PSIZEL psizl; HPS hps; hab = WinQueryAnchorBlock(HWND_DESKTOP); hdc = WinOpenWindowDC(HWND_DESKTOP); psizl.cx = 640; psizl.cy = 480; hps = GpiCreatePS(hab, hdc, &psizl, PU_PELS | GPIF_DEFAULT); if (hps == NULL) { // An error occurred, handle it here }