This example uses WinEnableWindowUpdate to set a window's WS_VISIBLE style to visible and cause the window to be updated by a WM_PAINT message.
#define INCL_WINWINDOWMGR /* Window Manager Functions */ #include <os2.h> HWND hwnd; /* parent window */ BOOL fSuccess; /* success indicator */ case WM_CREATE: /* if window has WS_VISIBLE off, set state to visible */ if (!WinIsWindowVisible(hwnd)) { /* set state to visible and cause WM_PAINT message */ fSuccess = WinEnableWindowUpdate(hwnd, EWUF_ENABLE); }