PC Review


Reply
Thread Tools Rate Thread

Can c++ operate on c# window handle?

 
 
violin wang
Guest
Posts: n/a
 
      30th Dec 2003
I use c# to build UI for my application and write a
unmanaged c++ dll which use DirectShow to play video.I
want the video image to display in a PictureBox on the
UI.Can I pass the handle of PictureBox to DirectShow as
video windows?If not, how can I reach my goal?

regards
violin
 
Reply With Quote
 
 
 
 
Chris Taylor
Guest
Posts: n/a
 
      30th Dec 2003
Hi,

If you do this, beware that invoking certain methods and properties will
actually cause the underlying window to be destroyed and recreated thus
rendering your previous handle invalid. To detect this situation, you can
handle the HandleCreated and HandleDestroyed events for the control.
Ideally, you should avoid adjusting properties that will result in the
window being recreated. The reason for this, is that some of the underlying
windows styles for instance can only be applied when the window is created,
so to hide this complexity the .NET framework just destroys and recreates a
new window with the required styles transferring all relevant properties etc
to the newly created window.

Hope this helps

Chris Taylor


"violin wang" <(E-Mail Removed)> wrote in message
news:081701c3cead$8672cb40$(E-Mail Removed)...
> I use c# to build UI for my application and write a
> unmanaged c++ dll which use DirectShow to play video.I
> want the video image to display in a PictureBox on the
> UI.Can I pass the handle of PictureBox to DirectShow as
> video windows?If not, how can I reach my goal?
>
> regards
> violin



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Window XP update has caused excel to not operate =?Utf-8?B?QmlsbCBMLg==?= Microsoft Excel Misc 2 25th Sep 2006 02:58 PM
How to Operate the active Excel Window with VB6 NTorch Microsoft Excel Programming 1 27th Jul 2006 03:47 AM
Open new window in codebehind and add the window handle to javascript array RJN Microsoft ASP .NET 1 10th Oct 2004 08:53 PM
make a browser window stay on top window handle? =?Utf-8?B?RHVzdGluIElJLg==?= Microsoft ASP .NET 1 18th Aug 2004 07:26 AM
how to operate window 98 based program on windows xp =?Utf-8?B?aG9tZXNydXM=?= Windows XP Help 5 29th Feb 2004 07:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:24 PM.