Click to See Complete Forum and Search --> : activate a window from background


albusorin
December 8th, 2005, 04:04 AM
Hello,
I made an application for POCKET PC (i use Embedded VC), who from time to time, must be shown on top. I know the CWnd, and HWND of the window. I tried:
::ShowWindow(theApp.m_pActiveWnd->m_hWnd, SW_SHOW);
::BringWindowToTop(theApp.m_pActiveWnd->m_hWnd);
but nothing's happening. How is done the Activate from Setings/System/Memory/Running Programs?

Thanks in advanced!

albusorin
December 8th, 2005, 08:46 AM
Hello again!

The answer is 42 :D

One possible smart move is to use something like this:

::SetForegroundWindow ((HWND)(((DWORD)someDial->m_hWnd) | 0x01));

Bye, bye now