I've got an MFC app on Windows 10 that has the maximize button disabled as it wasn't designed to be resized. If the program is run not as administrator/elevated then the user can minimize the window to the taskbar and then restore/maximize it like normal. However, if the app is run as administrator/elevated privileges then the window can be minimized to the taskbar but never restored/maximized.
Things I've tried:
- Left-clicking the icon on the taskbar - nothing happens.
- Hovering over the icon on the taskbar then hovering over the tiny preview above the icon - this shows the window but goes away as soon as you stop hovering and clicking on the small preview does nothing.
- Enabling the maximize button and setting the NoActivate property to true - doesn't help.
- Alt-tabbing to the application does not do anything.
- I've inspected the app when it has this issue using spy++ 64 and I can see the messages but I'm not sure what's wrong. See below
This is the log of the successful (non-admin) minimize then maximize where the maximize attempt happened around ID 290: https://pastebin.com/kRT4ABrC
This is the log of the unsuccessful (admin) minimize then maximize where the maximize attempt happened around ID 176: https://pastebin.com/nAiXUa8p
Anyone have any ideas what is wrong? It does look like the unsuccessful log is missing a bunch of WM_ACTIVATEAPP messages, but I'm not sure what else looks off.
"code" necessary for pastebin link posts