看了msdn的例子有不明白的地方HWND hwnd;
MCI_DGV_RECT_PARMS mciRect;
// Get the movie dimensions with MCI_WHERE.
mciSendCommand(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_SOURCE,
(DWORD)(LPSTR)&mciRect);
// Create the playback window. Make it bigger for the border.
// Note that the right and bottom members of RECT structures in MCI
// are unusual; rc.right is set to the rectangle's width, and
// rc.bottom is set to the rectangle's height.hwndMovie = CreateWindow("mywindow", "Playback",
WS_CHILD|WS_BORDER, 0,0,
mciRect.rc.right+(2*GetSystemMetric(SM_CXBORDER)),
mciRect.rc.bottom+(2*GetSystemMetric(SM_CYBORDER)),
hwndParent, hInstApp, NULL);
if (hwndMovie){
// Window created OK; make it the playback window.
MCI_DGV_WINDOW_PARMS mciWindow;
mciWindow.hWnd = hwndMovie;
mciSendCommand(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND,
(DWORD)(LPSTR)&mciWindow);
} 设置窗口hwndMovie后,窗口函数应该如何响应WM_PAINT消息?
MCI_DGV_RECT_PARMS mciRect;
// Get the movie dimensions with MCI_WHERE.
mciSendCommand(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_SOURCE,
(DWORD)(LPSTR)&mciRect);
// Create the playback window. Make it bigger for the border.
// Note that the right and bottom members of RECT structures in MCI
// are unusual; rc.right is set to the rectangle's width, and
// rc.bottom is set to the rectangle's height.hwndMovie = CreateWindow("mywindow", "Playback",
WS_CHILD|WS_BORDER, 0,0,
mciRect.rc.right+(2*GetSystemMetric(SM_CXBORDER)),
mciRect.rc.bottom+(2*GetSystemMetric(SM_CYBORDER)),
hwndParent, hInstApp, NULL);
if (hwndMovie){
// Window created OK; make it the playback window.
MCI_DGV_WINDOW_PARMS mciWindow;
mciWindow.hWnd = hwndMovie;
mciSendCommand(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND,
(DWORD)(LPSTR)&mciWindow);
} 设置窗口hwndMovie后,窗口函数应该如何响应WM_PAINT消息?
解决方案 »
- 菜单的消息响应函数不响应
- 求助:使用工具条模拟菜单
- VC6为什么找不到CView::OnSize或CWnd::OnSize的函数定义??????
- list<long> lst; 200000万次lst.pushback(0),用了7M内存,而 new long(200000)来用了700K内存,为什么。是我不会用stl,还是它本来就耗内
- lib路径的问题?
- 插卡
- 怎样获取当前桌面上所有的活动窗口的标题
- 紧急!!!!!!!!!!!
- 编写规则MFC DLL文件的疑问
- 在一个类的构造函数里面new了另一个类的对象
- 那里有软件开发工具下载
- 在FOXPRO中,要把数值型的字段增加二位小数位,可不可以用命令写出来?
MCIDEVICEID wDeviceID,
MCI_UPDATE,
DWORD dwFlags,
(DWORD) (LPMCI_GENERIC_PARMS) lpDest
);