如何在MFC中调用Winform窗体,并使窗体具备命令传送能力
答案:1 悬赏:50
解决时间 2021-02-21 20:06
- 提问者网友:末路
- 2021-02-21 09:24
如何在MFC中调用Winform窗体,并使窗体具备命令传送能力
最佳答案
- 二级知识专家网友:思契十里
- 2021-02-21 10:26
动态添加控件,自己要操作的就是new一个控件出来,然后this.controls.add(控件)方法添加进去,利用Location属性确定其起始位置,用size属性确定其大小,附代码双击鼠标添加testbox
private void from1_DoubleClick(object sender, EventArgs e)
{
TextBox mytestbox = new TextBox();
mytestbox.Location = PointToClient(MousePosition);
mytestbox.Size = new Size(100,50); //自己调整
this.Controls.Add(mytestbox); //添加,添到哪里自己调整
}
private void from1_DoubleClick(object sender, EventArgs e)
{
TextBox mytestbox = new TextBox();
mytestbox.Location = PointToClient(MousePosition);
mytestbox.Size = new Size(100,50); //自己调整
this.Controls.Add(mytestbox); //添加,添到哪里自己调整
}
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