Hi,
I got the following problem:
Like the pocket pc memory management application I want to activate a
program from my application. I wrote some kind of task manager app
which works fine so far. I get all running processes, their handles,
pids and the main window handles as well.
Theoretically that's all I need to activate a process. I tried
- BringWindowToTop(hwnd);
- SetForegroundWindow(hwnd);
- ShowWindow(hwnd, SW_SHOW); (and SW_SHOWNORMAL aso)
- SetActiveWindow(hwnd);
Sometimes it works, e.g. if my app is running and I start e.g. the
media player, then switch back to my app, select media player task and
activate, evth. works. If I press the X button of media player then
the same procedure does not work.
Am I missing something here? Anybody knows how to activate a process?
Thanks,
Chris
|