读书人

怎么在view上面动态创建static控件

发布时间: 2014-06-12 16:24:12 作者: rapoo

如何在view上面动态创建static控件
CMytestView类里面第一了个
CStatic Toxin_o1;
我在构造函数里写的
CMytestView::CCMytestView()
{
RECT staticRect;
staticRect.left = 100;
staticRect.top = 100;
staticRect.bottom = 20;
staticRect.right = 150;

Toxin_o1.Create(_T("我在这里"), WS_VISIBLE|WS_CHILD|CBS_SORT|CBS_DROPDOWN, staticRect, this, 1212);
}

可是程序起来后,什么都没有


别再视图类的构造函数里面创建子控件,在OnInitUpdate()里创建

读书人网 >VC/MFC

热点推荐