Migliorato server delle chiavi di rete

git-svn-id: svn://10.65.10.50/trunk@6600 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1998-05-04 10:09:51 +00:00
parent cde8a89ecb
commit 6d14e30178
11 changed files with 316 additions and 127 deletions

View File

@ -11,20 +11,31 @@ int f_DongleHasModule(TConnection& conn, void* pJolly)
if (argc > 0) if (argc > 0)
{ {
const int n = atoi(argv[0]) - 1; const int n = atoi(argv[0]) - 1;
const unsigned short* int_tab = GetServer().Authorizations(); if (n >= 0)
if (int_tab) {
ok = (int_tab[n / 16] >> (n % 16)) & 0x1; unsigned short nSize;
const unsigned short* int_tab = GetServer().Authorizations(nSize);
if (int_tab)
{
const unsigned short index = n / 16;
if (index < (nSize/2))
ok = (int_tab[index] >> (n % 16)) & 0x1;
}
}
else
ok = TRUE;
} }
return conn.ReturnBool(ok); return conn.ReturnBool(ok);
} }
int f_DongleModules(TConnection& conn, void* pJolly) int f_DongleModules(TConnection& conn, void* pJolly)
{ {
const unsigned short* int_tab = GetServer().Authorizations(); unsigned short nSize;
const unsigned short* int_tab = GetServer().Authorizations(nSize);
if (int_tab) if (int_tab)
{ {
BYTE* buff = GetServer().GetBuffer(8); BYTE* buff = GetServer().GetBuffer(nSize);
memcpy(buff, int_tab, 8); memcpy(buff, int_tab, nSize);
} }
return int_tab != NULL; return int_tab != NULL;
} }

Binary file not shown.

View File

@ -121,10 +121,9 @@ CommandCount=6
[DLG:IDD_STATUS] [DLG:IDD_STATUS]
Type=1 Type=1
Class=CStatusDlg Class=CStatusDlg
ControlCount=3 ControlCount=2
Control1=IDOK,button,1342242817 Control1=IDOK,button,1342242817
Control2=IDC_STATIC,static,1342308352 Control2=IDC_GRID,{A8C3B720-0B5A-101B-B22E-00AA0037B2FC},1342242816
Control3=IDC_USERS,edit,1350633600
[CLS:CStatusDlg] [CLS:CStatusDlg]
Type=0 Type=0

View File

@ -60,6 +60,7 @@ BOOL CFrontEndApp::InitInstance()
#else #else
Enable3dControlsStatic(); // Call this when linking to MFC statically Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif #endif
AfxEnableControlContainer();
LoadStdProfileSettings(0); // Load standard INI file options (including MRU) LoadStdProfileSettings(0); // Load standard INI file options (including MRU)

View File

@ -168,15 +168,14 @@ BEGIN
LTEXT "Physical memory",IDC_PHYSICAL_MEM,49,38,119,9,SS_SUNKEN LTEXT "Physical memory",IDC_PHYSICAL_MEM,49,38,119,9,SS_SUNKEN
END END
IDD_STATUS DIALOGEX 0, 0, 186, 69 IDD_STATUS DIALOG DISCARDABLE 0, 0, 186, 122
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Stato del sistema" CAPTION "Utenti del sistema"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,68,48,50,14 DEFPUSHBUTTON "OK",IDOK,68,101,50,14
LTEXT "Numero di utenti",IDC_STATIC,7,7,111,8 CONTROL "",IDC_GRID,"{A8C3B720-0B5A-101B-B22E-00AA0037B2FC}",
EDITTEXT IDC_USERS,136,7,43,12,ES_AUTOHSCROLL | ES_READONLY, WS_TABSTOP,7,7,172,84
WS_EX_RIGHT
END END
@ -244,12 +243,34 @@ BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 179 RIGHTMARGIN, 179
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 62 BOTTOMMARGIN, 115
END END
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
IDD_STATUS DLGINIT
BEGIN
IDC_GRID, 0x376, 164, 0
0x0024, 0x0000, 0x0041, 0x0036, 0x0044, 0x0041, 0x0038, 0x0035, 0x0038,
0x0030, 0x002d, 0x0035, 0x0039, 0x0044, 0x0036, 0x002d, 0x0031, 0x0030,
0x0031, 0x0042, 0x002d, 0x0041, 0x0033, 0x0043, 0x0039, 0x002d, 0x0030,
0x0038, 0x0030, 0x0030, 0x0032, 0x0042, 0x0032, 0x0046, 0x0034, 0x0039,
0x0046, 0x0042, 0x0000, 0x0001, 0x1aaa, 0x0000, 0x0e29, 0x0000, 0x004d,
0x0000, 0x0000, 0x0080, 0xffff, 0x00ff, 0x0300, 0xe352, 0x910b, 0xce8f,
0x9d11, 0x00e3, 0x00aa, 0xb84b, 0x0151, 0x0000, 0x9000, 0x4401, 0x0142,
0x0d00, 0x534d, 0x5320, 0x6e61, 0x2073, 0x6553, 0x6972, 0x0166, 0x0001,
0x0002, 0x0002, 0x0001, 0x0001, 0x0002, 0x0101, 0x0000, 0x0100, 0x0000,
0x00ff,
0
END
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// String Table // String Table

