Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Creates a memory device context (DC) compatible with the specified device.

 

Syntax

 

hDC = Win_CreateCompatibleDC(hDC)

 

Returns

 

Number.

If the function succeeds, the return value is the handle to a memory DC.

If the function fails, the return value is NULL.

 

Parameters

 

Name

Type

Optional

Meaning

hDC

Number

No

A handle to an existing DC. If this handle is NULL, the function creates a memory DC compatible with the application's current screen.

 

Remarks

 

A memory DC exists only in memory. When the memory DC is created, its display surface is exactly one monochrome pixel wide and one monochrome pixel high. Before an application can use a memory DC for drawing operations, it must select a bitmap of the correct width and height into the DC. To select a bitmap into a DC, use the Win_CreateCompatibleBitmap function, specifying the height, width, and color organization required.

 

When a memory DC is created, all attributes are set to normal default values. The memory DC can be used as a normal DC. You can set the attributes; obtain the current settings of its attributes; and select pens, brushes, and regions.

 

 

Restrictions

 

See also

 

Examples

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software