|
#include "StdAfx.h"
#include ".\proptable.h"
#using <mscorlib.dll>
#include <tmschema.h>
#define TMT_ENUMDEF 8
#define TMT_ENUMVAL TEXT('A')
#define TMT_ENUM TEXT('B')
#define SCHEMA_STRINGS
#include "TmSchema.h"
using namespace System;
int PropTable::s_PropTableStart = -1;
PropTable::PropTable(void)
{
// the front part of the table contains a bunch of records that we don't use
// The first time through this code finds the first window class record
if ( s_PropTableStart == -1 )
{
const wchar_t szParts[] = L"PARTS";
const TMPROPINFO* pPropTable = GetSchemaInfo()->pPropTable;
int i = 0;
// Move past the items at the beginning of the file.
while ( ( i < GetSchemaInfo()->iPropCount ) && ( !wcsstr( pPropTable[i].pszName, szParts ) ) )
i++;
// if we didn't spin through the whole table remmber the position
if ( i < GetSchemaInfo()->iPropCount )
s_PropTableStart = i;
}
MASSERT( s_PropTableStart != -1 );
}
PropTable::~PropTable(void)
{
}
int PropTable::GetCount()
{
return GetSchemaInfo()->iPropCount;
}
const wchar_t* PropTable::GetPropTableEntry( int index )
{
MASSERT( index < GetSchemaInfo()->iPropCount );
const TMPROPINFO* pPropTable = GetSchemaInfo()->pPropTable;
return pPropTable[index].pszName;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
The first computer program I ever wrote was in BASIC on a TRS-80 Model I and it looked something like:
10 PRINT "Don is cool"
20 GOTO 10
It only went downhill from there.
Hey look, I've got a blog