如题, 可用分:42  
没分了, 呵呵

解决方案 »

  1.   

    重载OnIntialdialog函数,加上代码:
    SetWindowText(...);
    SetDlgItemText( int nID, LPCTSTR lpszString );
      

  2.   

    yinx(yinx) ( )说法不可行啊, findwindow是得在显示出窗口后的, 可是那时候"打开"对话框都已经显示了, 再说domodal后, 程序停顿, 呵呵
      

  3.   

    hanwg() ( ) 的说法中,nId得不到, 因为是微软已经构建好的类, 源代码你是看不到的, 谁知道对话框的ID啊?
      

  4.   

    char BASED_CODE szFilter[] = "Microsoft Access Fiel(*.mdb)|*.mdb|All Files (*.*)|*.*||";
    CFileDialog dlg(TRUE,"mdb","*.mdb",OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,szFilter);
    dlg.m_ofn.lpstrTitle="备份数据库";
    if(dlg.DoModal()==IDCANCEL)
    return;
      

  5.   

    dlg.m_ofn.lpstrTitle="备份数据库"; //改变标题
      

  6.   

    To andy_lau:
    能不能把按钮的标题改成别的呢? 如构造时是true则为打开, 如别存,为保存, 能不能改为别的?
      

  7.   

    OPENFILENAME
    The OPENFILENAME structure contains information that the GetOpenFileName and GetSaveFileName functions use to initialize an Open or Save As common dialog box. After the user closes the dialog box, the system returns information about the user's selection in this structure. typedef struct tagOFN { // ofn 
        DWORD         lStructSize; 
        HWND          hwndOwner; 
        HINSTANCE     hInstance; 
        LPCTSTR       lpstrFilter; 
        LPTSTR        lpstrCustomFilter; 
        DWORD         nMaxCustFilter; 
        DWORD         nFilterIndex; 
        LPTSTR        lpstrFile; 
        DWORD         nMaxFile; 
        LPTSTR        lpstrFileTitle; 
        DWORD         nMaxFileTitle; 
        LPCTSTR       lpstrInitialDir; 
        LPCTSTR       lpstrTitle; 
        DWORD         Flags; 
        WORD          nFileOffset; 
        WORD          nFileExtension; 
        LPCTSTR       lpstrDefExt; 
        DWORD         lCustData; 
        LPOFNHOOKPROC lpfnHook; 
        LPCTSTR       lpTemplateName; 
    } OPENFILENAME; 
      

  8.   

    FindWindow是可行的
    至少有三种方法
    1.SetWindowHookEx得到新窗口产生的消息并对其子类化或者用FindWindow!
    2.新模式窗口产生后主窗口后收到WM_active消息这时可用FindWindow
    3.在新模式窗口产生之前SetTimer然后响应wm_timer并Findwindow具体可看这一贴:
    http://expert.csdn.net/Expert/topicview.asp?id=1187389
      

  9.   

    1.从CFileDialog继承一个子类CMyDialog
    2.重载OnInitDialog()
    3.在OnInitDialog()加入SetControlText(IDOK,"test");
    SetControlText(IDCANCEL,"cancel1");