Link to home
Start Free TrialLog in
Avatar of BerMuDa
BerMuDa

asked on

ID_EDIT_COPY

I created a button and selected ID_EDIT_COPY, then i added the following code to its handler

void CMyProgramDlg::OnEditCopy()
{
     CEdit::Copy;
}

The button doesn't work. Any suggestions?
Avatar of BerMuDa
BerMuDa

ASKER

I am using a Dialog Based Application
try something like, where IDC_EDIT1 is an edit control in your dialog.

void CMyProgramDlg::OnEditCopy()
{
  CEdit* pEdit = GetDlgItem(IDC_EDIT1) ;
  pEdit->Copy() ;
}
Avatar of BerMuDa

ASKER

I am using a Dialog Based Application
Avatar of BerMuDa

ASKER

I am using a Dialog Based Application
Avatar of BerMuDa

ASKER

Got this error:

error C2440: 'initializing' : cannot convert from 'class CWnd *' to 'class CEdit *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
ASKER CERTIFIED SOLUTION
Avatar of Priyesh
Priyesh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial