在对话框上创建子窗口成功,但不显示?
时间:2011-12-07
来源:互联网
             C/C++ code
AXCreate函数返回成功 可是界面无变化 操作也没变化 返回也是成功 怎么回事啊
            BOOL CMainForm::AXCreate(int index, CWnd *wnd, const RECT& rect) { BOOL bl = FALSE; try { LPCTSTR clsname = AfxRegisterWndClass(CS_DBLCLKS); bl=Create(clsname, _T(""), WS_CHILD | WS_VISIBLE, rect, wnd, index); if (bl==FALSE) { AfxMessageBox(_T("CMainForm!")); } else { } } catch(...) { AfxMessageBox(_T("CMainForm error!")); } return bl; } BOOL CMainForm::CreateWin(int index, CWnd *wnd, const RECT &rect) { BOOL bl = AXCreate(index, wnd, rect); //创建一个子窗口 CRect t; this->GetClientRect(&t); this->GetDC()->SetBkColor(RGB(255, 0, 0)); return TRUE; }
AXCreate函数返回成功 可是界面无变化 操作也没变化 返回也是成功 怎么回事啊
作者: wuxiao0313 发布时间: 2011-12-07
             用CreateWindow把,创建后还要updatewindow和ShowWindow            
            作者: dahaiI0 发布时间: 2011-12-07
             加上 this->ShowWindow(SW_SHOW); 也不行 
            
            作者: wuxiao0313 发布时间: 2011-12-07
             没这样用过。            
            作者: foxriver_gjg1989 发布时间: 2011-12-07
             我的也是啊 用的是Creat创建的子窗口 也木有显示            
            作者: haoruifly 发布时间: 2011-12-07
             看看你创建的窗口大小,会不会把坐标写错了,四个点全在一个点上,所以没显示。            
            作者: zero_226 发布时间: 2011-12-07
 相关阅读 更多  
      
    热门阅读
-  
 office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
          阅读:74
 -  
 如何安装mysql8.0
          阅读:31
 -  
 Word快速设置标题样式步骤详解
          阅读:28
 -  
 20+道必知必会的Vue面试题(附答案解析)
          阅读:37
 -  
 HTML如何制作表单
          阅读:22
 -  
 百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
          阅读:31
 -  
 ET文件格式和XLS格式文件之间如何转化?
          阅读:24
 -  
 react和vue的区别及优缺点是什么
          阅读:121
 -  
 支付宝人脸识别如何关闭?
          阅读:21
 -  
 腾讯微云怎么修改照片或视频备份路径?
          阅读:28
 















