
#pragma once

// CSearchDeviceDlg dialog

class CSearchDeviceDlg : public CDialog
{
public:

	CSearchDeviceDlg(CWnd* pParent = NULL);
	virtual ~CSearchDeviceDlg();

    virtual BOOL DestroyWindow();
    virtual BOOL OnInitDialog();

    int GetClassId() {
        return m_nClassId;
    }

    int GetVendorId() {
        return m_nVendorId;
    }

    int GetProductId() {
        return m_nProductId;
    }

    int GetRevision() {
        return m_nRevision;
    }

    int GetAction() {
        return m_nAction;
    }

protected:

    enum { IDD = IDD_SEARCH_DEVICE_DIALOG };

    DECLARE_DYNAMIC(CSearchDeviceDlg)
    DECLARE_MESSAGE_MAP()

	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    virtual void OnOK();

    afx_msg BOOL OnDeviceChange(UINT uEvent, DWORD dwEventData);
    afx_msg void OnNMDblclkTreeDevices(NMHDR *pNMHDR, LRESULT *pResult);

private:

    void RegisterNotification();
    void CreateImageList();

private:

    int m_nClassId;
    int m_nVendorId;
    int m_nProductId;
    int m_nRevision;
    int m_nAction;
};
