I have a general question concerning PlayMods on Windows. I was wondering if there was anyway on Windows for a PlayMod to explicitly make a request to PPro for a new window handle for either the program monitor or source monitor that is internal to the PPro app UI? When a PlayMod instance is instantiated we get a window handle, but can a PlayMod ask for (and receive) a new window handle at an arbitrary time?
The reason for this is so that the PlayMod can use the self-same window handle that is passed in as the window into which it draws in any and all usage cases. On Windows a window DC can only have its pixel format set once and attempting to set the pixel format a second time leads to undefined behavior at best. With the different 3D playback options we offer in our PlayMod, there are at least 2 different pixel formats we must switch between to drive the different playback types capable of being dynamically set in a PPro session. It is through the dialog that we pop up during a call to playGetFilePrefs() that we allow switching between these playback formats, and thus pixel formats, and from my experience this call doesn't cause a refresh of the window handles (automatically, at least). Is there a way, perhaps in returning from the call to playGetFilePrefs(), to request new window handles?
To work around this I have been creating my own window that has as its parent the window handle passed into the Playmod. This works for most situations as I can create and destroy these windows at will, but causes the need for extra overhead to get the window positioned properly. Additionally, I have not yet been able to get my windows to become completely click-through which often hampers the case where a user would double click on the program monitor to bring up the handles that allow for interactive scaling and motion to be applied to a clip. In fact, seeing how the interactive scaling and motion works with a stock Adobe PlayMod, I am not sure if I were able to make my window completely click-through if this would even be enough to get the behavior to where it should be if I were able to draw directly into the window that is passed into the playmod instead of throwing up my own window.
This problem is not present on the Mac due to the way windows, contexts and pixel formats are handled OS-wise.
There's isn't currently a callback to request a new prWnd. Only playmod_SetDisp passes a prWnd to a player, and in my brief testing, it doesn't seem to change when PPro loses/regains focus and playmod_SetDisp is resent, nor does it change when switching between sequences.
I am not sure if I were able to make my window completely click-through if this would even be enough to get the behavior to where it should be if I were able to draw directly into the window that is passed into the playmod instead of throwing up my own window.
In this case of direct manipulation in the Monitor, PPro handles the drawing, so you wouldn't need to draw in that case.