Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MFC: system tray

54 views
Skip to first unread message

Man-wai Chang ToDie (33.6k)

unread,
Sep 15, 2008, 3:39:46 AM9/15/08
to

Is there a MFC way of making a dialog app to have a tray icon?
I am talking about VS2008 here.

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.5
^ ^ 15:37:01 up 6 days 27 min 3 users load average: 1.03 1.02 1.00
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/

Giovanni Dicanio

unread,
Sep 15, 2008, 4:01:59 AM9/15/08
to

"Man-wai Chang ToDie (33.6k)" <toylet...@gmail.com> ha scritto nel
messaggio news:%23klzVYw...@TK2MSFTNGP05.phx.gbl...

>
> Is there a MFC way of making a dialog app to have a tray icon?
> I am talking about VS2008 here.

You may find PJ's CTrayNotifyIcon to be useful:

http://www.naughter.com/ntray.html

HTH,
Giovanni


Man-wai Chang ToDie (33.6k)

unread,
Sep 15, 2008, 7:29:38 AM9/15/08
to
>> Is there a MFC way of making a dialog app to have a tray icon?
> You may find PJ's CTrayNotifyIcon to be useful:
>
> http://www.naughter.com/ntray.html

I was expecting something more trivial, like dropping a control into the
dialog class....


--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.5

^ ^ 19:28:01 up 6 days 4:18 3 users load average: 1.02 1.01 1.00

Giovanni Dicanio

unread,
Sep 15, 2008, 9:29:14 AM9/15/08
to

"Man-wai Chang ToDie (33.6k)" <toylet...@gmail.com> ha scritto nel
messaggio news:%

> I was expecting something more trivial, like dropping a control into the
> dialog class....

Sorry, MFC is not Visual Basic RAD style.

If you want a drag-and-drop RAD (Rapid Application Development) style, you
may consider WinForm (from .NET platform), and writing C++/CLI code.

C++/CLI are extensions to C++, to allow using C++ with the rich .NET
framework.

Giovanni


AliR (VC++ MVP)

unread,
Sep 15, 2008, 11:09:44 AM9/15/08
to
Or just do C# or VB.Net

AliR.

"Giovanni Dicanio" <giovanniD...@REMOVEMEgmail.com> wrote in message
news:%23wvXHdz...@TK2MSFTNGP03.phx.gbl...

Giovanni Dicanio

unread,
Sep 15, 2008, 12:15:35 PM9/15/08
to

"AliR (VC++ MVP)" <Al...@online.nospam> ha scritto nel messaggio
news:7Vuzk.506$yr3...@nlpi068.nbdc.sbc.com...

> Or just do C# or VB.Net

Yes, if the OP is going to start a new project without C++ legacy code I
agree with you.

Giovanni


Man-wai Chang ToDie (33.6k)

unread,
Sep 15, 2008, 10:59:03 PM9/15/08
to
> Yes, if the OP is going to start a new project without C++ legacy code I
> agree with you.

C# and VB.Net are as mature as Foxpro, aren't they?

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.5

^ ^ 10:57:01 up 6 days 19:47 3 users load average: 1.00 1.03 2.38

Giovanni Dicanio

unread,
Sep 16, 2008, 3:58:20 AM9/16/08
to

"Man-wai Chang ToDie (33.6k)" <toylet...@gmail.com> ha scritto nel
messaggio news:OqzTHg6F...@TK2MSFTNGP03.phx.gbl...

>> Yes, if the OP is going to start a new project without C++ legacy code I
>> agree with you.
>
> C# and VB.Net are as mature as Foxpro, aren't they?

I don't know about "Foxpro", sorry.

However, C# and VB.Net are quality languages that you can use to build
business applications.
It seems that a report by Forrester Research stated that VB.Net is the #1
.NET language:

http://www.panopticoncentral.net/archive/2007/11/01/22453.aspx

IMHO, there is no one single "best of all" language; each programming
language has pros and cons, and you should choose carefully what language to
use for the particular problem you are going to solve (e.g. if you want to
build a shell extension, you should use C++; if you want a rapid RAD-style
GUI designing approach, you should use WinForm with VB.Net or C#, etc.)

Note that you can wrap existing C++ code using C++/CLI, and export this C++
code to the .NET platform, and call this code from C# or VB.Net.
Multi-language development is not uncommon on .NET platform, thanks to CLR
(Common Language Runtime).
Multi-language development was also possible before .NET, thanks to COM;
e.g. you could wrap C++ code in COM components, and use them from "classic"
(i.e. non-.NET) Visual Basic (which could be used to build GUIs very quickly
thanks to its RAD style).

HTH,
Giovanni


Man-wai Chang ToDie (33.6k)

unread,
Sep 16, 2008, 4:55:07 AM9/16/08
to
> Note that you can wrap existing C++ code using C++/CLI, and export this C++
> code to the .NET platform, and call this code from C# or VB.Net.
> Multi-language development is not uncommon on .NET platform, thanks to CLR
> (Common Language Runtime).

C++ is not suitable for rapid application deployment. It would be a
total mess as you move resources around and changing functions....I
doubt anyone would use it in ERP ....

In case there are some C++ ERP system, what are they? SAP?

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.5

^ ^ 16:52:01 up 7 days 1:42 3 users load average: 1.12 1.04 1.01

Joseph M. Newcomer

unread,
Sep 17, 2008, 9:58:55 AM9/17/08
to
Depends on how facile you are with the system and how many twiddly features you want.

I once rewrote a very fancy VB app in raw Win32 C in three weeks (the previous implementor
had spent a year on it!) All that was missing was buttons that changed from red to green
(we added that later after we made the deadline).

RAD is a methodology, not a feature of a specific language. I can do RAD in MFC quite
well.

Arguments based on C++/C#/VB comparisons are always suspect. I like C#, I just don't have
a paying client base that cares in the slightest. Besides, moving resources around is a
pretty trivial activity, not nearly as critical as the code that actually solves the
problem at hand.
joe

On Tue, 16 Sep 2008 16:55:07 +0800, "Man-wai Chang ToDie (33.6k)"
<toylet...@gmail.com> wrote:

>> Note that you can wrap existing C++ code using C++/CLI, and export this C++
>> code to the .NET platform, and call this code from C# or VB.Net.
>> Multi-language development is not uncommon on .NET platform, thanks to CLR
>> (Common Language Runtime).
>
>C++ is not suitable for rapid application deployment. It would be a
>total mess as you move resources around and changing functions....I
>doubt anyone would use it in ERP ....
>
>In case there are some C++ ERP system, what are they? SAP?

Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0 new messages