SetWindowPosition second parameter is hWndInsertAfter which means behind. How do I place a window in front of another (above)?
SetWindowPosition second parameter is hWndInsertAfter which means behind. How do I place a window
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about you call SetWindowPos again, swapping the hwnd parameters (so your original window is now the hWndInsertAfter, and the initial hWndInsertAfter is now the hWnd you’re moving), and passing in the SWP_NOMOVE flag?
Edit: And if the exact position in the Z-order doesn’t matter and you just want it in front, don’t forget about SetForegroundWindow.