15,471
社区成员
发帖
与我相关
我的任务
分享
CWnd* win = CWnd::FromHandle(hwnd);//反正得到自己窗口的指针,随你用什么方法
win->ModifyStyle( WS_CAPTION | WS_THICKFRAME, 0);
win->SetParent(this);//设置父亲为窗口1
CWnd* local = 用方法获得窗口1里面IDC_WIN控件的指针;
CRect rect;
local->GetClientRect(&rect);
CPoint pt = rect.TopLeft();
local->ClientToScreen(&pt);
ScreenToClient(&pt);
win->SetWindowPos(NULL, pt.x, pt.y, rect.Width(), rect.Height(), 0);