Delphi - Message loop for Form created in DirectShow filter goes dead

Posted by Robert Oschler on Stack Overflow See other posts from Stack Overflow or by Robert Oschler
Published on 2010-04-02T22:16:58Z Indexed on 2010/04/02 22:23 UTC
Read the original article Hit count: 479

Filed under:
|
|
|

I have a DirectShow filter created with Delphi Pro 6 and the DSPACK direct show library. I'm running under windows XP. I've tried creating the form dynamically when the container class for the DirectFilter has its constructor called, passing NIL into the constructor as the AOwner parameter (TMyForm.Create(nil) and then calling the Form's Show() method. The form does show but then appears to stop receiving windows messages because it never repaints and does not respond to input. As a test I then tried creating my own WndProc() and overriding the Form's WndProc(). My WndProc() did get called once but never again.

I'm guessing it's because I'm a DLL and the context that I am running in is not "friendly" to the window message handler for the form; perhaps something to do with the thread that calls it or whatever. If someone could give me a tip on how to solve this or what the proper way to create a persistent window is from the context of a DirectShow filter I'd appreciate it. Note, as I said the window needs to be persistent so I can't create it as a Filter property page.

Thanks, Robert

© Stack Overflow or respective owner

Related posts about delphi

Related posts about directshow