I currently have a program that compliments a flash game. One of the features it has is to “always stay on top” and this works really well until the game is put into full screen mode. When flash enters full screen mode, the Windows taskbar disappears so the flash window can propagate the entire screen. My program stays on top like its supposed to but whenever focus is moved from the full screen flash window to my program, the windows taskbar appears.
Usually, I would just hide the taskbar all the time with a call to FindWindow("Shell_TrayWnd", ""); then ShowWindow(_taskbarHandle, 0);. This works however I want the taskbar to be showing when the flash window isn’t in full screen mode and my program is focused. I’ve thought of trying to obtain a handle of the window, but with different browsers comes different class names.
Does anyone have, or can think of, a reliable method for determining if a flash window is running in full screen?
I’ve thought of polling GetActiveWindow every few seconds to obtain the currently active window handle but I still have no way of determining if its a flash window!
Is there a way to iterate through all the open windows and see if one has the width and height of the screen?
You can iterate through open windows using the
EnumWindowsfunction.Alternatively, you could use
WindowFromPointto determine if there’s a window at 0,0 and X-1,Y-1 (where X and Y are the width and height of the screen), and if so, if they’re the same window.One other thing you could try, and I don’t know if this will work or not, is to use the
WS_EX_TOOLWINDOWextended window style for your custom window. This will stop your window from appearing on the taskbar, and doing that may prevent the taskbar from coming to the front in the first place.