Qt question to fullscreen flash application - c++

I am using Qt to develop an application and inside we have access to select flash streaming videos like youtube. Is there a way to programmaticly full screen the flash application without requiring interaction from the user?
I am using a "QWebView" control.

try calling showFullScreen for the window where your QWebView control is hosted.
void QWidget::showFullScreen ()
Shows the widget in full-screen
mode.
Calling this function only affects
windows.
To return from full-screen mode, call
showNormal().

I would say: locate the button for the fullscreen application on the page, and send a click using QEVent. Tricky, but might work.
If the button is inside the flash application, you will have difficulties to locate it but if you succeed, you can probably send the click to the flash application area.

You can always inject javascript from Qt into your QWebPage. If there is a javascript API for forcing the flash viewer to full screen, I do not know.

Related

What is a native window in Chromium?

In How Chromium Displays Web Pages, it says,
The select boxes must be rendered using a native window so that they can appear above everything else, and pop out of the frame if necessary.
What is a native window in this context? Conversely, what are non native windows?
Some of the technical information in How Chromium Displays Web Pages is outdated, yes. I don't see any reason that would matter in this context, though.

CEF closing/resizing issues inside a big application plugin

I'm writing a plugin for a big x64 application in C++. I want the plugin to open a dialog and show a web view of my site.
I'm been able to use WKWebView in macOS and it works well. On Windows I'm evaluating CEF https://bitbucket.org/chromiumembedded/cef (please let me know of any alternative, ideally I would like it to be Webkit-based).
Let's say the application framework that is hosting my plugin has already created a window for my plugin and has it's own message loop, so I can only receive events in a sort of WindowProc. I can also get the HWND of the window.
My implementation is inspired by cefsimple example, because cefclient is way too complicated. I've implemented the subprocess architecture with the external executable and everything works fine until it's rendering the client area of the window. Then I have problems with closing the window (it crashes) and resizing the window interactively (the window frame is resized but the web view in the client area does not resize).
I've tried all possible combinations, but I've run out of ideas. Namely:
If I use CefRunMessageLoop() the web view is rendered correctly but the main application does not process the UI events like close window button. Resize does not work.
If I call CefDoMessageLoopWork() myself once in a while (from WindowProc) the web view is rendered correctly and it processes the close button, but it crashes. Resize does not work.
If I use settings.multi_threaded_message_loop = true the web view is rendered correctly and I can close the window without crash. The destructor of the window calls CefShutdown(). But if I try to reopen the window it crashes! Are CefInitialize and CefShutdown allowed to be called only once?
And resizing still does not work. I don't understand why in the cefsimple example resizing works and in my window it does not work.
Besides message processing issues, probably I'm not closing the browser correctly, any advice? Why is so complicated? WKWebView is so straighforward!
There is no error message, no stack trace, no source code, no OS/CEF version - I doubt this question can be answered.
I can only tell you how to close browser cleanly: call CefShutdown at the right time (see cefclient/cefsimple examples) and do not keep any references to CEF objects when calling shutdown.

Getting a control position of a Java GUI application

Having a Java GUI application, I need to get the location of one of its buttons, so I'll be able to simulate a mouse click.
What is the most straightforward way of doing this from a C++/WinAPI application?
I need to embed this solution into a downloadable application, so preferably it should not require using a multimegabyte library.
For example, having an app similar to this (screenshot from Wikipedia):
How can I get the RECT of the button?

control monitor for application via C++

I have an application that opens up IE browser windows at certain intervals throughout the day. I would like to control the monitor that the browser window opens up to (for example browser1 opens on monitor1 and browser2 on monitor2 and browser3 on monitor1 and browser4 on monitor2). Is there a way using C++ (app is written in C++) to control the monitor that I open the browser window on?
There are various third-party utilities that will allow a user to control this, but programatically you would have to use something like GetMonitorInfo / MoveWindow to position IE after launching it.
An alternative would be to embed an IE control in a dialog or window of your choosing which you would then have complete control over.

How does the draggable crosshair in Process Explorer work?

There is a feature in Sysinternal's Process Explorer that allows a crosshair to be dragged from the application to a control in any other application you are running and highlights said control.
Does anyone know how this was achieved or if there is a .NET/C++ library out there that can be reused?
Using Win32 API
GetCursorPos: to get the cursor position (maybe .NET has its own function to do that)
WindowFromPoint: to get the handle of the window from a specific point in the screen
more info