
Signature
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"
> <to Ray>
> As for choosing MFC, it all depends on whether you assume your customers
[quoted text clipped - 6 lines]
> broadband, so downloading the .NET runtime is no big deal if they don't
> already have it.
Hi Bruno, yes, you're right that having internet is a requirement for
them--I think it's quite safe to assume that we won't be dealing with
56k modem users (I hope!). Our app is a desktop app that won't need to
interop with native code--it's built from the ground up.
> And if you choose for .NET, you have to judge if you need a lot of interop
> with native code or not.
> If you don't, then I would personally choose for C#. It is easier to learn,
> and more user friendly.
Are there any reasons why one would choose C++ over C# if it's just for
a desktop app that's not computatively intensive, does not require 3rd
party native libraries, but need to access Windows UI functions such as
the taskbar notification and stuff? We were just assuming that it was
going to be C++ because most of us come from C++/Java background actually.
Do you feel that making a transition to C# will pay off better in the
long run in this case?
Thanks,
Ray
Carl Daniel [VC++ MVP] - 27 Aug 2006 16:51 GMT
>> <to Ray>
>> As for choosing MFC, it all depends on whether you assume your
[quoted text clipped - 25 lines]
> Do you feel that making a transition to C# will pay off better in the
> long run in this case?
I think that depends very much on your MFC/Win32 API experience. If you're
already proficient with MFC, then use it. But if you're not, the learning
curve for WinForms (.NET) is an order of magnitude faster than MFC. In .NET
1.x, winforms wasn't really "ready for prime time". lacking good support for
such basic things as toolbars. But in .NET 2.0, it's quite possible build a
nice looking, globalized, "Designed for Windows"-compliant end-user
application.
Now, as for "taskbar notifications and stuff". There's no direct support
for the shell notification area (aka taskbar tray) in winforms 2.0, but I'm
sure you can find any number of examples on the net of how to interact with
the shell notification area from a .NET application. "and stuff" is a bit
harder, as it depends a great deal on exactly which "stuff" you're
interested in. For example, if you need to implement any of the shell
extension interfaces (e.g. IShellFolder), then you'll have a very hard time
doing that from C# because there's no type library for those interfaces -
they're defined directly in C++ header files and basically unusable from any
other language. For general Win32 stuff, .NET generally either already has
a nice wrapper (e.g. for the file API), or can readily use Win32 via
P/Invoke.
Lastly, you can always choose to build a hybrid, using C#/winforms for the
bulk of the UI and C++ for the meat of the application and for building
interfaces to parts of windows that aren't already well covered in .NET.
-cd
Ray - 28 Aug 2006 01:19 GMT
>> Do you feel that making a transition to C# will pay off better in the
>> long run in this case?
>
> I think that depends very much on your MFC/Win32 API experience. If you're
> already proficient with MFC, then use it. But if you're not, the learning
<snip>
Thanks much for the very informative reply, Carl!
Regards,
Ray
> -cd
Mike C# - 28 Aug 2006 03:12 GMT
> Are there any reasons why one would choose C++ over C# if it's just for a
> desktop app that's not computatively intensive, does not require 3rd party
> native libraries, but need to access Windows UI functions such as the
> taskbar notification and stuff? We were just assuming that it was going to
> be C++ because most of us come from C++/Java background actually.
The main reasons (IMHO) for writing native C++ over C# are:
1. The target computers don't have (and won't get) .NET installed. Depends
on the hardware and corporate policies.
2. The application needs to run extremely fast - usually for
computationally intensive time-critical operations. Usually not a huge
factor for WinForms apps, although some of the functionality might need to
be tweaked. You can always interop with native code for time critical
functions.
3. The size of the executable needs to be extremely small (i.e., target
computers have very little memory). Again not usually a huge factor.
> Do you feel that making a transition to C# will pay off better in the long
> run in this case?
I have to write a lot of back-end applications in C++ (native) and C#
myself, and I find that the C# apps are much easier to maintain over the
long haul. The savings in maintenance costs and shortened development time
more than justify conversion and new development in C# in my situation.
For your customers without high-speed connections (if there are any), you
could probably snail-mail them your app. installation package on CD...
>>>What would be the best way to go forward? Should we just bite the bullet
>>>and use C++/CLI? Or MFC is the way to go?
[quoted text clipped - 12 lines]
> available with Visual Studio?
> I have never had a problem with them. (only used them since VS2003 though).
[snip]
Bruno:
You mean MSI? After avoiding .NET and keeping my deployment size down
with static linking, why would I want to bloat it up with MSI? Actually,
even an old copy of InstallShield Express was working fine for me until
it was derailed by the 64-bit OS's. Inno is a fabulous product, so much
better than anything by InstallShield or Wise. And free. Only drawback
for me is that you have to learn some Pascal.
David Wilkinson