This call will copy some portion of state from hgc_src to hgc_dst. The attrib_mask parameter determines what group(s) of state variables will be copied. attrib_mask must contain the bitwise OR of the same symbolic names that can be passed to glPushAttrib. Set attrib_mask to GL_ALL_ATTRIB_BITS to copy the max amount of state. This copy can be done only if hgc_src and hgc_dst were created in the same process.
#include <pgl.h>
HAB hab;
HGC hgc_src;
HGC hgc_dst;
GLuint attrib_mask;
BOOL rc;
rc = pglCopyContext(hab, hgc_src, hgc_dst,
attrib_mask);