当前位置: 首页 > news >正文

seo网站排名后退/运营是做什么的

seo网站排名后退,运营是做什么的,做网站平台多少钱,2345网址导航下载到桌面在做TabControl时,有一个子窗口内容很多,不能滚动,于是遇到了如何让子窗口滚动的问题。可能是许久不动VC的缘故,做起来有些木讷了:) 知道了做在CDialog里的WS_VSCORLL里就成了,反正不又不是什么…

在做TabControl时,有一个子窗口内容很多,不能滚动,于是遇到了如何让子窗口滚动的问题。可能是许久不动VC的缘故,做起来有些木讷了:)

 

知道了做在CDialog里的WS_VSCORLL里就成了,反正不又不是什么创造性的劳动,参考了网上朋友的Code,(那人说他是参考的CodeProject的内容,“拿来主义”搞一下好了),做啥事情,只看结果不是(没有结果啥都不是:))。

 

页面的地址: http://blog.sina.com.cn/s/blog_53b603930100aadr.html

                   http://www.codeproject.com/dialog/scrollablechilddialog.asp

 

 

以下就是那页面的内容了:

 

HOWTO:   Create   a   Resizeable   Dialog   Box   with   Scroll   Bars    
   
  Q262954  
   
   
  --------------------------------------------------------------------------------  
  The   information   in   this   article   applies   to:  
   
  The   Microsoft   Foundation   Classes   (MFC),   included   with:  
  Microsoft   Visual   C++,   32-bit   Enterprise   Edition,   version   4.2    
  Microsoft   Visual   C++,   32-bit   Professional   Edition,   version   4.2    
  Microsoft   Visual   C++,   32-bit   Enterprise   Edition,   version   5.0    
  Microsoft   Visual   C++,   32-bit   Professional   Edition,   version   5.0    
  Microsoft   Visual   C++,   32-bit   Enterprise   Edition,   version   6.0    
  Microsoft   Visual   C++,   32-bit   Professional   Edition,   version   6.0    
  Microsoft   Visual   C++,   32-bit   Learning   Edition,   version   6.0  
   
  --------------------------------------------------------------------------------  
   
   
  SUMMARY  
  This   article   describes   how   to   create   a   resizeable   dialog   box   with   scroll   bars.   The   process   consists   of   four   basic   parts:    
   
  In   Resource   Editor,   select   the   Horizontal   Scroll   and   Vertical   Scroll   styles   in   the   properties   of   the   dialog   box.  
   
   
  Select   the   Resizing   Border   style   to   make   the   dialog   box   resizeable.  
   
   
  Override   the   WM_VSCROLL   and   WM_HSCROLL   message   handlers.  
   
   
  Override   the   WM_SIZE   message   handler   to   set   the   scroll   bar   range   if   the   size   is   reduced   to   smaller   than   the   original   size.  
   
   
   
   
   
  MORE   INFORMATION  
  To   create   a   resizeable   dialog   box   with   a   vertical   scroll   bar,   perform   the   following   steps:    
   
  Use   App   Wizard   to   create   a   Microsoft   Foundation   Classes   (MFC)   dialog-based   application.  
   
   
  In   Resource   Editor,   add   some   controls   to   the   dialog   resource   template,   select   Vertical   Scroll   in   the   properties   of   the   dialog   box,   and   choose   Resizing   as   the   Border   style.  
   
   
  Add   the   following   protected   member   variables   to   your   dialog   class:    
   
  int   m_nCurHeight;  
  int   m_nScrollPos;  
  CRect   m_rect;    
  Use   m_nScrollPos   to   store   the   current   vertical   scroll   position.   Use   m_nCurHeight   to   store   the   current   height   of   the   dialog   box,   and   to   handle   the   scrolling   in   the   OnVScroll   method.  
   
   
  To   get   the   original   window   size,   add   the   following   line   to   the   OnInitDialog   method:  
   
   
   
  GetWindowRect(m_rect);  
  m_nScrollPos   =   0;    
  Add   a   message   handler   to   the   OnSize   method   for   the   WM_SIZE   message   to   set   the   scroll   bar   range.   Set   the   range   to   0   if   the   size   is   increased   to   more   than   the   original   size.  
   
   
   
  void   CTestDlg::OnSize(UINT   nType,   int   cx,   int   cy)    
  {  
  CDialog::OnSize(nType,   cx,   cy);  
   
  //   TODO:   Add   your   message   handler   code   here.  
  m_nCurHeight   =   cy;  
  int   nScrollMax;  
  if   (cy   <   m_rect.Height())  
  {  
            nScrollMax   =   m_rect.Height()   -   cy;  
  }  
  else  
            nScrollMax   =   0;  
   
  SCROLLINFO   si;  
  si.cbSize   =   sizeof(SCROLLINFO);  
  si.fMask   =   SIF_ALL;   //   SIF_ALL   =   SIF_PAGE   |   SIF_RANGE   |   SIF_POS;  
  si.nMin   =   0;  
  si.nMax   =   nScrollMax;  
  si.nPage   =   si.nMax/10;  
  si.nPos   =   0;  
                  SetScrollInfo(SB_VERT,   &si,   TRUE);    
  }    
  Add   a   message   handler   for   the   WM_VSCROLL   message   to   the   OnVScroll   method:  
   
   
   
  void   CTestDlg::OnVScroll(UINT   nSBCode,   UINT   nPos,   CScrollBar*   pScrollBar)    
  {  
  //   TODO:   Add   your   message   handler   code   here   and/or   call   default.  
  int   nDelta;  
  int   nMaxPos   =   m_rect.Height()   -   m_nCurHeight;  
   
  switch   (nSBCode)  
  {  
  case   SB_LINEDOWN:  
  if   (m_nScrollPos   >=   nMaxPos)  
  return;  
  nDelta   =   min(nMaxPos/100,nMaxPos-m_nScrollPos);  
  break;  
   
  case   SB_LINEUP:  
  if   (m_nScrollPos   <=   0)  
  return;  
  nDelta   =   -min(nMaxPos/100,m_nScrollPos);  
  break;  
   
                    case   SB_PAGEDOWN:  
  if   (m_nScrollPos   >=   nMaxPos)  
  return;  
  nDelta   =   min(nMaxPos/10,nMaxPos-m_nScrollPos);  
  break;  
   
  case   SB_THUMBPOSITION:  
  nDelta   =   (int)nPos   -   m_nScrollPos;  
  break;  
   
  case   SB_PAGEUP:  
  if   (m_nScrollPos   <=   0)  
  return;  
  nDelta   =   -min(nMaxPos/10,m_nScrollPos);  
  break;  
   
                    default:  
  return;  
  }  
  m_nScrollPos   +=   nDelta;  
  SetScrollPos(SB_VERT,m_nScrollPos,TRUE);  
  ScrollWindow(0,-nDelta);  
  CDialog::OnVScroll(nSBCode,   nPos,   pScrollBar);  
  }    
  Build   and   run   the   application.   Resize   the   dialog   box   to   show   the   vertical   scroll   bar.  
   
   
  For   horizontal   scrolling,   add   the   WM_HSCROLL   message   handler   in   a   similar   way,   and   add   the   necessary   code   to   the   OnSize   and   OnInitDialog   methods.    
   
  Additional   query   words:    
   
  Keywords   :   kbDlg   kbMFC   kbScrollBar   kbGrpDSMFCATL    
  Issue   type   :   kbhowto    
  Technology   :   kbAudDeveloper   kbMFC  

 

 

 

