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.
Related
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
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.
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.
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).
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Redirecting cout to a console in windows
I've created a child richedit window with CreateWindow and I wonder is it possible to redirect all cout calls so text would appear in RichEdit controll instead of console ?
As far as I know, you can't do that. You need to send window messages to set the text in the control.
That's not to say you can't use stream syntax. You could define your own ostream and use that instead of cout, then pass bytes into your window. It wouldn't help with any output that you don't generate, nor would it help if you mix printf calls (which you shouldn't really do).