65,187
社区成员




HWND hwnd = ::FindWindow(_T("NotePad"), _T("无标题 - 记事本")); //同理其他窗口
if (hwnd)
{
LONG style = ::GetWindowLong(hwnd, GWL_STYLE);
style &= ~WS_CAPTION;
style &= ~WS_CLIPSIBLINGS;
style |= WS_CHILD;
::SetWindowLong(hwnd, GWL_STYLE, style);
CRect rc;
GetClientRect(rc);
//rc.bottom -= 60;
//ClientToScreen(&rc);
::SetParent(hwnd, m_hWnd);
::SetWindowPos(hwnd, HWND_TOP, rc.left, rc.top, rc.Width(), rc.Height(), SWP_SHOWWINDOW | SWP_FRAMECHANGED);
//::BringWindowToTop(hwnd);
}