473,378 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Can c++ operate on c# window handle?

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
Jul 21 '05 #1
1 1982
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" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
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

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Altramagnus | last post by:
I have 30 - 40 type of different window. For each type I need about 20 instances of the window. When I try to create them, I get "Error creating window handle" My guess is there is a maximum...
12
by: DEN | last post by:
Hello, I need to remove toolbar and menubar from my current window (not opened with window.open, it would be too easy!!!). I've tried to use the window.toolbar.visible=false property, but it has...
11
by: objectref | last post by:
Hi to all, is there a way to get the window handle of the main window of an application or process ? For example, if someone opens Microsoft Word, he gets a window so he/she can write text....
3
by: TC | last post by:
Hey Folks, I am using the following 4 Win32 APIs with a C# AddIn: FindWindow SetWindowLong SetForegroundWindow EnableWindow Within the AddIn, there are some winforms. I use these APIs to...
8
by: Mészáros Tamás | last post by:
Hi all, how can I set an app's main window to visible from an other application? My problem is, that I know only the handle of the other app's main process, because the application's main window...
14
by: Paul | last post by:
Hi I have 2 functions in java script, one opens a second window-this works, the other is supposed to close this second window, does not seem to be working. Just wondering if anyone had any ideas....
1
by: violin wang | last post by:
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...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
2
by: Jonathan Boivin | last post by:
Hi people, Let me introduce to how I get this error. I have a form which load all my bills representation depending upon filters which each bill is a usercontrol of my own having some...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.