This example uses WinEnableControl to enable a dialog control if it is currently disabled.
#define INCL_WINWINDOWMGR /* Window Manager Functions */ #include <os2.h> HWND hwndDlg; /* dialog window */ MPARAM mp1; /* Parameter 1 */ USHORT usId; /* dialog control id */ if (!WinIsControlEnabled(hwndDlg, usId)) WinEnableControl(hwndDlg, usId, TRUE);