Parker Prindle
Parker Prindle

Reputation: 19

Any way to minimize a specific window using c++?

I want to minimize a specific window, say Discord for example. Would this be achievable easily, or would it be a large hassle? I am on Windows 10.

Upvotes: 0

Views: 662

Answers (1)

Mark Ransom
Mark Ransom

Reputation: 308101

If you have the window handle, such as from FindWindow(), you can use PostMessage to send it a WM_SYSCOMMAND message with an wParam of SC_MINIMIZE.

Upvotes: 6

Related Questions