long styles; styles = GetWindowLong(child,GWL_STYLE); styles &= ~WS_CHILD; SetWindowLong(child,GWL_STYLE,styles);