다음을 통해 공유


ActiveX 컨트롤 컨테이너: ActiveX 컨트롤을 멤버 변수에 연결

The easiest way to access an ActiveX control from within its control container application is to associate the ActiveX control with a member variable of the dialog class that will contain the control.

참고

This is not the only way to access an embedded control from within a container class, but for the purposes of this article it is sufficient.

Adding a member variable to the dialog class

  1. From Class View, right-click the main dialog class to open the shortcut menu. 예를 들면 CContainerDlg와 같습니다.

  2. From the shortcut menu, click Add and then Add Variable.

  3. In the Add Member Variable Wizard, click Control variable.

  4. In the Control ID list box, select the control ID of the embedded ActiveX control. 예를 들면 IDC_CIRCCTRL1와 같습니다.

  5. In the Variable Name box, enter a name.

    예를 들면 m_circctl와 같습니다.

  6. Click Finish to accept your choices and exit the Add Member Variable Wizard.

참고 항목

개념

ActiveX 컨트롤 컨테이너