⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aboutprp.cpp

📁 音频编码
💻 CPP
字号:
/* *  LAME MP3 encoder for DirectShow *  About property page * *  Copyright (c) 2000-2005 Marie Orlova, Peter Gubanov, Vitaly Ivanov, Elecard Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */#include <windows.h>#include <streams.h>#include <olectl.h>#include <commctrl.h>#include "iaudioprops.h"#include "aboutprp.h"#include "mpegac.h"#include "resource.h"#include "Reg.h"// -------------------------------------------------------------------------// CMAEAbout// -------------------------------------------------------------------------CHAR lpszText[] =   "This library is free software; you can redistribute it \r\n"                    "and/or modify it under the terms of the GNU \r\n"                    "Library General Public License\r\n"                    "as published by the Free Software Foundation;\r\n"                    "either version 2 of the License,\r\n"                    "or (at your option) any later version.\r\n"                    "\r\n"                    "This library is distributed in the hope that it will be useful,\r\n"                     "but WITHOUT ANY WARRANTY;\r\n"                    "without even the implied warranty of MERCHANTABILITY or \r\n"                    "FITNESS FOR A PARTICULAR PURPOSE. See the GNU \r\n"                    "Library General Public License for more details.\r\n"                    "\r\n"                    "You should have received a copy of the GNU\r\n"                    "Library General Public License\r\n"                    "along with this library; if not, write to the\r\n"                    "Free Software Foundation,\r\n"                    "Inc., 59 Temple Place - Suite 330,\r\n"                    "Boston, MA 02111-1307, USA.\r\n";//// CreateInstance//CUnknown * WINAPI CMAEAbout::CreateInstance(LPUNKNOWN lpunk, HRESULT *phr){    CUnknown *punk = new CMAEAbout(lpunk, phr);    if (punk == NULL) {        *phr = E_OUTOFMEMORY;    }    return punk;}//// Constructor//// Creaete a Property page object for the MPEG optionsCMAEAbout::CMAEAbout(LPUNKNOWN lpunk, HRESULT *phr)    : CBasePropertyPage(NAME("About LAME Ain't MP3 Encoder"), lpunk,        IDD_ABOUT,IDS_ABOUT)    , m_fWindowInactive(TRUE){    ASSERT(phr);//    InitCommonControls();}//// OnConnect//// Give us the filter to communicate withHRESULT CMAEAbout::OnConnect(IUnknown *pUnknown){    return NOERROR;}//// OnDisconnect//// Release the interfaceHRESULT CMAEAbout::OnDisconnect(){    // Release the interface    return NOERROR;}//// OnActivate//// Called on dialog creationHRESULT CMAEAbout::OnActivate(void){    // Add text to the window.    m_fWindowInactive = FALSE;    SendDlgItemMessage(m_hwnd, IDC_LAME_LA, WM_SETTEXT, 0, (LPARAM)lpszText);    CHAR strbuf[250];    sprintf(strbuf, "LAME Ain't MP3 Encoder (%s)", get_lame_version());    SendDlgItemMessage(m_hwnd, IDC_LAME_VER, WM_SETTEXT, 0, (LPARAM)strbuf);    sprintf(strbuf, "LAME Project Homepage: %s", get_lame_url());    SendDlgItemMessage(m_hwnd, IDC_LAME_URL, WM_SETTEXT, 0, (LPARAM)strbuf);    return NOERROR;}//// OnDeactivate//// Called on dialog destructionHRESULT CMAEAbout::OnDeactivate(void){    m_fWindowInactive = TRUE;    return NOERROR;}//// OnApplyChanges//// User pressed the Apply button, remember the current settingsHRESULT CMAEAbout::OnApplyChanges(void){    return NOERROR;}//// OnReceiveMessages//// Handles the messages for our property windowBOOL CMAEAbout::OnReceiveMessage( HWND hwnd                                , UINT uMsg                                , WPARAM wParam                                , LPARAM lParam){    if (m_fWindowInactive)        return FALSE;    switch (uMsg)    {    case WM_DESTROY:        return TRUE;    default:        return FALSE;    }    return TRUE;}//// SetDirty//// notifies the property page site of changesvoid CMAEAbout::SetDirty(){    m_bDirty = TRUE;    if (m_pPageSite)        m_pPageSite->OnStatusChange(PROPPAGESTATUS_DIRTY);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -