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



Добавьте Код к Обработчикам - часть 5


{ IDC_COMBO_REGAPPS, ELASTICX, 20 },

{ IDC_STATIC_TEXT3,MOVEY, 100 },

{ IDC_STATIC_TEXT3,ELASTICX, 20 },

{ IDOK,MOVEX, 100 },

{ IDCANCEL, MOVEX, 100 },

};

const DWORD numberofentries =

sizeof dlgSizeInfo / sizeof DLGCTLINFO;

SetControlProperty(dlgSizeInfo, numberofentries);

// Must be within a 100-unit cube centered about 0,0,0.

//

m_ctrlXPtEdit.SetRange(-50.0, 50.0);

m_ctrlYPtEdit.SetRange(-50.0, 50.0);

m_ctrlZPtEdit.SetRange(-50.0, 50.0);

// Must be between 0 and 90 degrees.

//

m_ctrlAngleEdit.SetRange(0.0, 90.0 /*(PI/2.0)*/);

// Assign a title for the dialog.

//

SetWindowText("AcUiDialog Sample");

// Load the default bitmaps.

//

m_ctrlPickButton.AutoLoad();

m_ctrlAngleButton.AutoLoad();

// Get and display the preserved data from the registry.

//

if (!GetDialogData("ANGLE", m_strAngle))

m_strAngle = "0.0";

if (!GetDialogData("POINTX", m_strXPt))

m_strXPt = "0.0";

if (!GetDialogData("POINTY", m_strYPt))

m_strYPt = "0.0";

if (!GetDialogData("POINTZ", m_strZPt))

m_strZPt = "0.0";

DisplayPoint();

DisplayAngle();

DisplayBlocks();

DisplayRegApps();

return TRUE; // return TRUE unless you set the focus to a control

}




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