Can't bring to top a specific "Microsoft Word" window
-
Hi everyoone, I made a function that bring any window of any application to top. But I have a issue with the Microsoft Word application. When I have many Word application running and I want one of them (specific) on the top of the Z-order, it's allways the same instance of word that come on top. I looked their window handle and there all different. Example : (doc1) (doc2) (doc3) If I want doc3, it's doc1 that will prompted on top. A Work around is that if a press the alt key after the issue operation, the right instance of word come on top of the Z-Order. Some of functions that I tryed to do that operation:
::SetActiveWindow( oSelectedApp.GetWindow() ); ::SetForegroundWindow( oSelectedApp.GetWindow() ); ::ShowWindow( oSelectedApp.GetWindow(), SW_SHOW ); ::SetWindowPos( oSelectedApp.GetWindow(), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW );
I seen this problem only for Microsoft Word application. Sébastien Nadeau Software Developper -
Hi everyoone, I made a function that bring any window of any application to top. But I have a issue with the Microsoft Word application. When I have many Word application running and I want one of them (specific) on the top of the Z-order, it's allways the same instance of word that come on top. I looked their window handle and there all different. Example : (doc1) (doc2) (doc3) If I want doc3, it's doc1 that will prompted on top. A Work around is that if a press the alt key after the issue operation, the right instance of word come on top of the Z-Order. Some of functions that I tryed to do that operation:
::SetActiveWindow( oSelectedApp.GetWindow() ); ::SetForegroundWindow( oSelectedApp.GetWindow() ); ::ShowWindow( oSelectedApp.GetWindow(), SW_SHOW ); ::SetWindowPos( oSelectedApp.GetWindow(), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW );
I seen this problem only for Microsoft Word application. Sébastien Nadeau Software Developper