好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

动态创建ActiveX控件

动态创建ActiveX控件

 竟然可以先在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 );

查看更多关于动态创建ActiveX控件的详细内容...

  阅读:51次

上一篇: 使用CImageList

下一篇:ATL接口映射宏详解