This example copies a rectangle using WinCopyRect.
#define INCL_WINRECTANGLES /* Window Rectangle Functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HAB hab; /* anchor-block handle */ RECTL prclRect2 = {0,0,200,200}; /* source rectangle */ RECTL prclRect1; /* destination rectangle */ fSuccess = WinCopyRect(hab, &prclRect1, &prclRect2);