J
jieson
Unregistered / Unconfirmed
GUEST, unregistred user!
我在一个程序里打开一个mci设备,并把起图象显示在两个窗口上,可是我想在两个窗口上显示不同的图象,请问可不可以实现。
打开部分的代码如下:
procedure TVideoSet.MCIOpen(HDL:HWND);
var
open:MCI_OVLY_OPEN_PARMS;
dwFlagsWORD;
Error:Cardinal;
begin
dwFlags := 0;
//dwCallback:The low-order word specifies a window handle used for the MCI_NOTIFY flag.
open.dwCallback := 0;//HDL
open.lpstrDeviceType := LPCSTR(MCI_DEVTYPE_OVERLAY);
open.hWndParent := HDL;
dwFlags := dwflags or MCI_OPEN_TYPE or MCI_OPEN_TYPE_ID;
dwFlags := dwflags or MCI_OVLY_OPEN_PARENT or MCI_OPEN_SHAREABLE;
Error := mciSendCommand( 0, MCI_OPEN, dwFlags, DWord(@open));
RaiseErr(Error);
{返回打开的设备编号}
FDeviceID := open.wDeviceID;
end;
显示部分的代码如下:
procedure TVideoSet.MCIPlay;
var
window:MCI_OVLY_WINDOW_PARMS;
Error:Cardinal;
begin
window.nCmdShow := SW_SHOWNORMAL;
{显示在Panel上}
window.WHandle := FBackPnl.Handle;
error := mciSendCommand(FDeviceID, MCI_WINDOW,
MCI_OVLY_WINDOW_HWND or MCI_OVLY_WINDOW_STATE, DWORD(@window) );
RaiseErr(Error);
end;
打开部分的代码如下:
procedure TVideoSet.MCIOpen(HDL:HWND);
var
open:MCI_OVLY_OPEN_PARMS;
dwFlagsWORD;
Error:Cardinal;
begin
dwFlags := 0;
//dwCallback:The low-order word specifies a window handle used for the MCI_NOTIFY flag.
open.dwCallback := 0;//HDL
open.lpstrDeviceType := LPCSTR(MCI_DEVTYPE_OVERLAY);
open.hWndParent := HDL;
dwFlags := dwflags or MCI_OPEN_TYPE or MCI_OPEN_TYPE_ID;
dwFlags := dwflags or MCI_OVLY_OPEN_PARENT or MCI_OPEN_SHAREABLE;
Error := mciSendCommand( 0, MCI_OPEN, dwFlags, DWord(@open));
RaiseErr(Error);
{返回打开的设备编号}
FDeviceID := open.wDeviceID;
end;
显示部分的代码如下:
procedure TVideoSet.MCIPlay;
var
window:MCI_OVLY_WINDOW_PARMS;
Error:Cardinal;
begin
window.nCmdShow := SW_SHOWNORMAL;
{显示在Panel上}
window.WHandle := FBackPnl.Handle;
error := mciSendCommand(FDeviceID, MCI_WINDOW,
MCI_OVLY_WINDOW_HWND or MCI_OVLY_WINDOW_STATE, DWORD(@window) );
RaiseErr(Error);
end;