Hiding context help in CFileDialog dialog

Hello all,

Can any one explain how can I hide the context help from a CFileDialog derived dialog.

Thanks.



Answer this question

Hiding context help in CFileDialog dialog

  • StevenR2

    You have to remove WS_EX_CONTEXTHELP style. You can do it for example in the WM_INITDIALOG message handler:

    BOOL CMyFileDialog::OnInitDialog() 
    {
      CFileDialog::OnInitDialog();
     
      CWnd* pParent = GetParent();
      if(NULL != pParent)
      {
       // remove WS_EX_CONTEXTHELP style
       pParent->ModifyStyleEx(WS_EX_CONTEXTHELP, 0);
      }
      return TRUE;
    }


  • vidalsasoon

    Oh.. ya

    I tried the same but on the child parent:
    BOOL CMyFileDialog::OnInitDialog() 
    {
    CFileDialog::OnInitDialog();

    ModifyStyleEx(WS_EX_CONTEXTHELP, 0);

    return TRUE;
    }
    but it didn't work.

    Now, after your reply, I finished my task.

    Thanks alot Ovidiu.



  • Hiding context help in CFileDialog dialog