求助 :vc6.0怎样用c++ 代码给界面添加按钮不用mfc写。
       界面代码没用mfc写。
       界面不是我写的但我要往上面添加按钮求高手帮忙谢谢啦

解决方案 »

  1.   

    有按钮类的话,自己代码创建就可以了,一般是先NEW对象,然后CREATE;
      

  2.   

    CButton* m_Button;
    m_Button= new CButton;
    DWORD dwStyle = WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON;
    m_Button->Create(_T("按钮1"), dwStyle, CRect(10,10,100,20), this,100);
    m_Button->ShowWindow(TRUE);
      

  3.   

    The following example shows how to use the CreateWindow function to create a default push button. hwndButton = CreateWindow( 
        "BUTTON",   // predefined class 
        "OK",       // button text 
        WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,  // styles 
     
        // Size and position values are given explicitly, because 
        // the CW_USEDEFAULT constant gives zero values for buttons. 
        10,         // starting x position 
        10,         // starting y position 
        100,        // button width 
        100,        // button height 
        hwnd,       // parent window 
        NULL,       // No menu 
        (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), 
        NULL);      // pointer not needed 
      

  4.   


    想问一下二楼Create里面的各个参数都代表什么意思啊???