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

 

 ·有关页面显示前的提示。    »显示摘要«
    摘要: 就是在页面主要内容显示之前显示“正在读取....”的效果。 <script language=javascript> <!-- var div_position=screen.width/2-450/2; document.write(<div id=loaddiv style="padding-top: 50; padding-left: + div_p......
    摘要: 用lotusscript语言,怎么编写“指定视图中,鼠标选定的文档”的程序。谢谢! ......


如何将一张位图作为背景,然后在位图背景中画出位图按钮,list等最好给出源码

rt!

NO.1   作者: sunyou

参考CButtonST,CListBoxST使用:  
  http://www.vckbase.com/document/viewdoc.asp?id=517  
   
  http://www.softechsoftware.it/main.html

NO.2   作者: free_card

http://www.vckbase.com/document/viewdoc.asp?id=491

NO.3   作者: cxjlw

This   is   an   easy   and   flexible   way   to   use   bitmaps   as   buttons   in   your   application,   however   it   has   its   limitations.   It   is   based   on   CStatic   class   and   its   SetBitmap   member   function.  
   
  I   did   it   this   way:  
   
  Step:   Define   button   states   (for   instance:   default,   highlighted,   pressed)   and   draw   the   bitmap   for   each   state.  
   
  Step:   Derive   a   class   from   CStatic,   lets   call   it   CBmpButton.  
   
  Step:   Add   CStatic   controls   to   your   dialog   template   and   associate   member   variable   to   them.   The   type   of   the   variables   should   be   CBmpButton.  
   
  Step:   Add   a   CBitmap   member   variable   to   the   CBmpButton   class   for   each   button   state.   Like   this:  
  protected:  
   
      CBitmap   m_default;           //   normal   state  
      CBitmap   m_highlighted;   //   the   mouse   is   moving   over   it  
      CBitmap   m_pressed;           //   the   button   is   pressed  
   
  Step:   Add   an   initialization   function   to   the   class,   which   will   load   the   bitmaps   (from   the   resource   or   from   file):  
   
  BOOL   CBmpButton::LoadButtonBitmaps(   int   idDefault,    
                                                                          int   idHighlighted,    
                                                                          int   idPressed)  
  {  
      BOOL   retVal   =   TRUE;  
   
      retVal   &=   m_bmpDefault.LoadBitmap(idDefault);  
   
      if   (idUp   <   0)   m_highlighted.LoadBitmap(idDefault);  
      else   retVal   &=   m_highlighted.LoadBitmap(idHighlighted);  
   
      if   (idDown   <   0)   m_pressed.LoadBitmap(idDefault);  
      else   retVal   &=   m_pressed.LoadBitmap(idPressed);  
   
      return   retVal;  
  }  
   
  Step:   Catch   windows   messages   you   want   to   react   to   (WM_MOUSEMOVE,   WM_LBUTTONDOWN,   WM_LBUTTONUP)   and   change   the   bitmap   for   each   one:  
   
  void   CBmpButton::OnLButtonDown(   UINT   nFlags,    
                                                                            CPoint   point)  
  {  
      //   TODO:   Add   your   message   handler   code   here    
      //               and/or   call   default  
      SetBitmap(HBITMAP(m_bmpDown));  
   
      CStatic::OnLButtonDown(nFlags,   point);  
  }  
   
  void   CBmpButton::OnLButtonUp(UINT   nFlags,   CPoint   point)  
  {  
      //   TODO:   Add   your   message   handler   code   here    
      //               and/or   call   default  
      SetBitmap(HBITMAP(m_bmpUp));  
   
      CStatic::OnLButtonUp(nFlags,   point);  
  }  
  etc.  
   
  Step:   I   needed   another   function   to   reset   the   button   -   to   restore   the   default   state,   after   the   mouse   left   the   area   (   SetBitmap(HBITMAP(m_bmpDefault))   );   This   function   is   called   from   the   parent   dialog   member   function   OnMouseMove  
   
  thats   all...    
   
 


 ·动态的edit    »显示摘要«
    摘要: 我想做一个和edit查不多的控件,里面的内容比如象23:34:34的时间数字,象时间一样,右面有和其他的控件可以分别增加和减少里面的时间,比如选上小时可以增加和减少,该怎么做,请高手指点(谢谢) ......
» 本期热门文章:

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