浙林龙哥

   :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
竟然可以先在Dialog中画一个Group Box用于定位,程序运行起来后把它的位置信息放到rect中,就把它销毁了!
再后来,动态地创建了一个IE控件,位置呢就用rect。代码:











LRESULT CAboutDlg::OnInitDialog(...) { CWindow wndPlaceholder = GetDlgItem ( IDC_IE_PLACEHOLDER ); CRect rc; CAxWindow wndIE; // Get the rect of the placeholder group box, then destroy // that window because we don't need it anymore. wndPlaceholder.GetWindowRect ( rc ); ScreenToClient ( rc ); wndPlaceholder.DestroyWindow(); // Create the AX host window. wndIE.Create ( *this, rc, _T(""), WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN );
posted on 2004-09-24 19:13  浙林龙哥  阅读(1443)  评论(0编辑  收藏  举报