Code: Select all
class CBarDlg : public CDialogBar
{
// Construction
public:
void DoSomething();
CBarDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CBarDlg)
enum { IDD = IDD_DIALOG_BAR };
CEdit m_Edit;
//}}AFX_DATA
...
}
Code: Select all
void CBarDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogBar::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CBarDlg)
DDX_Control(pDX, IDC_EDIT1, m_Edit);
//}}AFX_DATA_MAP
}
Code: Select all
void CBarDlg::DoSomething()
{
m_Edit.SetSel(0,-1);
}
Code: Select all
void CDialogBarTestView::OnHelpTest()
{
// TODO: Add your command handler code here
CBarDlg dlg;
dlg.DoSomething();
}
Am atasat si o mica aplicatie de test ...