HWND hWndActive = ::GetForegroundWindow();
// 다이얼로그 최상위로 올리고 활성화 시키기
if(this->m_hWnd != hWndActive && hWndActive != NULL)
{
DWORD dwThreadPID;
DWORD dwCurrentThreadID;
dwThreadPID = GetWindowThreadProcessId(hWndActive, NULL);
dwCurrentThreadID = GetCurrentThreadId();
if(dwThreadPID != dwCurrentThreadID)
{
if(AttachThreadInput(dwCurrentThreadID, dwThreadPID, TRUE))
{
BringWindowToTop();
AttachThreadInput(dwCurrentThreadID, dwThreadPID, FALSE);
}
}
}