Scott Bean

I have huge projects in native C++ code and like the concept of WPF ( more so it's underlying RM drawing API ) and would like to soon convert my custom control API to use it, but I don't see any mention of any similar C++ version of WPF or the .NET Windows::System::Media API. I REALLY find it hard to beleive that there is only some C# or .NET version of this and no C++ version... There is no way i'm willing to start building managed DLLs, dealign with C# and having to use Interops to connect all this to the rest of my application when there is ABSOLUTELY no good examples of how to use interops even...

So is there any plans on having WPF or even better, the underlying Windows::System::Media in a C++ API like you guys did with the GDI+ release ( which was also in .NET )

Or is Microsoft _intensionally_ snubbing us C++ programmer for good

Scott



Re: Windows Presentation Foundation (WPF) C++ version of .NET's Windows::System::Media or WPF?

Rob Relyea

There is no way to use System.Windows.Media apis using only unmanaged code. We probably went too far to the unmanaged side for some of our development community. We hear your feedback...and want to make sure we provide a great set of APIs for you, whether you want managed or unmanaged code.

That said, right now, and for the next while, you should use C++ and interop to use PresentationFramework.dll, PresentationCore.dll etc...

There are some examples of how to do good interop. Look at Nick Kramer's blog and his PDC 2005 talk about interop with Win32. Look at HwndHost,e tc...

Find the sdk articles that mention wpf and interop, and post specific feedback about which details you need. Post the question in the forum, get an answer, and then help others like you by posting what you learned by adding it to the sdk documentation via the msdn wiki on that same page.

Hope that helps. Sorry you feel snubbed...we didn't mean to snub you. We want to help you build applications that were difficult to imagine in the past, and are happy for your feedback.

Thanks, Rob Relyea
Program Manager, WPF Team
http://rrelyea.spaces.live.com





Re: Windows Presentation Foundation (WPF) C++ version of .NET's Windows::System::Media or WPF?

Scott Bean

Thanks for the response... I've read 2 papers on the interops, his being one of them, but I still don't want to waste any time putting together a C# managed DLL and have to try and port my existing drawing API to use WPF or System.Window.Media. and then find out something doesn't work or is not supported... I understand you may want to stop supporting certain APIs like GDI and GDI+ and replace them with better ones, but why change the language mid stream if Microsoft is not publically saying they want to do away with C++... I just can't see them "forgetting" about implementing one of the most important aspects of Vista in the most widely used langage commercial application developers...C++... Obviously there is an unfair bias and we have to pay for Microsoft continuously starting and dropping APIs, hopefully this is not a trend that continues with programming languages... Why not keep GDI+ going and internally try to take advantage of the GPU, or if that doesn't map well, at least write a damn wrapper API to aleviate some of the trouble this causes us so that we don't have to ALL build our own damn abstraction laywer to a new API in another language for that matter...

My current code uses a dynamic mix of GDI and GDI+ which was hell to get working, but worked out great for trading performance and quality so I'll stick with this for now, or attempt to create my own API directly above DX10 if I feel motivated enough one day...

I'm glad to hear you may be eventually catering to the C++ group finally, but beside these independant articles and forums on the interops, you really should at least invest some time on putting together a few actual samples of how to use the interops for both scenarios, maybe showing some system.windows.media ( is there a real name for this ) being drawn in a CWnd, and an example of C++ drawing into a WPF app or something... But bits of information scattered around the internet telling use to use TargetHwnd and stuff and no samples is really making it hard on us :)

Like will the new version of Office or all your internal applications be built using C# and WPF I'm sure a smaller percentage of Microsoft's application actually fully use C# and .NET, so how are your internal studios taking to the fact that there is no C++ libraries Imagine DirectX coming out only in managed code... Don't think most game developers would put up with that...

Sorry for being a ***, but I think MS internally knew what they were doing ( maybe trying to force people to get into C# and .Net ), but if so, they should pobably save us some time and patience and just be blunt about it up front...

Scott





Re: Windows Presentation Foundation (WPF) C++ version of .NET's Windows::System::Media or WPF?

Scott Bean

Rob Relyea wrote:

We want to help you build applications that were difficult to imagine in the past, and are happy for your feedback.

I'm a hardcore 3D programmer and I have been imagining for years what I could do with windows UI given my 3D knowledge, so I totally understand where you are going with WPF and system.window.media and see it's potential and that's why it bugs me so much that you guys decided not to support C++ programmers going forward when there isn't a reason you can't, and that is why the only reason i can think of that you haven't is because you are yes, "snubbing" anyone who doesn't conform to C# or .NET. So I'm the donky and Microsoft is dangling this nice carrot ( WPF ) in front of my nose, and the only way to eat that carrot is to join the .NET bandwagon of web developer... EeeeeHoooonnnn...

Scott





Re: Windows Presentation Foundation (WPF) C++ version of .NET's Windows::System::Media or WPF?

Zhou Yong

From my understanding, you wanna Microsoft to provide you with a completely unmanaged version of PresentationCore.dll or PresentationFramework.dll. I think this is impossible, bcause Microsoft has to re-engineer the efforst they put when implementing those dll using managed code and leveraging CLR. I just cannot imagine how to implement the Dependency Property system in unmanaged code. and how much effort Microsoft needs to take to rewrite those dlls using unmanaged code. and I also cannot imagine if WPF is implemented using unmanaged C++, how does XAML and C++ fit together
ps: Don't fool me around, .NET is not all about web dev(ASP.NET thingy)

Sheva





Re: Windows Presentation Foundation (WPF) C++ version of .NET's Windows::System::Media or WPF?

Scott Bean

First, I really don't core much for WPF and certainly would never use something like XAML. That to me is just a helper retained mode drawing wrapper which I have no use for...

What pisses me off is that Microsoft were not clear about this from the get go and now act like they simply overlooked our needs and did not even consider providing a simple low level C++ drawing API layer that did the same as Windows.System.Media as they definetely made it clear they have not and will not continue supporting even a non-accelerated GDI+. So basically they do give us no options as I hear GDI is now non-accelerated in Vista and GDI+ is nice, but still slow as all hell. If Windows.System.Media is indeed built on DX9, then they have absolutly no reason why they could not easilly port the Windows.System.Media API to a simple stand-alone C++ API.

The fact they are pretty much ditching Win32, MFC, GDI and GDI+ by not continuing their development is understandable, but the fact they are doing this and focusing ALL their upcoming system tools/APIs in another language all together is unacceptable. I would say, unless I'm the only developer left that does not mind porting all my code to use C# and .NET in the coming years, then forget me, but if not, get ready for some pissed off developers... And screw using CLR, if they really gave a rats ass about supporting us even through something like CLR, they would get off their asses and allocate some time to develop at least a handful of real-world CLR samples and not rely on 3rd party articles of guys talking about using CLR and interops who won't even post any useful sample code along with it... Blows my mind!

Scott