Get path of a given Finder window on MacOS programmatically - c++

When the mouse cursor moves from my application's window over any Finder window that may be open, how do I get in my application the current folder which is opened in that Finder window?
My application runs on both Windows and MacOS, but I have only found an answer on Stack Overflow for the Windows case, and don't know how to achieve this for Mac as well.

Related

SFML window application remove console

For an application, while I make the final application, How could I remove the terminal window for the final application on MacOS or Linux.
I find the key point, that is in macos we should build a app file, which should consist of Resources folder、MACOS、PkgInfo、Info.plist files, then when I just click the packaged file, the application could just show the GUI window.

How to programmatically get current directory of a Windows command line or Windows explorer?

I'm writing a Qt C++ program on Windows and it has registered a global shortcut Ctrl+j. Whenever the user press Ctrl+j, the program's UI will show up. When the active window is a Windows command line or a Windows explorer and the user presses Ctrl+j, I want to get the current directory of the Windows command line or a Windows explorer. Is that possible?
For Windows Explorer you can write a BHO and communicate with it from your application. BHO - Browser Helper Object - will load into Windows Explorer process and can access anything, e.g. windows handles, text in the textboxes etc. We've done this for Internet Explorer.

Qt windowflags in Linux

Image of the main application and child application
Im using Linux Ubuntu 16.04 and Qt Application
I have a problem about a windowflags in qt, that when I enter in full screen mode, my application model bar and menu bar hides since my application opens 2 application.
So I decided to make another application to Qt::FramelessWindowhint in order the other application cannot be open and only the main application will be shown.
My problem is when I dragged the application to another monitor, the 2nd application will hide.
Can anyone help me about this problem?

How to make program focused on .exe click when it's opened?

Some Windows applications like for example Sublime Text 3 get focus on their window when they are opened and you click the .exe file. The thing I'm aiming for is taking focus from any opened app that way. I use Qt5 and C++ for my program. The key thing is that app should not only have one instance at a time but it should focus on instance that already exists when you double click .exe file

How to launch a mac application without a terminal window

I've written an open-source c++ application and it works fine on Windows and Linux, I finally got a Mac Mini (with 10.5.8) so I've just been testing the Mac version.
My application works fine when running it from inside a terminal window and typing ./appname , but if instead I double click on it from the finder, then it opens a termnial window first and then runs my app but it doesn't seem to set the working directory to the correct location so my app dies.
How do I make my app so when it launches by being double clicked on it doesn't open a terminal window first and how can I have the current directory set to the apps location automatically?
Mac binaries are set to be opened with the 'Terminal' program; there's no way around that, except by making a full application package, or have another program launch it via system or something like that.
When double-clicking on a binary, the terminal window opens with ~ as the current directory. I suggest you use chdir(2) in your program to ensure it is running in the right directory if you need it in the first place.