robot.cpp

来自「Visual_C++[1].NET_Bible1 Visual_C++宝典书中」· C++ 代码 · 共 24 行

CPP
24
字号
// Robot.cpp 

#include "stdafx.h"
#include "Robot.h"

STDMETHODIMP CRobot::get_BatteryLife(LONG* pVal)
{
	*pVal = m_nBatteryLife;
	return S_OK;
}

STDMETHODIMP CRobot::put_BatteryLife(LONG newVal)
{
	m_nBatteryLife = newVal;
	return S_OK;
}

STDMETHODIMP CRobot::Speak(BSTR bstrSpeech)
{
	MessageBoxW(0, bstrSpeech, L"Speech", 0);
	return S_OK;
}

⌨️ 快捷键说明

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