2.2.6.8.1 DeviceContext::Attach

Description

Use hDC set internal hDC value.

Syntax

BOOL Attach( HDC hDC )

Parameters

hDC
[input] A 32-bit pointer to an unspecified type.

Return

Returns TRUE for success or FALSE for failure.

Examples

EX1

int    DeviceContext_Attach_ex1()
{
    Page pb;
    pb = Project.Pages(); // Get the project's active page
    if( pb.IsValid() )
    {
        string strName = pb.GetName();
        HDC hdc = (HDC)&strName;
        ASSERT(hdc);
        DeviceContext myDC ;
        bool bRet = myDC.Attach(hdc);
    }
    return 0;
}

Remark

See Also

Header to Include

origin.h