Jump to content
Tuts 4 You

Hiding window state from itself


Recommended Posts

I'm running multiple instances of a gui application at once to dump a list each application maintains in form of a ListControl. I would like the windows to stay minimized but unfortunately they stop updating the ListControl then. I thought if the application doesn't know it's minimized it should keep behaving like it's not. After a bit of research i found that basically the only way to determine if a window is minimized is calling IsIconic or handle WM_SYSCOMMAND and remember till the window is restored. But the application does neither. Then i thought maybe the list is only updated internally (which is the only thing that matters, I don't have to see it) when WM_PAINT message is sent. Therefore the process doesn't know about it's window state. But posting WM_PAINT messages didn't help either. I'm pretty sure my thoughts have a logical flaw, but right now I can't see it, could you help me out?

Edited by brain
Link to comment

I figured it out myself. Main mistake was: The parent window was a Dialog control which tricks Ollys "execute till usercode" feature. It should have made me more suspicous to have no usercode callback at all for the main window. So I found the WndProc, there was a case switch, I logged the case values and looked for the ones only triggered when the window is minimized or restored. Found several filtered them and got finally to the one that matters. Be aware of dialogs, dudes.

Edited by brain
  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...