在CFileDialog中创建的打开对话框能否将左下角的"打开"按钮的名改为其它的名字?

解决方案 »

  1.   

    CFileDialog::SetControlTextSee Also
    CFileDialog Overview | Class Members | Hierarchy Chart | CDM_SETCONTROLTEXT | CFileDialog::HideControl
    Call this member function to set the text for the specified control in an Explorer-style Open or Save As common dialog box.void SetControlText(
       int nID,
       LPCSTR lpsz 
    );
    Parameters
    nID 
    The ID of the control for which to set the text. 
    lpsz 
    A pointer to the string containing the text to set for the control. 
    Res
    The dialog box must have been created with the OFN_EXPLORER style; otherwise, the function will fail with an assertion.
      

  2.   

    How can I set the OFN_EXPLORER style?
    And what is the ID?
      

  3.   

    SetControlText(IDOK, _T("选择"));
      

  4.   

    感觉 ToperRay(绿皮狼) 正解.
    那个按钮应该就是 IDOK
      

  5.   

    重载CFileDialog,在覆盖OnInitDone()在这个函数中改变这个控件的文本就可以了
      

  6.   

    How can I set the OFN_EXPLORER style?
    ====================================================
    u can use OFN_EXPLORER in the constructor like this:CFileDialog dlg( TRUE, NULL, NULL,
                     OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_EXPLORER );And what is the ID?
    ====================================================
    ID_OK