当前位置:首页 » 多媒体相关

用CEditView的SetWindowText函数后,怎么把滚动条和文本都滚动到最末尾一行.


我试过用getscrollrange得到滚动条的范围,然后用setscrollpos,滚动条是拉下来了,但是文本却还是第一行,怎么解决呢?

推荐阅读

  • 三星推出在线服务 帮助客户满足环保要求 [详细内容]
  • 2300元就可搞定全球最小3G手机 [详细内容]
  • 西门子S65 Config和Cache文件夹解释大全 [详细内容]
  • 黄宏生案终审再次延期 创维公司股价应声下挫 [详细内容]
  • 超小金属多功能 朝华MP-308 MP3低价来袭 [详细内容]
  • E680i的电子书 [详细内容]
  • WCDMA用户增长140% 诺基亚占亚太近6成份额 [详细内容]
  • 网友回答:
    网友:afc

    cedit::linescroll   see   also  
      cedit   overview   |   class   members   |   hierarchy   chart   |   cedit::lineindex  
      call   this   function   to   scroll   the   text   of   a   multiple-line   edit   control.  
       
      void   linescroll(  
            int   nlines,  
            int   nchars   =   0    
      );  
      parameters  
      nlines    
      specifies   the   number   of   lines   to   scroll   vertically.    
      nchars    
      specifies   the   number   of   character   positions   to   scroll   horizontally.   this   value   is   ignored   if   the   edit   control   has   either   the   es_right   or   es_center   style.    
      remarks  
      this   member   function   is   processed   only   by   multiple-line   edit   controls.    
       
      the   edit   control   does   not   scroll   vertically   past   the   last   line   of   text   in   the   edit   control.   if   the   current   line   plus   the   number   of   lines   specified   by   nlines   exceeds   the   total   number   of   lines   in   the   edit   control,   the   value   is   adjusted   so   that   the   last   line   of   the   edit   control   is   scrolled   to   the   top   of   the   edit-control   window.    
       
      linescroll   can   be   used   to   scroll   horizontally   past   the   last   character   of   any   line.  
       
      for   more   information,   see   em_linescroll   in   the   platform   sdk.  
       
      example  
      see   the   example   for   cedit::getfirstvisibleline.  
       
      see   also  
      cedit   overview   |   class   members   |   hierarchy   chart   |   cedit::lineindex  
       
     

    网友:bcpl

    cedit   &redit   =   geteditctrl();  
      int   n   =   redit.getwindowtextlength();  
      redit.setsel(n,   n);

    .

    讨论区

    Login