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

📄 testphone.cpp

📁 usb的skype电话
💻 CPP
字号:
// TESTPHONE.cpp : implementation file
//

#include "stdafx.h"
#include "traytest.h"
#include "TESTPHONE.h"
#include "PhoneUI.h"



#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// TESTPHONE dialog


TESTPHONE::TESTPHONE(CWnd* pParent /*=NULL*/)
	: CDialog(TESTPHONE::IDD, pParent)
{
	//{{AFX_DATA_INIT(TESTPHONE)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT

	b_Display=FALSE;
	pPhoneUI=NULL;
}
TESTPHONE::~TESTPHONE()
{
	TRACE("~TESTPHONE() \n");

	pPhoneUI=NULL;
}

void TESTPHONE::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(TESTPHONE)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(TESTPHONE, CDialog)
	//{{AFX_MSG_MAP(TESTPHONE)
	ON_BN_CLICKED(IDC_KEY_UP, OnKeyUp)
	ON_BN_CLICKED(IDC_KEY_CANCEL, OnKeyCancel)
	ON_BN_CLICKED(IDC_KEY_DOWN, OnKeyDown)
	ON_BN_CLICKED(IDC_KEY_OK, OnKeyOk)
	ON_BN_CLICKED(IDC_KEY_1, OnKey1)
	ON_BN_CLICKED(IDC_KEY_2, OnKey2)
	ON_BN_CLICKED(IDC_KEY_3, OnKey3)
	ON_BN_CLICKED(IDC_KEY_4, OnKey4)
	ON_BN_CLICKED(IDC_KEY_5, OnKey5)
	ON_BN_CLICKED(IDC_KEY_6, OnKey6)
	ON_BN_CLICKED(IDC_KEY_7, OnKey7)
	ON_BN_CLICKED(IDC_KEY_8, OnKey8)
	ON_BN_CLICKED(IDC_KEY_9, OnKey9)
	ON_BN_CLICKED(IDC_KEY_X, OnKeyX)
	ON_BN_CLICKED(IDC_KEY_0, OnKey0)
	ON_BN_CLICKED(IDC_KEY_J, OnKeyJ)
	ON_WM_CLOSE()
	ON_WM_CREATE()
	ON_BN_CLICKED(IDC_DECVOL, OnDecvol)
	ON_BN_CLICKED(IDC_INCVOL, OnIncvol)
	ON_BN_CLICKED(IDC_KEY_INOUT, OnKeyInout)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// TESTPHONE message handlers

void TESTPHONE::OnKeyOk() 
{
	UsbPhoenKeyDown(C_KEY_OK);
}

void TESTPHONE::OnKeyCancel() 
{
	UsbPhoenKeyDown(C_KEY_CANCEL);
}

void TESTPHONE::OnKeyDown() 
{	
	UsbPhoenKeyDown(C_KEY_DOWN);
}

void TESTPHONE::OnKeyUp() 
{
	UsbPhoenKeyDown(C_KEY_UP);
}

void TESTPHONE::OnKey0() 
{
	UsbPhoenKeyDown(C_KEY_0);
}

void TESTPHONE::OnKey1() 
{
	UsbPhoenKeyDown(C_KEY_1);
}

void TESTPHONE::OnKey2() 
{
	UsbPhoenKeyDown(C_KEY_2);
}

void TESTPHONE::OnKey3() 
{
	UsbPhoenKeyDown(C_KEY_3);
}

void TESTPHONE::OnKey4() 
{
	UsbPhoenKeyDown(C_KEY_4);
}

void TESTPHONE::OnKey5() 
{
	UsbPhoenKeyDown(C_KEY_5);
}

void TESTPHONE::OnKey6() 
{
	UsbPhoenKeyDown(C_KEY_6);
}

void TESTPHONE::OnKey7() 
{
	UsbPhoenKeyDown(C_KEY_7);
}

void TESTPHONE::OnKey8() 
{
	UsbPhoenKeyDown(C_KEY_8);
}

void TESTPHONE::OnKey9() 
{
	UsbPhoenKeyDown(C_KEY_9);
}

void TESTPHONE::OnKeyX() 
{
	UsbPhoenKeyDown(C_KEY_X);
}


void TESTPHONE::OnKeyJ() 
{
	UsbPhoenKeyDown(C_KEY_J);
}

void TESTPHONE::OnDecvol() 
{
	UsbPhoenKeyDown(C_KEY_DECVOL);
}

void TESTPHONE::OnIncvol() 
{
	UsbPhoenKeyDown(C_KEY_INCVOL);
}

void TESTPHONE::OnKeyInout() 
{
	UsbPhoenKeyDown(C_KEY_INOUT);	
}

void TESTPHONE::UsbPhoenKeyDown(UCHAR key)
{
	if(pPhoneUI)
		pPhoneUI->OnKeyDown(key);
}

void TESTPHONE::Display(CDC *pSourceDC, int width, int height)
{	
	if(!b_Display)
		return;
	
	CDC	*pDc;
	pDc=GetDC();
	pDc->StretchBlt(40, 20, width, height, 
		pSourceDC, 0, 0, width, height,SRCCOPY);
}



void TESTPHONE::OnClose() 
{
	TRACE(" TESTPHONE::OnClose \n");
	b_Display=FALSE;
	CDialog::OnClose();
}

int TESTPHONE::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	TRACE(" TESTPHONE::OnCreate \n");
	
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	b_Display=TRUE;
	return 0;
}




⌨️ 快捷键说明

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