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

📄 tele.h

📁 电信语音系统源码
💻 H
字号:
#if !defined( __TELE_H )
#define __TELE_H

#if !defined( __TW8AW_H )
#include "TW8AW.h"
#endif  // __TW8A_H

struct MMsg
{
   UINT uMsg;
   WORD wParam;
   LONG lParam;
};

#define WM_MESSAGE ( WM_NULL + 1 )

enum
{
   tmNull, // tm: telephone message
   tmRing,

   tmDialing,
   tmDialingOK,
   tmDialingError,

   tmGetNumber,
   tmGetANumber,
   tmGetNumberOK,
   tmGetNumberError,

   tmPlayFile,
   tmPlayFileOK,
   tmPlayFileError,

   tmPlaySentence,
   tmPlaySentenceOK,
   tmPlaySentenceError,
};

BOOL InitTele();
BOOL GetTeleMsg( MMsg& msg );
#define CloseTele TW_Disable

void SetTeleHook( int nChannel, BOOL ( *HookFunc )( MMsg& ) );
void ResetTeleHook( int nChannel );

void OffHook( int nChannel );
void HangUp( int nChannel );
void SendTeleMsg( int nChannel, UINT uMsg, char* lpParam, WORD wParam = 0  );
void PlaySentence( int nChannel, ... );

void inline Dialing( int nChannel, char* szTeleNum )
{
   SendTeleMsg( nChannel, tmDialing, szTeleNum );
}

void inline PlayFile( int nChannel, char* szFile )
{
   SendTeleMsg( nChannel, tmPlayFile, szFile );
}

void inline GetNumber( int nChannel, char* szNumber, int nSize )
{
   SendTeleMsg( nChannel, tmGetNumber, szNumber, nSize );
}

#endif  // __TELE_H

⌨️ 快捷键说明

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