I cannot figure this out, someone to help clarify.
My question is then very simple: Why does not this work?
------------------
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
From MSDN
BOOL Animate_Open(HWND hwnd,LPSTR lpszName);
Parameters
hwnd Handle to the animation control.
lpszName Address of a buffer that contains the path of the AVI file
or the name of an AVI resource. Alternatively, this parameter
can consist of the AVI resource identifier in the low-order word
and zero in the high-order word. To create this value, use the
MAKEINTRESOURCE macro.
The control loads an AVI resource from the module specified by the
instance handle passed to the CreateWindow function, the Animate_Create
macro, or the dialog box creation function that created the control.
The AVI file or resource specified by lpszName must not contain audio.
If this parameter is NULL, the system closes the AVI file that was previously
opened for the specified animation control, if any.
BOOL Animate_Open(HWND hwnd,LPSTR lpszName);
Parameters
hwnd Handle to the animation control.
lpszName Address of a buffer that contains the path of the AVI file
or the name of an AVI resource. Alternatively, this parameter
can consist of the AVI resource identifier in the low-order word
and zero in the high-order word. To create this value, use the
MAKEINTRESOURCE macro.
The control loads an AVI resource from the module specified by the
instance handle passed to the CreateWindow function, the Animate_Create
macro, or the dialog box creation function that created the control.
The AVI file or resource specified by lpszName must not contain audio.
If this parameter is NULL, the system closes the AVI file that was previously
opened for the specified animation control, if any.
Code:
#Compile Exe #Resource "MYAVI.PBR" #Include "\!INCLUDE\WIN32API.BAS" #Include "\!INCLUDE\COMMCTRL.BAS" Function PbMain()As Long Style& = %WS_POPUPWINDOW Or %DS_MODALFRAME Or %WS_CAPTION Or %DS_CENTER ExStyle& = 0 AniStyle& = %WS_CHILD Or %WS_VISIBLE Or %ACS_AUTOPLAY Or %ACS_TRANSPARENT 'Or %ACS_CENTER AniStyleEx& = 0 Dialog New %NULL, "Animation test", 0, 0, 200,40, Style&, ExStyle& To hDlg& Control Add "SysAnimate32", hDlg&, 1000,"",0,0,200,40,AniStyle&,AniStyleEx& Control Handle hDlg&,1000 To hAni& #Debug Print Str$(Animate_Open(hAni&,"FIL_SEARCH")) Dialog Show Modal hDlg& End Function -- RC-file "MYAVI.RC" FIL_SEARCH AVI FILECOPY.AVI FIL_DELETE AVI FILEDELR.AVI
------------------
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
Comment