Wrox Programmer Forums
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 26th, 2006, 04:23 PM
Authorized User
 
Join Date: Mar 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aehb
Default icon on system tray

I make a program using Visual C++ 6,

I put an icon on the system tray using Shell_NotifyIcon(),

I register a callback message using RegisterWindowMessage() to notify when the icon gets clicked,

but when I click the icon nothing happens and the message handler does not execute

 
Old May 27th, 2006, 01:41 PM
Authorized User
 
Join Date: Mar 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aehb
Default

I think the problem exists in the definition of the custom callback message, I need to know exactly how can I make it, thanks a lot

 
Old May 28th, 2006, 01:46 PM
Authorized User
 
Join Date: Mar 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aehb
Default

Problem solved!
I used ON_MESSAGE instead of ON_REGISTERED_MESSAGE so that I don't need RegisterWindowMessage()

with ON_MESSAGE I used #define MYWM_MESSAGE 33000 and this doesn't work, instead I used const UINT MYWM_MESSAGE = 33000






Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Notifications from Icon in System Tray bmains General .NET 0 October 3rd, 2006 09:35 PM
System Tray Icon in VB.net Application palindrome_nitin .NET Framework 1.x 0 July 25th, 2006 05:49 AM
system tray icon spoboyle Apache Tomcat 1 June 9th, 2004 10:29 AM
Contextmenu for a tray icon problem? koolvbnet1 VB How-To 0 March 17th, 2004 12:27 PM
Windows NT service and Icon in the System Tray Dmitriy Pro VB 6 4 August 27th, 2003 01:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.