Window::GetDC

Description

Retrieves a device context for the client area.

Syntax

DeviceContext GetDC( )

Parameters

Return

Identifies the device context for the window client area if successful; otherwise, the return value is NULL.

Examples

EX1

int Window_GetDC_ex1(bool bX = true)
{
    WorksheetPage MyDlg = Project.WorksheetPages(0);
    DeviceContext dc = MyDlg.GetWindow().GetDC();
    return dc.GetDeviceCaps(bX? LOGPIXELSX : LOGPIXELSY);
}

Remark

See Also

header to Include

origin.h