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

WPF

2 views
Skip to first unread message

Kid

unread,
Nov 17, 2008, 2:34:00 AM11/17/08
to
Hi

Is WPF popular now , can VC and MFC write a WPF program ?

If I want to study WPF , is there some good book to study ?

Thank you .

Giovanni Dicanio

unread,
Nov 17, 2008, 3:14:13 AM11/17/08
to

"Kid" <K...@discussions.microsoft.com> ha scritto nel messaggio
news:28A8BC25-61A2-4B44...@microsoft.com...

> Is WPF popular now , can VC and MFC write a WPF program ?

WPF is becoming popular, and there are very important ideas behind it (like
using the 3D hardware acceleration, high-composibility of contents, etc.).
However, I think that the tools need to mature, and there are issues to be
fixed (like the blurry text at small font size).

I think that you can host WPF content in an MFC application (as you can host
WinForm content in an MFC application).

A web search with your favourite search engine can lead to this article on
CodeProject:

http://www.codeguru.com/cpp/cpp/cpp_managed/nfc/article.php/c14589

> If I want to study WPF , is there some good book to study ?

There is a great book by Adam Nathan: "WPF Unleashed".

http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917

Giovanni


Ben Voigt [C++ MVP]

unread,
Nov 17, 2008, 10:47:25 AM11/17/08
to
Giovanni Dicanio wrote:
> "Kid" <K...@discussions.microsoft.com> ha scritto nel messaggio
> news:28A8BC25-61A2-4B44...@microsoft.com...
>
>> Is WPF popular now , can VC and MFC write a WPF program ?
>
> WPF is becoming popular, and there are very important ideas behind it
> (like using the 3D hardware acceleration, high-composibility of
> contents, etc.). However, I think that the tools need to mature, and
> there are issues to be fixed (like the blurry text at small font
> size).
> I think that you can host WPF content in an MFC application (as you
> can host WinForm content in an MFC application).

But this should never be the choice for new code. MFC has nothing to offer
a pure WPF application, because the library is married to its own wrapper
around the Win32 GUI.

C++/CLI can be used for WPF, but without XAML support you'll be unhappy
trying to do so.

The recommended practice is to implement the UI (view in M-V-C architecture)
in C# and the data processing (model in M-V-C) in C++.


Giovanni Dicanio

unread,
Nov 17, 2008, 11:11:58 AM11/17/08
to

"Ben Voigt [C++ MVP]" <r...@nospam.nospam> ha scritto nel messaggio
news:uaXwKvMS...@TK2MSFTNGP05.phx.gbl...

>> I think that you can host WPF content in an MFC application (as you
>> can host WinForm content in an MFC application).
>
> But this should never be the choice for new code. MFC has nothing to
> offer a pure WPF application, because the library is married to its own
> wrapper around the Win32 GUI.

If one has legacy apps written using MFC, and there is a need to insert some
WPF graphics in it, it could make sense to do it incrementally, instead of
doing a complete port of the MFC GUI part to WPF.
Hosting WPF content in an MFC GUI is just an option: the OP can choose what
to do in his particular case.

> C++/CLI can be used for WPF, but without XAML support you'll be unhappy
> trying to do so.

I completely agree with you on that. I consider C++/CLI a good tool just for
building some "bridging" layer between native code and managed code (like
exporting some native C/C++ library to the managed world, to use it in C#).
IMHO, native code should be done in C++, and for managed code C# is just
fine.

Giovanni

0 new messages