No SysAnimate32 controls on Win 7 and 8 ?

No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Fri Apr 19, 2013 7:44 am

If you run FWH\samples\win32.prg you will see that the animated videos don't show on Windows 7 or 8.

It seems as there has been an important change on these controls. After googling for solutions, I have posted this question at stackoverflow:

http://stackoverflow.com/questions/16099680/sysanimate32-on-windows-7-and-8

Code: Select all  Expand view
#include <windows.h>
#include <CommCtrl.h>

HINSTANCE hInstance;

#define IDC_MYANIMATE 9

HWND CreateAnimationControl( HWND hParent )
{
    HWND hAnimation = Animate_Create( hParent, IDC_MYANIMATE, ACS_AUTOPLAY | WS_BORDER | WS_CHILD | WS_VISIBLE, hInstance);
   
    if( ! Animate_Open( hAnimation, "test.avi" ) )
         MessageBox( 0, "can't open the video", "warning", MB_ICONINFORMATION );

    return hAnimation;
}

LRESULT CALLBACK WindowProcedure (HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{
    static HWND hAnimation = NULL;

    switch (uiMsg)
    {
        case WM_DESTROY:
             PostQuitMessage( 0 );
             break;

        case WM_CREATE:
             hAnimation = CreateAnimationControl( hWnd );
             break;

        case WM_SHOWWINDOW:
             if( wParam )
             {
                MoveWindow( hAnimation, 0, 0, 300, 300, TRUE );
               Animate_Play( hAnimation, 0, -1, -1 );
             }
             break;
    }
   
    return DefWindowProc( hWnd, uiMsg, wParam, lParam );
}

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpsCmdLine, int iCmdShow )
{
    WNDCLASSEX WindowClass;
    HWND hWnd;
    MSG uMsg;

    hInstance = GetModuleHandle (NULL);

    WindowClass.cbClsExtra = 0;
    WindowClass.cbSize = sizeof( WNDCLASSEX );
    WindowClass.cbWndExtra = 0;
    WindowClass.hbrBackground = CreateSolidBrush( RGB( 0, 0, 180 ) );
    WindowClass.hCursor = LoadCursor( NULL, IDC_ARROW );
    WindowClass.hIcon = LoadIcon( NULL, IDI_APPLICATION );
    WindowClass.hIconSm = LoadIcon( NULL, IDI_APPLICATION );
    WindowClass.hInstance = hInstance;
    WindowClass.lpfnWndProc = WindowProcedure;
    WindowClass.lpszClassName = "1";
    WindowClass.lpszMenuName = NULL;
    WindowClass.style = 0;

    if( ! RegisterClassEx( &WindowClass ) )
    {
        MessageBox (NULL, "Window class registration has failed!", "Error:", MB_OK | MB_ICONERROR);
        return 0;
    }

    hWnd = CreateWindow( "1", "Win32 Animation Testing", WS_OVERLAPPEDWINDOW,
                         CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL,
                         hInstance, NULL);
    if( ! hWnd )
    {
        MessageBox (NULL, "Window creation has failed!", "Error:", MB_OK | MB_ICONERROR);
        return 0;
    }

    ShowWindow( hWnd, SW_SHOW );
    UpdateWindow( hWnd );

    while( GetMessage( &uMsg, NULL, 0, 0 ) > 0 )
    {
        TranslateMessage( &uMsg );
        DispatchMessage ( &uMsg );
    }

    return ( int ) uMsg.wParam;
}


to build it:
set path=c:\bcc582\bin
bcc32 -W test.c
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Fri Apr 19, 2013 8:22 am

this class in totally useless, since RLE8 literally limits you to a simple ala-Windows 95 animations. That is why I'm surprised that Microsoft didn't come up with a new class to support PNG (or "real" AVI) for animations. How do they do their fancy animations in Vista and 7?


http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/9f2d4e67-4bae-411d-bdb9-b8b722fdd519/
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Fri Apr 19, 2013 8:25 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Fri Apr 19, 2013 10:38 am

It seems as the AVI files to use must have no sound inside them.

Any idea about how to create them ? It would be great to convert GIFs into AVI without sound.

Uwe ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby ukoenig » Fri Apr 19, 2013 2:10 pm

Antonio,

1. GIF to AVI
VirtuelDub will do the job, converting Gif's to Avi

Image

Image

2, extracting the Video-stream from a Avi-file ( DEMULTIPLEX )
You can use => AVIDEMUX
Video and Audio will be seperated

Image

http://avidemux-mswin.sourceforge.net/

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Fri Apr 19, 2013 4:10 pm

Uwe,

As usual you provide us a great advice! many thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Fri Apr 19, 2013 4:44 pm

Uwe,

Have you been able to create halo.avi without sound ?

Here, on Windows 8, avidemux crashes... :-(
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby ukoenig » Fri Apr 19, 2013 5:00 pm

Antonio,

I searched for < Halo.avi > but couldn' find it.
Is it a converted GIF => Halo.gif ?

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Fri Apr 19, 2013 5:55 pm

Uwe,

From halo.gif you get halo.avi with sound.

From halo.avi with sound, we have to get halo.avi without sound :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby ukoenig » Fri Apr 19, 2013 6:03 pm

Antonio,

I created the Avi from Halo.gif without any problem with Virtualdub.
Next I tested with Avidemux and got the crash as well.
I tested Avidemux with another AVI and got a RAW-file as result.
I will look for a better solution, to extract only the Video-frames.

Best Regards
Uwe :roll:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby ukoenig » Fri Apr 19, 2013 9:08 pm

No extra prog. AVIDEMUX needed !!!

With VirtualDub You can save a AVI without audio.

1. load GIF and save as AVI
next :

Image


Image

needed !!!

Image


Image

Open the new file and select < File information > testing if there is a audio-track

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: No SysAnimate32 controls on Win 7 and 8 ?

Postby Antonio Linares » Sat Apr 20, 2013 8:43 am

Uwe,

many thanks! :-)

Now the generated AVI (with no sound) is working fine with the C example I provided:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41322
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 13 guests

cron