Skip to main content
gamedev.net
🔒 Locked

Dialog Display

Started by Prozak 0 replies 250+ views
Original Post
Prozak
Prozak
Hi all, I''ve learned recently how to "send" my application to the system tray (not the taskbar), and what i wanted to do next is to be able to show a small dialog when the user presses the right-mouse-button on the systray ico, without using mfc code. Where can i find an example of this? thanx...!

[Hugo Ferreira][Positronic Dreams][]
"Somewhere, something incredible is waiting to be known."
- Carl Edward Sagan (1934 - 1996)

Chem0sh
Chem0sh
You need something like this in your message handler:


  
if (msg == nid.uCallbackMessage)
{
switch(lparam)
{
case WM_RBUTTONUP: //Did the user right click?

{
// pop up your dialog box here

}break;
// handle any other messages here

}
}


Where msg is the message and nid is your notify icon data structure. When you init your nid, you need to set nid.uCallbackMessage to WM_USER + SomeNumber. Windows will send you this message when some action happens on your systray icon.

Hope this helps!

/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/

[edited by - Chem0sh on May 26, 2002 6:25:10 AM]
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.