This example removes the disable-foreground attribute after querying to ensure that the referenced window has this attribute defined.
#define INCL_WINSYS /* System values */ #include <os2.h> HWND hwnd; /* window handle */ ULONG AttrFound; /* attributes found */ ULONG AttrValue[32]; /* attribute value */ ULONG cbRetLen; /* length of returned value */ WinRemovePresParam(hwnd, PP_DISABLEDFOREGROUNDCOLORINDEX);