View File

@ -6,7 +6,6 @@
#include "FrontEnd.h" #include "FrontEnd.h"
#include "FrontDoc.h" #include "FrontDoc.h"
#include "FrontVw.h" #include "FrontVw.h"
#include "Server.h"
#include "StatDlg.h" #include "StatDlg.h"
#include "Tracing.h" #include "Tracing.h"
@ -121,7 +120,6 @@ void CFrontEndView::OnUpdateViewTrace(CCmdUI* pCmdUI)
void CFrontEndView::OnViewStatus() void CFrontEndView::OnViewStatus()
{ {
CStatusDlg dlg(this); CStatusDlg dlg(this);
dlg.m_nUsers = GetServer().Connections();
dlg.DoModal(); dlg.DoModal();
} }

View File

@ -13,6 +13,7 @@
#define IDC_PHYSICAL_MEM 1005 #define IDC_PHYSICAL_MEM 1005
#define IDC_DISK_SPACE 1006 #define IDC_DISK_SPACE 1006
#define IDC_USERS 1008 #define IDC_USERS 1008
#define IDC_GRID 1009
#define stc32 0x045f #define stc32 0x045f
#define ID_BUTTON32772 32772 #define ID_BUTTON32772 32772
#define ID_VIEW_TRACE 32773 #define ID_VIEW_TRACE 32773
@ -23,9 +24,9 @@
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 133 #define _APS_NEXT_RESOURCE_VALUE 134
#define _APS_NEXT_COMMAND_VALUE 32778 #define _APS_NEXT_COMMAND_VALUE 32778
#define _APS_NEXT_CONTROL_VALUE 1009 #define _APS_NEXT_CONTROL_VALUE 1010
#define _APS_NEXT_SYMED_VALUE 105 #define _APS_NEXT_SYMED_VALUE 105
#endif #endif
#endif #endif

View File