http://www.jmfq.cn/news/5025061.html

相关文章:

  • 湖北省勘察设计协会网站/百度公司高管排名
  • wordpress文章评论数量/南昌seo顾问
  • 提升学历最快的方法/廊坊seo培训
  • 网站建设设计风格如何与色彩搭配/广州百度推广优化排名
  • 有模版之后怎么做网站/杭州网站优化推荐
  • 成都专业网站建设价格低/合肥瑶海区房价
  • 咸阳做网站公司电话/百度怎么优化网站排名
  • dw网站制作的源代码/佛山网站快速排名提升
  • 柳州市住房和城乡建设局网站/百度搜索风云榜手机版
  • wordpress安装显示空白页/网站seo具体怎么做
  • redis网站开发教程/杭州推广公司
  • 沂水做网站/推广赚钱软件
  • java 制作网站开发/网络推广免费网站
  • 网站建设的500字小结/百度知道灰色词代发收录
  • 网站正能量视频不懂我意思吧/每日重大军事新闻
  • 网站怎么办/全自动引流推广软件下载
  • 网站禁止右键复制代码/网上宣传方法有哪些
  • 网站建设的原则/重庆百度seo代理
  • 住宅和城乡建设部网站/百度指数有三个功能模块
  • 中山古镇做网站/百度推广营销中心
  • 做同城网站有哪些/seo关键词排名教程
  • 企业网站开发北京/关键词整站优化
  • 网站备案信息可以更改吗/seo网站排名助手
  • 网站设计多少钱市场价/营销策划公司介绍
  • 门网站制作/专业网站seo推广
  • 用wordpress建站之后如何优化/成都seo培训班
  • 做网站彩票代理犯法吗/搭建一个网站的流程
  • wordpress评论回复通知/seo关键词排名注册价格
  • 江西做网站的公司/独立站优化
  • 做故障风的头像的网站/市场营销方案范文