?
Solved

ID_EDIT_COPY

Posted on 2003-02-25
6
Medium Priority
?
777 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

621 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