wtl 中如何动态生成控件 想动态生成n个 button,如何实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 template<typename Tbase>class CNormalCtrlImpl : public CWindowImpl<CNormalCtrlImpl, Tbase>{public: BEGIN_MSG_MAP(CNormalCtrlImpl) END_MSG_MAP()};CNormalCtrlImpl<CButton> *lpButton = new CNormalCtrlImpl<CButton>(); lpButton->Create(hParentWnd,rc,NULL,WS_CHILD|WS_VISIBLE|BS_CHECKBOX|WS_TABSTOP,0,id); lpButton->SetCheck(FALSE); if(po->hasProperty("CheckStatus")) { if(stricmp(po->GetProperty("CheckStatus").c_str(),"TRUE") == 0) lpButton->SetCheck(TRUE); } lpWnd = (CWindowImplRoot<CWindow>*)lpButton; CButton *pWindow; pWindow=new CButton(); pWindow->Create(m_hWnd, m_Rect, NULL,WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_BITMAP|WS_TABSTOP,0,m_nChkButtonCounter1++); 每次循环时,都计算一下m_Rect,m_nChkButtonCounter1是创建Button的ID。 实现百叶窗 在窗体左侧实现单击按钮 上下移动 在客户区上画图的问题 BCG的风格对对话框没有效果 出差散分 如何将LISTCTRL中的内容导出到文本文件中? 交换机的问题。 重分求救....各位大侠:怎样由已有的真彩色图象数据生成新的图象文件? ☆☆☆☆☆☆一个问题☆☆☆☆☆☆☆ VC怎么访问一个DLL 关于线程退不出去的问题 VC中如何使用ADO ADODC和datagrid实现数据的分页显示 DCOM配置问题
class CNormalCtrlImpl : public CWindowImpl<CNormalCtrlImpl, Tbase>
{
public:
BEGIN_MSG_MAP(CNormalCtrlImpl)
END_MSG_MAP()
};CNormalCtrlImpl<CButton> *lpButton = new CNormalCtrlImpl<CButton>();
lpButton->Create(hParentWnd,rc,NULL,WS_CHILD|WS_VISIBLE|BS_CHECKBOX|WS_TABSTOP,0,id);
lpButton->SetCheck(FALSE);
if(po->hasProperty("CheckStatus"))
{
if(stricmp(po->GetProperty("CheckStatus").c_str(),"TRUE") == 0)
lpButton->SetCheck(TRUE);
}
lpWnd = (CWindowImplRoot<CWindow>*)lpButton;
CButton *pWindow;
pWindow=new CButton();
pWindow->Create(m_hWnd, m_Rect, NULL,WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_BITMAP|WS_TABSTOP,0,m_nChkButtonCounter1++);