2 当你接到一个wm_displaychange消息,你就要调用ivmrwindowlesscontrol::displaymodechanged.
3 当你接到一个wm_size消息时,重新计算视频的位置,然后调用setvideopostion。
下面的代码演示了wm_paint消息的处理
void onpaint(hwnd hwnd)
{
paintstruct ps;
hdc hdc;
rect rcclient;
getclientrect(hwnd, &rcclient);
hdc = beginpaint(hwnd, &ps);
if (g_pwc != null)
{
// find the region where the application can paint by subtracting
// the video destination rectangle from the client area.
// (assume that g_rcdest was calculated previously.)