GETHDC |
Top Previous Next |
Syntax UINT = GETHDC(win as WINDOW) Description Safe way to access a device context to an EBASIC created window. The returned dc can be used with any Windows API function that requires a device context to the window. Parameters win - Window to obtain the drawing context. Return value A handle to a device context or NULL if the device context could not be obtained. Remarks A dc may also be obtained for caching purposes. While you hold the dc all drawing functions will use the cached copy instead of obtaining a new one for each operation which can significantly speed up drawing operations. The device context returned is compatible with EBASIC's autodraw windows and will be preset with the current window attributes such as font, pen colors and drawing modes. The dc must be returned to the system by using RELEASEHDC when you are finished using it. Every call to GETHDC must be matched in pairs to RELEASEHDC. See Also: RELEASEHDC Example usage hdc = GETHDC(win) |