WorksheetControl::Attach

Description

Attach a worksheet to this control

Syntax

BOOL Attach( LPCSTR lpcszWorksheetName )

Parameters

lpcszWorksheetName
worksheet name.

Return

TRUE for success.

Examples

EX1

#include <Dialog.h>
#define IDC_WORKSHEET 1001
//Origin workspace have at least one worksheet.
void WorksheetControl_Attach_ex(Dialog& dlg)
{
        WorksheetPage     wksPage = Project.WorksheetPages(0);
        Worksheet         wks = wksPage.Layers(0);
        string            strWksName = wks.GetName();
        WorksheetControl wc = dlg.GetItem(IDC_WORKSHEET);
        wc.Attach(strWksName);
        wc.Update();
}

Remark

See Also

header to Include

Control.h