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?
void CMyProgramDlg::OnEditCopy(
{
CEdit::Copy;
}
The button doesn't work. Any suggestions?
try something like, where IDC_EDIT1 is an edit control in your dialog.
void CMyProgramDlg::OnEditCopy( )
{
CEdit* pEdit = GetDlgItem(IDC_EDIT1) ;
pEdit->Copy() ;
}
void CMyProgramDlg::OnEditCopy(
{
CEdit* pEdit = GetDlgItem(IDC_EDIT1) ;
pEdit->Copy() ;
}
ASKER
I am using a Dialog Based Application
ASKER
I am using a Dialog Based Application
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER