?
Solved

ID_EDIT_COPY

Posted on 2003-02-25
6
Medium Priority
?
754 Views
Last Modified: 2013-11-20
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?
0
Comment
Question by:BerMuDa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:BerMuDa
ID: 8022335
I am using a Dialog Based Application
0
 
LVL 9

Expert Comment

by:Priyesh
ID: 8022341
try something like, where IDC_EDIT1 is an edit control in your dialog.

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

Author Comment

by:BerMuDa
ID: 8022369
I am using a Dialog Based Application
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 

Author Comment

by:BerMuDa
ID: 8022385
I am using a Dialog Based Application
0
 

Author Comment

by:BerMuDa
ID: 8022400
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
0
 
LVL 9

Accepted Solution

by:
Priyesh earned 80 total points
ID: 8022421
type case it using

CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT1) ;

Copy function sends messages to the control, so the typecast does not give you no problems.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question