zoukankan      html  css  js  c++  java
  • 动画按钮

    AniButton.jpg 这个类是一个简单的所有者绘制CButton类,它允许你在按钮中播放动画文件(AVI的)。这个类可以像任何其他所有者绘制控件一样使用——只需包含头文件,并将按钮控件声明为CAniButton而不是CButton 类有以下方法: 隐藏,复制Code

    BOOL Open( LPCTSTR lpszFileName );    // Open an AVI file using its filename
    BOOL Open( UINT nID );              // Open an AVI file using its resource ID
    void Play();                        // Start playing the animation 
    void Stop();                        // Stop the animation
    void Close();                       // Close the animation and free resources

    要设置播放动画的按钮,首先通过手动编辑.rc文件,将AVI添加到您的资源中,并添加以下内容: 隐藏,复制Code

    IDR_AVI1  AVI     DISCARDABLE     "res\Animation.avi"

    在动画。avi是/res目录下的一个avi文件(记得在resource.h文件中定义IDR_AVI1)。然后,在创建控件(或在对话框OnInitDialog函数中)之后,添加以下内容 隐藏,复制Code

    m_Button.Open(IDR_AVI1);
    m_Button.Play();

    m_Button是你的动画按钮。 本文转载于:http://www.diyabc.com/frontweb/news445.html

  • 相关阅读:
    c/c++指针
    C++小思
    gvim-ide plugins
    Windows下文件的所有和权限
    C++枚举类型
    linux的cgroup控制
    linux的free命令
    linux下可以禁用的一些服务
    bat programming is easy and powerful
    c++类定义代码的分离
  • 原文地址:https://www.cnblogs.com/Dincat/p/13450105.html
Copyright © 2011-2022 走看看