Can you make an MCIWnd a child to the main window, but run in a seperate thread?
-
My MFC application consists of one main dialog, and it has an MCIWnd control created at the bottom for simple media playing functionality. I currently use MCIWndCreate in the main window's OnInitDialog function, creating it as a child window. Most of the media it plays is streamed from the internet. This creates a problem when the user seeks in the MCIWnd, and it has to access the internet for more data. The MCIWnd freezes the whole app until it is able to resume playing (once it finished downloading more data). Usually it only takes a few seconds; however, it tends to be bothersome still. I was wondering if there was a way to create the MCIWnd as a child of the main window, but have all of its functionality run in a seperate thread, so that the main thread can continue uninterupted while MCIWnd downloads its data. Thanks for reading the lengthy post and providing any help. :)
-
My MFC application consists of one main dialog, and it has an MCIWnd control created at the bottom for simple media playing functionality. I currently use MCIWndCreate in the main window's OnInitDialog function, creating it as a child window. Most of the media it plays is streamed from the internet. This creates a problem when the user seeks in the MCIWnd, and it has to access the internet for more data. The MCIWnd freezes the whole app until it is able to resume playing (once it finished downloading more data). Usually it only takes a few seconds; however, it tends to be bothersome still. I was wondering if there was a way to create the MCIWnd as a child of the main window, but have all of its functionality run in a seperate thread, so that the main thread can continue uninterupted while MCIWnd downloads its data. Thanks for reading the lengthy post and providing any help. :)
Did you try with WS_POPUP instead WH_CHILD on the MCI_OPEN command?