Force windows 10 tray icons to be visible [duplicate] - c++

This question already has answers here:
Force Windows to show a system tray icon
(5 answers)
How to always show program tray icons in Windows by *default*?
(3 answers)
Set tray icon to always show
(5 answers)
Closed 2 years ago.
I have an issue with a software I wrote (Delphi) that is minimized to Windows 10 tray icon locations. There are two possible locations, one at the end of arrow #1 and another into arrow #2.
When a new application is installed, by default when minimized (and code written to take care of this), it goes to location #2 by default, and some user are confused and thinks the software has crashed (because this is hidden). My question is simple, is there a piece of code that forcefully put the minimized app icon into location #1 directly without any action from the user ?
C++ code is OK, or Delphi would be very nice.

Related

How can I color behind text in the console application? [duplicate]

This question already has answers here:
How to change text or background color in a Windows console application
(3 answers)
Closed 2 years ago.
How can I color behind text in a Windows 10 console application? (you can look at the picture as an example)
Use WriteConsoleOutput, see this for details: https://learn.microsoft.com/en-us/windows/console/writeconsoleoutput

Thumbnail for running application on Windows [duplicate]

This question already has answers here:
How does Windows 7 show the thumbnails of application in taskbar?
(2 answers)
Closed 5 years ago.
Is there any Win32 API that provides the thumbnail to a specific application running on Windows? I notice Window captures these thumbnails when we hover the mouse over the taskbar but is this exposed to developers?
I'm coding in C++ and expect the API in C++.
These "thumbnails" are parts of Windows itself and cannot be modified.

Console application freezes until key pressed / mouse clicked [duplicate]

This question already has answers here:
How and why does QuickEdit mode in Command Prompt freeze applications?
(2 answers)
Closed 4 years ago.
Sometimes it works great, but usually after i started application (after log)- nothing happen. Just after i press key- consumers start to work (that's not displaying problem, because there are messages in queues and they are not going to be free before i press keyboard key).
At this demonstration i started current service. It took some messages and went to sleep. After that i sent more messages (using Web API application), but nothing happen in service. Just after i pressed key in service console window it woke up.
I've just unchecked the Property > Options > Edit Options > QuickEdit Mode checkbox.
Possible duplicate answer: How and why does QuickEdit mode in Command Prompt freeze applications?

Detect middle mouse click event [duplicate]

This question already has an answer here:
How to get middlemouse click event in C++
(1 answer)
Closed 9 years ago.
I need to detect a middle mouse click event in C++. Does anyone know how I can do so? If there is a way, can someone tell me how I can do it? I'm not so familiar with mouse events in C++. Seems a bit more complicated to do it in C++ as oppose to Java.
Since you are working on windows the following may work for you:
If your application contains a window, then simply look for WM_MBUTTONDOWN in your message loop.
If you dont have a window, then you can use a mouse hook.
Where you check the wParam for WM_MBUTTONDOWN(or WM_BUTTONUP).

Hide window in MFC C++ [duplicate]

This question already has answers here:
Hide an MFC dialog window
(6 answers)
Closed 9 years ago.
I have an MFC C++ app, I need my app to run in background, to do run some functions.
So I want to disable the dialog window .In other words I am trying to hide/make it invisible to the user.
How could I do this ? I don't have much experience with MFC, I would really appreciate the help.
Bye.
You need to hide the mainframe using ShowWindow(SW_HIDE).
Refer ShowWindow.