@ -3,6 +3,24 @@
#include "hlapi_c.h" #include "hlapi_c.h"
#define EYECAST (Word DATAFAR_ *) #define EYECAST (Word DATAFAR_ *)
extern "C"
{
#include "skeytsr.h"
}
static KEY_NET _Eutron;
#pragma pack(1)
struct TEutronHeader
{
char _serno[8];
unsigned short _year_assist;
unsigned short _max_users;
unsigned long _last_date;
unsigned long _scad_date;
unsigned long _checksum; // Must be the last item!
};
#pragma pack()
#include "connect.h" #include "connect.h"
#include "server.h" #include "server.h"
#include "tracing.h" #include "tracing.h"
@ -13,6 +31,8 @@
static char THIS_FILE[] = __FILE__; static char THIS_FILE[] = __FILE__;
#endif #endif
// @doc INTERNAL // @doc INTERNAL
// @rdesc Ritorna il valore corrispondente alla chiave appartenente // @rdesc Ritorna il valore corrispondente alla chiave appartenente
@ -45,83 +65,58 @@ static CString GetIniString(LPCSTR sec, // @parm Sezione
return tmp; return tmp;
} }
#define HLBLOCK 1 // @doc EXTERNAL
unsigned short THardlockServer::GetSer() // @func Permette di criptare una parola
//
// @rdesc Ritorna la stringa criptata
const char* Encode(
const char* strin, // @parm Stringa da criptare
char* strout) // @parm Stringa criptata
// @xref <f decode>
{ {
_SerNo = 0xFFFF; const char * const encryption_key = "QSECOFR-";
for (int i = 0; strin[i]; i++)
if (HL_AVAIL() == STATUS_OK) strout[i] = strin[i] + (i < 8 ? encryption_key[i] : strin[i-8]);
{ strout[i] = '\0';
Word Val[4] = { 0, 0, 0, 0 }; return strout;
HL_READ(0, EYECAST &Val[0]);
HL_READ(1, EYECAST &Val[1]);
HL_READ(2, EYECAST &Val[2]);
HL_READ(3, EYECAST &Val[3]);
HL_CODE(EYECAST Val, HLBLOCK);
if (Val[0] == 0xFAE8)
_SerNo = Val[1];
else
_SerNo = 0;
}
Trace(-1, "Hardlock serial number is %s: %d",
(_SerNo == 0xFFFF) ? "Bad" : "OK", (int)_SerNo);
return _SerNo;
} }
unsigned short THardlockServer::GetUsers()
BOOL TDongleServer::ReadEutronWords(unsigned short reg,
unsigned short num,
unsigned short* data)
{ {
_Users = 0; ASSERT(num > 0 && num <= 16);
_AssistanceYear = 0; _Eutron.net_command = NET_KEY_ACCESS;
if (_SerNo == 0) memcpy(&_Eutron.command, BLOCK_READING_MODE, 2);
{ unsigned short* pointer = (unsigned short*)(&_Eutron.data[0]);
_Users = 4; unsigned short* number = (unsigned short*)(&_Eutron.data[2]);
_AssistanceYear = 1998; *pointer = reg;
} *number = num;
else smartlink(&_Eutron);
{ BOOL ok = _Eutron.status == ST_OK;
if (_SerNo != 0xFFFF) if (ok)
{ memcpy(data, &_Eutron.data[4], num*2);
Word Val[4] = { 0, 0, 0, 0 }; return ok;
HL_READ(60, EYECAST &Val[0]);
HL_READ(61, EYECAST &Val[1]);
HL_READ(62, EYECAST &Val[2]);
HL_READ(63, EYECAST &Val[3]);
HL_CODE(Val, HLBLOCK);
_AssistanceYear = Val[0];
_Users = Val[1];
}
}
Trace(-1, "Assistance Year is %d", (int)_AssistanceYear);
Trace(-1, "Maximum number of users is %d", (int)_Users);
return _Users;
} }
BOOL THardlockServer::GetAut() BOOL TDongleServer::ReadHardlockWords(unsigned short reg,
unsigned short num,
unsigned short* data)
{ {
if (_SerNo == 0xFFFF) BOOL ok = HL_AVAIL() == STATUS_OK;
return FALSE; if (ok)
{
if (_SerNo == 0) for (unsigned short n = 0; n < num; n++)
return TRUE; HL_READ(reg+n, EYECAST &data[n]);
}
HL_READ(48, EYECAST &_int_tab[0]); return ok;
HL_READ(49, EYECAST &_int_tab[1]);
HL_READ(50, EYECAST &_int_tab[2]);
HL_READ(51, EYECAST &_int_tab[3]);
HL_CODE(_int_tab, HLBLOCK);
for (int i = 0; i < 4; i++)
_int_tab[i] ^= _SerNo;
if (_int_tab[3])
return(FALSE);
return TRUE;
} }
BOOL THardlockServer::Login() const
BOOL TDongleServer::HardlockLogin()
{ {
const char* const REFKEY = "CAMPOKEY"; const char* const REFKEY = "CAMPOKEY";
const char* const VERKEY = "ìpÙˆ¬cê<"; const char* const VERKEY = "ìpÙˆ¬cê<";
@ -131,18 +126,139 @@ BOOL THardlockServer::Login() const
const int status = HL_LOGIN(26952, LOCAL_DEVICE, ref, ver); const int status = HL_LOGIN(26952, LOCAL_DEVICE, ref, ver);
Trace(-1, "Hardlock login %s: %d", Trace(-1, "Login Hardlock %s: %d",
status == STATUS_OK ? "OK" : "Failed", status); status == STATUS_OK ? "OK" : "FALLITO", status);
_SerNo = 0xFFFF;
if (status == STATUS_OK)
{
Word Val[4] = { 0, 0, 0, 0 };
ReadHardlockWords(0, 4, Val);
HL_CODE(EYECAST Val, 1);
if (Val[0] == 0xFAE8)
_SerNo = Val[1];
else
_SerNo = 0;
if (_SerNo != 0)
{
ReadHardlockWords(60, 4, Val);
HL_CODE(EYECAST Val, 1);
_AssistanceYear = Val[0];
_Users = Val[1];
int index = 0;
for (unsigned short reg = 48; reg < 60; reg += 4)
{
ReadHardlockWords(reg, 4, Val);
HL_CODE(EYECAST Val, 1);
memcpy(&_int_tab[index], Val, 3);
index += 3;
}
}
}
return status == STATUS_OK; return status == STATUS_OK;
} }
void THardlockServer::Logout() const BOOL TDongleServer::EutronLogin()
{ {
HL_LOGOUT(); BOOL ok = FALSE;
memset(&_Eutron, 0, sizeof(_Eutron));
_Eutron.net_command = NET_KEY_OPEN;
const char* labels[2] = { "AGA.CAMPO", "2699DP" };
for (int k = 0; k < 2; k++)
{
memset(_Eutron.label, 0, LABEL_LENGTH);
memcpy(_Eutron.label, labels[k], strlen(labels[k]));
memset(_Eutron.password, 0, PASSWORD_LENGTH);
if (k == 0)
{
char pwd[PASSWORD_LENGTH];
Encode(labels[k], pwd);
memcpy(_Eutron.password, pwd, strlen(pwd));
}
smartlink(&_Eutron);
ok = _Eutron.status == ST_OK;
if (ok)
{
if (k == 1)
_SerNo = 0;
break;
}
}
Trace(-1, "Login Eutron %s: %d",
ok ? "OK" : "FALLITO", _Eutron.status);
if (ok && _SerNo != 0)
{
TEutronHeader eh;
if (ReadEutronWords(0, sizeof(TEutronHeader)/2, (unsigned short*)&eh))
{
char serno[16];
strncpy(serno, eh._serno, 8);
serno[8] = '\0';
_SerNo = (unsigned long)atol(serno);
if (eh._max_users > 0)
{
_Users = eh._max_users;
_AssistanceYear = eh._year_assist;
ReadEutronWords(16, 16, _int_tab);
}
}
}
return _Eutron.status == ST_OK;
} }
BOOL THardlockServer::OnConnect(const CString& topic)
BOOL TDongleServer::Login()
{
BOOL ok = HardlockLogin() || EutronLogin();
if (ok)
{
if (_SerNo == 0 || _Users == 0)
{
const CTime tNow = CTime::GetCurrentTime();
_AssistanceYear = tNow.GetYear();
if (_SerNo == 0)
{
_Users = 4;
memset(_int_tab, 0xFF, sizeof(_int_tab));
}
else
{
_Users = 1;
memset(_int_tab, 0x00, sizeof(_int_tab));
}
}
Trace(-1, "Numero di serie %u", _SerNo);
Trace(-1, "Anno assistenza %u", _AssistanceYear);
Trace(-1, "Numero utenti %u", _Users);
}
return ok;
}
void TDongleServer::Logout()
{
if (_Eutron.label[0])
{
_Eutron.net_command = NET_KEY_CLOSE;
smartlink(&_Eutron);
}
else
{
HL_LOGOUT();
}
_SerNo = 0xFFFF;
_Users = 0;
_AssistanceYear = 0;
memset(_int_tab, 0, sizeof(_int_tab));
}
BOOL TDongleServer::OnConnect(const CString& topic)
{ {
BOOL ok = Connections() <= MaxUsers(); BOOL ok = Connections() <= MaxUsers();
if (!ok) if (!ok)
@ -151,7 +267,7 @@ BOOL THardlockServer::OnConnect(const CString& topic)
} }
TConnection* THardlockServer::OnCreateConnection(DWORD id) TConnection* TDongleServer::OnCreateConnection(DWORD id)
{ {
TConnection* c = NULL; TConnection* c = NULL;
if (Connections() <= MaxUsers()) if (Connections() <= MaxUsers())
@ -164,36 +280,33 @@ TConnection* THardlockServer::OnCreateConnection(DWORD id)
return c; return c;
} }
BOOL THardlockServer::OnRemoveConnection(DWORD id) BOOL TDongleServer::OnRemoveConnection(DWORD id)
{ {
Trace(0, "Disconnecting %lu", id); Trace(0, "Disconnecting %lu", id);
return BASE_SERVER::OnRemoveConnection(id); return BASE_SERVER::OnRemoveConnection(id);
} }
THardlockServer::THardlockServer() TDongleServer::TDongleServer()
: BASE_SERVER("HARDLOCK") : BASE_SERVER("DONGLE")
{ {
_SerNo = 0xFFFF; _SerNo = 0xFFFF;
_int_tab[0] = 0xFFFF; _Users = 0;
_int_tab[1] = 0xFFFF; _AssistanceYear = 0;
_int_tab[2] = 0xFFFF; memset(_int_tab, 0, sizeof(_int_tab));
_int_tab[3] = 0x0000;
Login(); Login();
GetSer();
GetUsers();
} }
THardlockServer::~THardlockServer() TDongleServer::~TDongleServer()
{ {
Logout(); if (_SerNo != 0xFFFF)
Logout();
} }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// Start/Stop server // Start/Stop server
static THardlockServer* pDDE = NULL; static TDongleServer* pDDE = NULL;
BOOL StopServer() BOOL StopServer()
{ {
@ -206,7 +319,7 @@ BOOL StopServer()
return ok; return ok;
} }
THardlockServer& GetServer() TDongleServer& GetServer()
{ {
ASSERT(pDDE); ASSERT(pDDE);
return *pDDE; return *pDDE;
@ -216,7 +329,7 @@ BOOL StartServer()
{ {
BOOL ok = pDDE == NULL; BOOL ok = pDDE == NULL;
if (ok) if (ok)
pDDE = new THardlockServer; pDDE = new TDongleServer;
return ok; return ok;
} }

View File

@ -14,24 +14,27 @@
#endif #endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// THardlockServer // TDongleServer
class THardlockServer : public BASE_SERVER class TDongleServer : public BASE_SERVER
{ {
enum { MAX_MODULES = 48 }; enum { MAX_MODULES = 256 };
unsigned short _SerNo, _Users, _AssistanceYear, _int_tab[4]; unsigned int _SerNo, _Users, _AssistanceYear;
unsigned short _int_tab[MAX_MODULES/16];
protected: protected:
virtual BOOL OnConnect(const CString& topic); virtual BOOL OnConnect(const CString& topic);
virtual TConnection* OnCreateConnection(DWORD id); virtual TConnection* OnCreateConnection(DWORD id);
virtual BOOL OnRemoveConnection(DWORD id); virtual BOOL OnRemoveConnection(DWORD id);
BOOL Login() const; BOOL HardlockLogin();
void Logout() const; BOOL EutronLogin();
unsigned short GetSer(); BOOL Login();
unsigned short GetUsers(); void Logout();
BOOL GetAut();
BOOL ReadHardlockWords(unsigned short reg, unsigned short num, unsigned short* data);
BOOL ReadEutronWords(unsigned short reg, unsigned short num, unsigned short* data);
public: public:
unsigned short SerialNumber() const unsigned short SerialNumber() const
@ -40,18 +43,18 @@ public:
unsigned short AssistanceYear() const unsigned short AssistanceYear() const
{ return _AssistanceYear; } { return _AssistanceYear; }
const unsigned short* Authorizations() const unsigned short* Authorizations(unsigned short& nSize) const
{ return GetAut() ? _int_tab : NULL; } { nSize = sizeof(_int_tab); return _int_tab; }
unsigned short MaxUsers() const unsigned short MaxUsers() const
{ return _Users; } { return _Users; }
THardlockServer(); TDongleServer();
virtual ~THardlockServer(); virtual ~TDongleServer();
}; };
BOOL StartServer(); BOOL StartServer();
THardlockServer& GetServer(); TDongleServer& GetServer();
BOOL StopServer(); BOOL StopServer();
#endif #endif

View File

@ -2,8 +2,10 @@
// //
#include "stdafx.h" #include "stdafx.h"
#include "Connect.h"
#include "FrontEnd.h" #include "FrontEnd.h"
#include "StatDlg.h" #include "StatDlg.h"
#include "Server.h"
#ifdef _DEBUG #ifdef _DEBUG
#define new DEBUG_NEW #define new DEBUG_NEW
@ -19,7 +21,6 @@ CStatusDlg::CStatusDlg(CWnd* pParent /*=NULL*/)
: CDialog(CStatusDlg::IDD, pParent) : CDialog(CStatusDlg::IDD, pParent)
{ {
//{{AFX_DATA_INIT(CStatusDlg) //{{AFX_DATA_INIT(CStatusDlg)
m_nUsers = 0;
//}}AFX_DATA_INIT //}}AFX_DATA_INIT
} }
@ -28,16 +29,54 @@ void CStatusDlg::DoDataExchange(CDataExchange* pDX)
{ {
CDialog::DoDataExchange(pDX); CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CStatusDlg) //{{AFX_DATA_MAP(CStatusDlg)
DDX_Text(pDX, IDC_USERS, m_nUsers); DDX_Control(pDX, IDC_GRID, m_grid);
//}}AFX_DATA_MAP //}}AFX_DATA_MAP
} }
BEGIN_MESSAGE_MAP(CStatusDlg, CDialog) BEGIN_MESSAGE_MAP(CStatusDlg, CDialog)
//{{AFX_MSG_MAP(CStatusDlg) //{{AFX_MSG_MAP(CStatusDlg)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP //}}AFX_MSG_MAP
END_MESSAGE_MAP() END_MESSAGE_MAP()
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CStatusDlg message handlers // CStatusDlg message handlers
static int AddConnectionToGrid(TConnection& conn, void* pJolly)
{
const TPrassiConnection& user = (const TPrassiConnection&)conn;
CGridCtrl* pGrid = (CGridCtrl*)pJolly;
int nPos = pGrid->GetRow()+1;
pGrid->SetRow(nPos);
pGrid->SetCol(0);
CString str; str.Format("%d", nPos);
pGrid->SetText(str);
pGrid->SetCol(1);
pGrid->SetText(user.User());
return 1;
}
BOOL CStatusDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_grid.SetColWidth(1, 4100);
m_grid.SetRow(0);
m_grid.SetCol(0);
m_grid.SetText("N.");
m_grid.SetCol(1);
m_grid.SetText("Name");
TDongleServer& srv = GetServer();
const int nUsers = srv.Connections();
if (nUsers > 0)
{
m_grid.SetRows(nUsers+1);
srv.ForEachConnection(AddConnectionToGrid, &m_grid);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

View File

@ -3,6 +3,9 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CStatusDlg dialog // CStatusDlg dialog
//{{AFX_INCLUDES()
#include "gridctrl.h"
//}}AFX_INCLUDES
class CStatusDlg : public CDialog class CStatusDlg : public CDialog
{ {
@ -13,7 +16,7 @@ public:
// Dialog Data // Dialog Data
//{{AFX_DATA(CStatusDlg) //{{AFX_DATA(CStatusDlg)
enum { IDD = IDD_STATUS }; enum { IDD = IDD_STATUS };
UINT m_nUsers; CGridCtrl m_grid;
//}}AFX_DATA //}}AFX_DATA
@ -29,7 +32,7 @@ protected:
// Generated message map functions // Generated message map functions
//{{AFX_MSG(CStatusDlg) //{{AFX_MSG(CStatusDlg)
// NOTE: the ClassWizard will add member functions here virtual BOOL OnInitDialog();
//}}AFX_MSG //}}AFX_MSG
DECLARE_MESSAGE_MAP() DECLARE_MESSAGE_MAP()
}; };