Just a thought, if your already integrating
windows media player for the backend playing of files, why don't you use it's skinning engine for the front end?
In an embeded control, you can capture all the events from the skin, even events that are user defined. If your main app is in C++, or any language that supports COM for that matter, you can pass or recieve COM objects from your C++ app to and from the WMP skin engine simply by using IWMPRemoteMediaServices and its GetScriptableObject, this means that you can have a line in the skin file for a label such as caption="JScript:GetRadioStation();" which is a javascript function that calls a method from the C++ COM object that you passed in with GetScriptableObject. This results in the label having the text of the current
radio station that is generated by the C++ backend. If you need to display something that isn't supported by WMP such as a GPS map or something, you can have all the buttons controlling it be on the skin, but cut out a hole in the WMP skin window with SetWindowRgn and display your map behind it where the hole is.
I'm sure there will be a fair share of problems that must be overcome with this method, but it would seem far easier and result in a much more feature complete program then rewriting a complete skinning engine from scratch. With this method all you should have to write is the backend for things that arent already supported in WMP like GPS support etc. and create COM objects for them that can be called from the skin and javascript to create the main app.
Bookmarks