Click here to Skip to main content
15,922,315 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I want to process the WM_MINIMIZE msg, because I need to satisfy such a situation as follow.
If user click the "minimize" button,I hide it to the startup bar.If the user click the icon on the startup bar, I display it as usual.
Posted
Updated 15-Jun-11 22:48pm
v4
Comments
Sergey Alexandrovich Kryukov 15-Jun-11 23:05pm    
What do your mean "get"?!
--SA
Resmi Anna 15-Jun-11 23:29pm    
the qstn is not that clear.are you trying to process the WM_CLOSE message of console window.That means your application is trying to get the WM_CLOSE message of some other application window, which is not of yours...I am rt??

Probably it isn't a good idea, have a look at the following discussion "Message handling in a console app"[^].
 
Share this answer
 
Comments
mengfei929 16-Jun-11 21:27pm    
Thankyou, I will change it with windows app instead.
CPallini 17-Jun-11 2:56am    
You are welcome.
mengfei929,

I've done this in the past using the PeekMessage function.. Here's an article that touches on the subject: Adding Windows To Your Console Application[^]

Hopefully, this will help..
 
Share this answer
 
Comments
mengfei929 15-Jun-11 23:49pm    
thankyou!,but i found that's not i needed.
The question is not completely clear, so sorry if I'm addressing a wrong problem…

This is not a Windowed application. When a windows is closed, it's already too late.
Instead, you can intercept Ctrl+C in your console application to perform post-mortal actions such as proper clean-up.

See http://stackoverflow.com/questions/1641182/how-can-i-catch-a-ctrl-c-event-c[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900