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

📄 btpairingdlg.h

📁 以前做NOKIA手机与PC通信时所参考的源代码,里面包括两个程序,一个是手机文件夹浏览源码,另一个手机SIS安装程序.
💻 H
字号:
/*
Filename    : BTPairingDlg.h
Part of     : Phone Navigator
Description : Declaration of PhoneNavigator's bluetooth pairing dialog
Version     : 3.2

This example is only to be used with PC Connectivity API version 3.2.
Compability ("as is") with future versions is not quaranteed.

Copyright (c) 2007 Nokia Corporation.
 
This material, including but not limited to documentation and any related 
computer programs, is protected by intellectual property rights of Nokia 
Corporation and/or its licensors.
All rights are reserved. Reproducing, modifying, translating, or 
distributing any or all of this material requires the prior written consent 
of Nokia Corporation. Nokia Corporation retains the right to make changes 
to this material at any time without notice. A copyright license is hereby 
granted to download and print a copy of this material for personal use only.
No other license to any other intellectual property rights is granted. The 
material is provided "as is" without warranty of any kind, either express or 
implied, including without limitation, any warranty of non-infringement, 
merchantability and fitness for a particular purpose. In no event shall 
Nokia Corporation be liable for any direct, indirect, special, incidental, 
or consequential loss or damages, including but not limited to, lost profits 
or revenue,loss of use, cost of substitute program, or loss of data or 
equipment arising out of the use or inability to use the material, even if 
Nokia Corporation has been advised of the likelihood of such damages occurring.
*/

#if !defined(AFX_BTPAIRINGDLG_H__3E5762D5_5907_42D2_AD86_E74EFB225EBA__INCLUDED_)
#define AFX_BTPAIRINGDLG_H__3E5762D5_5907_42D2_AD86_E74EFB225EBA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CBTDevice

class CBTDevice
{
public:
    CBTDevice(LPCWSTR lpszName, LPCWSTR lpszAddress, DWORD dwDeviceID, DWORD dwStatus)
    {
        m_strName = lpszName;
        m_strAddress = lpszAddress;
        m_dwDeviceID = dwDeviceID;
        m_dwStatus = dwStatus;
    }
    LPCWSTR GetAddress() { return m_strAddress; }
    LPCWSTR GetName() { return m_strName; }
    DWORD GetDeviceID() { return m_dwDeviceID; }
    DWORD GetStatus() { return m_dwStatus;}
    void SetStatus(DWORD dwStatus) { m_dwStatus = dwStatus; }
private:
    CString m_strName;
    CString m_strAddress;
    DWORD m_dwDeviceID;
    DWORD m_dwStatus;
};


/////////////////////////////////////////////////////////////////////////////
// CBTPairingDlg dialog

class CBTPairingDlg : public CDialog
{
// Construction
public:
	CBTPairingDlg(CWnd* pParent = NULL);   // standard constructor
    virtual ~CBTPairingDlg();
// Dialog Data
	//{{AFX_DATA(CBTPairingDlg)
	enum { IDD = IDD_BT_PAIRING_DIALOG };
	//}}AFX_DATA

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBTPairingDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CBTPairingDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonSearch();
	afx_msg void OnButtonPair();
	afx_msg void OnButtonUnpair();
	afx_msg void OnDestroy();
	afx_msg void OnButtonSetTrusted();
	afx_msg void OnButtonSetUntrusted();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
    DMHANDLE	m_hDM;
	CListCtrl	m_PhoneList;
	CButton		m_CheckUseCache;
	CComboBox	m_ComboSearchOptions;

	void		RefreshPhoneList(bool bSearchDevices = true);
	void		ClearPhoneList();
	CBTDevice*	GetSelectedDevice();
	DWORD		ChangeTrustedState(DWORD dwTrustedState, LPCWSTR lpszPassword);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_BTPAIRINGDLG_H__3E5762D5_5907_42D2_AD86_E74EFB225EBA__INCLUDED_)

⌨️ 快捷键说明

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