当前位置:首页
开发技术指南» 文章正文
    引言:

 ·典型线程问题,救    »显示摘要«
    摘要: 这段代码是点击button1按扭时候建立一个线程,运行函数threadproc,点击button2按扭停止函数threadproc运行。但是执行以后对话框好象没有调用threadproc函数,哪里错了呢?而且点击button2时候出现致命错误。 int stopthread; void cmonitordlg::onbutton1() { stopthread=1; cwinthread ......
 ·关于couninitialize()的问题。    »显示摘要«
    摘要: 需要在一个dlg程序关闭的时候调用couninitialize()。 有什么方法在dlg关闭后再调用couninitialize() ......


如何在manage c++之中绑定按钮的click事件

想对按钮的click事件编程,可不会绑定,请高手帮帮忙:  
  Button   *enterButton;  
  enterButton   =   new   Button();  
  ...  
  enterButton->OnClick   +=   (new   EventHandler(this,   &LoginForm::onEnterClick));  
  其中,onEnterClick是我想对其绑定的函数,想在这里面对enterButton的click事件进行编程,编译器报错,EventHandler的参数不对,那应该用什么函数来绑定呀?  
   
  请写出具体代码,小弟先谢谢了:)

NO.1   作者: yuanyingtanxi

this->enterButton->Click+=new   System::EventHandler(this,onEnterClick);  
   
   
  private:System::Void   onEnterClick(System::Object   *   sender,System::EventArgs   *e)  
  {  
   
  }


 ·难者不会会者不难    »显示摘要«
    摘要: <2004-1-7 下午12时43分59秒> <error> <http> <101017> <[servletcontext(id=7853478, name=defaultwebapp,context-path=)] root cause of servletexception java.sql.sqlexception: [mic......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE