页面控件


日期: 2002-01-01 14:00 | 联系我
关注我: Telegram, Twitter

本程序介绍一个页面控件CCJPager,可用于对话框或视窗中。参见下图。

CCJPagerCtrl比较容易使用,可以用于对话框或视窗中。本例中,用于CToolBar中。打开资源编辑器,编辑控件的属性:

OnInitDialog()中,增加下面代码:

// TODO: Add extra initialization here if (!m_wndToolBar.Create(&m_Pager) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar "); return -1; // fail to create } // Make the toolbar flat. m_wndToolBar.ModifyStyle(0, 0x0800); // Set the child HWND. m_Pager.SetChild(m_wndToolBar.m_hWnd); // Set the pager style to PGS_HORZ. m_Pager.ModifyStyle(0,PGS_HORZ); // Set the button size to 15. m_Pager.SetButtonSize(15); // Determine size of child SIZE Size; m_wndToolBar.SendMessage(TB_GETMAXSIZE,0,(LPARAM)&Size); // Set the scroll area for pager. m_Pager.SetScrollArea(Size.cx+15, Size.cy+15);

>>> DOWN !!! >>>下载源代码及演示程序


 文章评论
目前没有任何评论.

↓ 快抢占第1楼,发表你的评论和意见 ↓

当前页面是本站的 百度 MIP 版本。
欲查看完整版本和发表评论请点击:完整版 »

 

程序员小辉 建站于 1997
Copyright © XiaoHui.com; 保留所有权利。