Show window when minimized

I am trying to create a window that shows itself when minimized.
I tried this in WndProc.

if(IsIconic(hwnd)!=0){ShowWindow(hwnd, SW_RESTORE);}

The expression seams to work but The window won't pop up. How can I fix this?
Where are you putting that code in? How do you run that piece of code?
What is your purpose of making this? SW_SHOW might work.
Topic archived. No new replies allowed.