result
CheckButtonForm::OnInitializing(void)
{
	BaseForm::OnInitializing();
	result r = E_SUCCESS;

	CheckButton* pCheckButton = static_cast <CheckButton*> (GetControl("IDC_CHECKBUTTON_DISABLE", true));
	pCheckButton->SetEnabled(false);

	return r;
}
result Enrollment::OnInitializing(void) {
	result r = E_SUCCESS;
	CheckButton* pCheckBtn = null;

	SetFormBackEventListener(this);

	__pSaveBtn = static_cast<Button*>(GetControl(IDC_SAVE));
	__pDate = static_cast<Label*>(GetControl(IDC_DATE));

	String cBtnName[] = { IDC_CHECKBUTTON_WORK1, IDC_CHECKBUTTON_WORK2,
			IDC_CHECKBUTTON_WORK3, IDC_CHECKBUTTON_WORK4 };

	for (int i = 0; i < MAX_WORK_COUNT; i++) {
		__pWorkList[i] = static_cast<CheckButton*>(GetControl(cBtnName[i]));
	}

	for (int i = 0; i < MAX_WORK_COUNT; i++) {
		pCheckBtn = dynamic_cast<CheckButton*>(GetControl(cBtnName[i]));
		TryReturn(pCheckBtn != null, E_SYSTEM,
				"Unable to get control [%ls]", cBtnName[i].GetPointer());
		pCheckBtn->SetEnabled(false);
		pCheckBtn->SetActionId(ID_WORK_1 + i, ID_WORK_1 + 500 + i);

		pCheckBtn->AddActionEventListener(*this);

	}

//!!!!!!!!!!!!!!!!!!!!!!!!!!!

	String btnName[] = { IDC_PILL_1, IDC_PILL_2, IDC_PILL_3, IDC_MEET, IDC_SAVE,
			IDC_DEL };

	Button* pButton = null;

	for (int i = 0; i < MAX_BTN_COUNT; i++) {
		pButton = dynamic_cast<Button*>(GetControl(btnName[i]));
		TryReturn(pButton != null, E_SYSTEM,
				"Unable to get control [%ls]", btnName[i].GetPointer());

		pButton->SetActionId(IDC_BUTTON_PILL_1 + i);
		pButton->AddActionEventListener(*this);
	}

	//!!!!!!!!!!!!!!!!!!!!!!!!!!!!

	__pForm = this;
	EnableControl(false);

	return r;
}