Help Center

CGpGraphics.FromHWNDmethod

Creates a **Graphics** object that is associated with a specified window.

GraphicsmethodCGpGraphics.incdocumented

Syntax

FUNCTION FromHWND (BYVAL hwnd AS HWND, BYVAL icm AS BOOLEAN = FALSE) AS GpStatus

Parameters

NameDescription
hwndHandle to a window that will be associated with the new Graphics object.
icmOptional. Boolean value that specifies whether the new Graphics object applies color adjustment according to the ICC profile associated with the display device. TRUE specifies that color adjustment is applied, and FALSE specifies that color adjustment is not applied. The default value is FALSE.

Return value

If the function succeeds, it returns StatusOk, which is an element of the GpStatus enumeration.

If the function fails, it returns one of the other elements of the GpStatus enumeration.

Description

Creates a Graphics object that is associated with a specified window.

Reference

  • Include file CGpGraphics.inc
  • Defined in AfxNova/CGpGraphics.inc:81
  • Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
  • Topic: CGpGraphics Class