ObjectARX, AutoCAD. Среда программирования библиотеки C++


         

Here is where we register


break;

default:

break;

}

return AcRx::kRetOK;

}

void initApp()

{

InitMFC();

// Do other initialization tasks here.

acedRegCmds->addCommand(

"MYARXAPP",

"MYARXAPP",

"MYARXAPP",

ACRX_CMD_MODAL,

&MyArxAppCreate);

// Here is where we register the fact that we want to add

// a tab to the PREFERENCES dialog.

acedRegisterExtendedTab("MYARXAPP.ARX", "PREFERENCES");

}

// CMyTab1 is subclassed from CAcUiTabExtension.

static CMyTab1* pTab1;

void addMyTabs(CAcUiTabExtensionManager* pXtabManager)

{

// Allocate an extended tab if it has not been done already

// and add it through the CAcUiTabExtensionManager.

pTab1 = new CMyTab1;

pXtabManager->AddTab(_hdllInstance, IDD_TAB1,

"My Tab1", pTab1);

// If the main dialog is resizable, add your control

// resizing directives here.

pTab1->StretchControlXY(IDC_EDIT1, 100, 100);

}

Тогда для CMYTAB1 выполнения класса:

void CMyTab1::PostNcDestroy()

// Override to delete added tab.

{

delete pTab1;

pTab1 = NULL;

CAcUiTabExtension::PostNcDestroy();

}


Содержание  Назад  Вперед