signle document 程序中,怎样在view窗口中添加按钮,滑动条之类的控件啊?可不可以象对话框那样拖出来啊?谢谢!!

解决方案 »

  1.   

    不能拖,你要使用create动态创建,如CButton myButton1, myButton2, myButton3, myButton4;// Create a push button.
    myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
      CRect(10,10,100,30), pParentWnd, 1);// Create a radio button.
    myButton2.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
      CRect(10,40,100,70), pParentWnd, 2);// Create an auto 3-state button.
    myButton3.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE,
      CRect(10,70,100,100), pParentWnd, 3);// Create an auto check box.
    myButton4.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
      CRect(10,100,100,130), pParentWnd, 4);
      

  2.   

    http://dev.yesky.com/346/2655346_1.shtml
    你自己看吧
      

  3.   

    可以用CFormView继承类,就和对话框一样设计界面。
      

  4.   


    支持 在生成工程的最后一步改基类为FormView吧,你可以省去很多事情。FormView上可以直接拖出控件来用。