I have modelless child dialog. In resource properties Visible flag is set as true.(As per my requirement in resource properties visible flag should be true).

I want to programmatically hide the dialog while initially displaying.

I overrided the presubclasswindow and removed the WS\_VISIBLE flag using below code but the dialog is not getting hidden.

```
void CAddressChildDlg::PreSubclassWindow()
{
    CWnd::PreSubclassWindow();
    if (::IsWindow(m_hWnd))
    {
        LONG lStyle = GetWindowLong(m_hWnd, GWL_STYLE);
        lStyle &= ~WS_VISIBLE;
        SetWindowLong(m_hWnd, GWL_STYLE, lStyle);  
    }
}

```

Please anyone help me to achieve my requirement