// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CenterWindow(GetDesktopWindow()); // center to the hpc screen
// TODO: Add extra initialization here
((CListBox *)GetDlgItem(IDC_LIST1))->AddString(L"1");
((CListBox *)GetDlgItem(IDC_LIST1))->AddString(L"2");
((CListBox *)GetDlgItem(IDC_LIST1))->AddString(L"3");
((CListBox *)GetDlgItem(IDC_LIST1))->AddString(L"4");
((CListBox *)GetDlgItem(IDC_LIST1))->AddString(L"5");
return TRUE; // return TRUE unless you set the focus to a control
}
void CTestmfcDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CListBox *p = (CListBox *)GetDlgItem(IDC_LIST1);
TCHAR tmp[100];
p->GetText(p->GetCurSel(), tmp);