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

 

    摘要: 哪里有相关的文章? ......
 ·求office2000注册码,用在线等待    »显示摘要«
    摘要: 求office2000注册码,急用!!!在线等待! ......


为什么在dialogBar上放button,运行时是不可用的

如上

NO.1   作者: winthegame

添加一个click的消息映射给Button就行了.

NO.2   作者: hearttree

你的button必须要相应消息,否则就是不可用的。

NO.3   作者: shu

应该是命令路由的问题。  
   
  BOOL   CMainFrame::OnCmdMsg(UINT   nID,   int   nCode,   void*   pExtra,   AFX_CMDHANDLERINFO*   pHandlerInfo)    
  {  
  //   TODO:   Add   your   specialized   code   here   and/or   call   the   base   class  
  if   (m_DlgBar.OnCmdMsg(nID,nCode,pExtra,pHandlerInfo))  
  return   TRUE;  
  return   CFrameWnd::OnCmdMsg(nID,   nCode,   pExtra,   pHandlerInfo);  
  }

NO.4   作者: wistaria

这是一个有关DialogBar   Toolbar   的例子  
  http://www.ccw.com.cn/htm/app/down/4d_s1.zip

NO.5   作者: Jupiter520

运行时不能用的很大情况,是你没有为这个button添加click的消息映射。  
  添加后就可以了。但要注意,你的click的消息映射添加的位置。  
  //Create   DiaglogBar  
  if   (   !m_wndDialogBar.Create(   this,   IDD_PANOVIEW_DBAR,   CBRS_TOP,   IDD_PANOVIEW_DBAR   )   ) {  
  TRACE0(   "Failed   to   create   dialogbar   \n"   );  
  return -1;  
  }  
  如果,你的create的第一个参数是指向mainfrm的话,就要把click的消息映射添加到mainfrm的class中。


    摘要: 如题! ......
» 本期热门文章:

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