Ejemplo n.º 1
0
BOOL COptionTreeItemEdit::GetEditDword(DWORD &dwReturn)
{
	// Declare variables
	CString strWindowText;

	// Set blank
	dwReturn = 0;

	// Get window text
	if (IsWindow(GetSafeHwnd()))
	{
		GetWindowText(strWindowText);
	}
	else
	{
		return FALSE;
	}

	// First see if we are in numerical mode
	if (GetOption(OT_EDIT_NUMERICAL) == FALSE)
	{
		return FALSE;
	}

	// See if string is numeric
	if (IsStringNumeric(strWindowText) == FALSE)
	{
		return FALSE;
	}

	// Convert string
	dwReturn = (DWORD) _tstoi(strWindowText);

	return TRUE;
}
Ejemplo n.º 2
0
// Writes the path for all the open tables. For example, "table01[table02][table03]"
void WriteScriptDescriptor::_WriteTablePath() {
	if (_open_tables.empty()) {
		_error_messages << "* WriteScriptDescriptor::_WriteTablePath() failed because there were no "
			<< "tables open" << std::endl;
		return;
	}

	_outfile << _open_tables[0];
	for (uint32 i = 1; i < _open_tables.size(); i++) {
		if (IsStringNumeric(_open_tables[i]))
			_outfile << '[' << _open_tables[i] << ']';
		else
			_outfile << '.' << _open_tables[i];
	}
}