请说得详细一点,谢谢了!
[email protected]

解决方案 »

  1.   

    从CButton派生你自己的Button类,添加BN_CLICKED事件处理函数,可在其中将控制转移到父窗口
      

  2.   

    只要给button指定一个ID就可以了,
    在OnCommand里面可以获得BN_CLICKED事件.
    LOWORD HIWORD 
    具体看msdn
      

  3.   

    Put this in your message map declaration in your .h file...DECLARE_EVENTSINK_MAP()And this in the corresponding .cpp file (arsewizard usually puts these sorts
    of things near the top of the code)...BEGIN_EVENTSINK_MAP(CYourCtrl, COleControl)
        //{{AFX_EVENTSINK_MAP(CYourCtrl)
            ON_EVENT(CYourCtrl,<ctrl ID>,<event ID>/*<event name>*/,<handler
    function name>,<param type codes>)
        //}}AFX_EVENTSINK_MAP
    END_EVENTSINK_MAP()