如何在函数里调用一个已经产生的对话框!
比如在运行这个函数时,这个对话框能自动弹出来,并能运行出来结果!
多谢了!

解决方案 »

  1.   

    在资源加入一个dialog,双击后生成CXXXDlg类,然后在你这个函数所在文件的头上#include CXXXDlg.h,在函数中如下:
    CXXXDlg  dlg ;
    dlg.DoModal() ;
      

  2.   

    用一个变量保存对话框的指针,然后在需要时用showwindow()显示对话框,不需要时隐藏该对话框。
      

  3.   

    在函数中加入DLG的头文件,
    然后 使用
    CXXXDlg adlg;
    adlg.DoModal();就可以了。
      

  4.   

    #include "dlg.h"
    Cdlg dlg;
    dlg.DoModal();
      

  5.   

    你可新建与关闭。
    DestroyWindow
      

  6.   

    Insert->resource->Dialog
    修改类名,
    #include"XXXX.h"
    CXXxXX dlg;
    dlg.DoModal();
      

  7.   

    #include"XXXX.h"
    CXXxXX dlg;
    dlg.x = x
    dlg.y = y
    dlg.DoModal();
    if(ret = idok)
    x = dlg.x
    y = dlg.y
      

  8.   


      #include "dlg.h"
    Cdlg dlg;
    dlg.DoModal();
      
     
      

  9.   

    显示对话框用DoModal()
    显示数据:在对话框中加入一个Edit box控件,对应添加一个变量m_Edit。
    然后:
              m_Edit="hello";
    UpdateData(FALSE);
      

  10.   

    use AfxGetApp() to get the point to your app, it should poiting to your dlg if you declared it in your app and haven't destroyed it.
    by this point, you can get everything you want.
      

  11.   

    :) sorry, point should be pointer, it's my mistake.