How to let the windows show top most?
-
It needs to let the current process create a copy of process and then exit current process. I try to use the SetWindowPos(m_hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE) to set windows topmost, when first showup. So I kill the process in the taskmgr.exe and it will notify process to show a modal dialog to let user click, when click and then current process will create new process of itself and then exit current process. So a new process will showup, but I am amazing that why the topmost window is the taskmgr. But if I click the shortcut of this application, and it will show on the topmost. I donot know where is the difference between these ways.
-
It needs to let the current process create a copy of process and then exit current process. I try to use the SetWindowPos(m_hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE) to set windows topmost, when first showup. So I kill the process in the taskmgr.exe and it will notify process to show a modal dialog to let user click, when click and then current process will create new process of itself and then exit current process. So a new process will showup, but I am amazing that why the topmost window is the taskmgr. But if I click the shortcut of this application, and it will show on the topmost. I donot know where is the difference between these ways.
Your question doesn't really make sense (maybe because English is not your first language)... what are you trying to accomplish? Try to elaborate on what it is you're trying to have the user experience. SetWindowPos() simply shifts the window at that time, not forever.