为ActiveX控件添加对话框
2015-07-05 18:42
253 查看
1
在资源rc中 添加对话框
并向对话框上拖放一个按钮
对话框的属性做下修改:Border改为None,Control改为Ture,Style改为Child,System改为False,Visible改为True,然后在对话框中双击,为对话
框添加一个类(将会自动打开类精灵)
2
在Ctrl.h中
在资源rc中 添加对话框
并向对话框上拖放一个按钮
对话框的属性做下修改:Border改为None,Control改为Ture,Style改为Child,System改为False,Visible改为True,然后在对话框中双击,为对话
框添加一个类(将会自动打开类精灵)
2
在Ctrl.h中
public: ViewDlg m_dlg; //自定义的对话框3
int CclockCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (COleControl::OnCreate(lpCreateStruct) == -1) return -1; // TODO: Add your specialized creation code here this->SetTimer(1,100,NULL); this->m_BackColor=RGB(255,100,100); this->m_ForeColor=RGB(55,55,0); COLORREF color=this->TranslateColor(this->GetBackColor()); this->m_dlg.Create(IDD_DIALOG1,this);<span style="white-space:pre"> </span>//创建了对话框 上边的几行代码与本主题无关 return 0; }
void CclockCtrl::OnSize(UINT nType, int cx, int cy) { COleControl::OnSize(nType, cx, cy); // TODO: Add your message handler code here CRect rect; this->GetClientRect(rect); this->m_dlg.MoveWindow(rect); }
相关文章推荐
- epoll示例
- centos中安装DNS可能遇到的问题
- poj 2660 War on Weather 计算几何
- android 相对布局属性
- python httplib2应用get post
- 【java】单例模式涉及的多线程问题
- 谈谈你对流行框架的理解(
- CentOS下安装福昕PDF软件
- 高斯消元法
- 忘记root密码的解决方案
- CENTOS install summary
- Swift学习资料汇总
- Ubuntu运行myeclipse××××.run文件失效!!!
- CXF整合Spring配置文件
- PowerPoint中制造超炫回旋文字收获
- thinkphp-----1
- 【Go】http server 性能测试
- 中国电信大数据:打造数据综合平台能力
- 分离式LAMP平台构建
- 如何在ppt中剔除图片的背景