
#pragma once

#include "resource.h"

// CEditDeviceDlg dialog

class CEditDeviceDlg : public CDialog
{
public:

    enum { IDD = IDD_EDIT_DEVICE_DIALOG };

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

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

protected:

    DECLARE_DYNAMIC(CEditDeviceDlg)
    DECLARE_MESSAGE_MAP()

    afx_msg void OnCheckBox(UINT nId);
    afx_msg void OnCbnSelchangeComboVendor();

	virtual void DoDataExchange(CDataExchange* pDX);
    virtual BOOL OnInitDialog();
    virtual void OnOK();

private:

    static int _InsertClasses(void *opaque, int argc, char **argv, char **azColName);
    static int _InsertVendors(void *opaque, int argc, char **argv, char **azColName);
    static int _InsertProducts(void *opaque, int argc, char **argv, char **azColName);

    int InsertClasses(int argc, char **argv);
    int InsertVendors(int argc, char **argv);
    int InsertProducts(int argc, char **argv);
    int GetComboBoxValue(int nCheckId, int nComboId);
    void SetComboCurSel(int nComboId, int nValue);
    int GetEditValue(int nCheckId, int nComboId);
};
