WorksheetControl::GetColInfo

Description

Update the control

Syntax

BOOL GetColInfo( int nCol, int & nType, int & nDesignation )

Parameters

nCol
column index,
int nType = the column type. it can be following constants defined in OC_const.h
  1. define OKCOLTYPE_NUMERIC 0
  2. define OKCOLTYPE_TEXT 1
  3. define OKCOLTYPE_TIME 2
  4. define OKCOLTYPE_DATE 3
  5. define OKCOLTYPE_MONTH 4
  6. define OKCOLTYPE_WEEKDAY 5
  7. define OKCOLTYPE_COLUMN 6
  8. define OKCOLTYPE_DATASET 7
  9. define OKCOLTYPE_DATASET_X 8
  10. define OKCOLTYPE_TEXT_NUMERIC 9
  11. define OKCOLTYPE_CATEGORICAL 0x000A
int nDesignation = the column designation, it can be following values defined in OC_const.h
enum
{
nType
nDesignation

Return

TRUE for success.

Examples

EX1

#include <Dialog.h>
#define IDC_WORKSHEET 1001

// Assumes the current window is worksheet
void WorksheetControl_GetColInfo(Dialog& dlg)
{
        Worksheet wks = Project.ActiveLayer();
        string         strWksName = wks.GetName();
        WorksheetControl wc = dlg.GetItem(IDC_WORKSHEET);
        wc.Attach(strWksName);
        int nCol = 1;
        int nType;
        int nDesignation;
        ASSERT(wc.GetColInfo(nCol, nType, nDesignation));
}

Remark

See Also

header to Include

Control.h