Create the Handlers for the Dialog

To create handlers for the MFC dialog

  1. Open the AsdkAcUiDialogSample.cpp source file in the editor.
  2. At the top of the AsdkAcUiDialogSample::OnInitDialog() function definition, set the dialog's name, and then call the parent class version of OnInitDialog():
SetDialogName("AsdkAcUiSample:AsdkAcUiDialog");
CAcUiDialog::OnInitDialog();

Change the constructor's initialization list to also initialize CAcUiDialog:

AsdkAcUiDialogSample::AsdkAcUiDialogSample
(CWnd* pParent /*=NULL*/) 
: CAcUiDialog(AsdkAcUiDialogSample::IDD, pParent)

Add message handlers for the IDC_BUTTON_ANGLE, IDC_BUTTON_POINT, IDC_COMBO_REGAPPS, IDC_EDIT_ANGLE, and IDC_EDIT_nPOINT resources. The handlers should be mapped as follows:

Message handlers 

 

Handler Function

Resource ID

Message

OnButtonAngle

IDC_BUTTON_ANGLE

BN_CLICKED

OnButtonPoint

IDC_BUTTON_POINT

BN_CLICKED

OnKillfocusComboRegapps

IDC_COMBO_REGAPPS

CBN_KILLFOCUS

OnKillfocusEditAngle

IDC_EDIT_ANGLE

EN_KILLFOCUS

OnKillfocusEditXpt

IDC_EDIT_XPOINT

EN_KILLFOCUS

OnKillfocusEditYpt

IDC_EDIT_YPOINT

EN_KILLFOCUS

OnKillfocusEditZpt

IDC_EDIT_ZPOINT

EN_KILLFOCUS