Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System Tray Icon in C++

I got a basic window made from C++. What I need to do is whenever I click the Minimize button the window will be placed in the System Tray and whenever I double click on the Icon it will restore...

like image 410
Andro Miguel M. Bondoc Avatar asked Feb 11 '11 01:02

Andro Miguel M. Bondoc


Video Answer


2 Answers

You will need to use Shell_NotifyIcon to interact with the notification area (system tray).

like image 122
tenfour Avatar answered Sep 27 '22 16:09

tenfour


check msdn about a struct: NOTIFYICONDATA and a function:

BOOL Shell_NotifyIcon( DWORD dwMessage,PNOTIFYICONDATA lpdata);


and also a demo here.

Hope you can understand:)

like image 29
Sid Zhang Avatar answered Sep 27 '22 17:09

Sid Zhang