C++/Minimize to system tray
Expert: Eddie - 4/20/2006
QuestionHi,
Yeah so it will sit by the clock in the taskbar and wont take up a space next to all the open applications. Im not very good at explaining this sorry.
Like msn messenger for example, when u close it it shrinks to by the clock
Thank you for your fast reply
Anythign else u need to know feel free to ask
Thanks again
-------------------------
Followup To
Question -
Hi There,
I have been learnign C++ for sometime now and my latest application requires me to minimize the application to the system tray.
I am using Borland C++ and have tried to googling it and have been unsucessful so far.
Anyhelp you can give would be great
Many thanks
Gareth
Answer -
Hello Gareth, thank you for the question.
Just to make sure I understand everything correctly, you have a windowed Windows application and you want to implement the minimizing and maximizing of the application window to the taskbar. Is this correct?
- Eddie
AnswerHello Gareth, thank you for the question.
In your WndProc function, you can set up to catch you WM_SIZE event. This is sent when the window is resized. There you can use your wparam and lparam variables passed into the function. These represent the window width and height. If you do not do anything special, you can use this as the default to your swithc statement and it should handle everything accordingly:
default:
return DefWindowProc(hWnd, message, wParam, lParam);
I hope this information was helpful.
- Eddie