Solved

talk between dialog boxes

Posted on 2000-02-22
2
164 Views
Last Modified: 2013-11-20
I have an edit box IDC_MYEDIT on one dialog and i want to use SetDlgItemText() from another Class i created for a button so on the mousemove for the button it will put text in the edit box. how do i do it?
0
Comment
Question by:bradsoblesky
2 Comments
 
LVL 8

Accepted Solution

by:
VinExpert earned 60 total points
ID: 2548954
Hi,

I assume that, that button is also in same dialog box. And U have a class for that button.

Do like this whenever u want to set the text.

((CMyDlgClass *)GetParent())->SetDlgItemText(IDC_MYEDIT, "Hi");

here CMyDlgClass is the dialog class and u have to include the .h file of that to the button class.

Hope this helps.
VinExpert
0
 

Author Comment

by:bradsoblesky
ID: 2548988
rock on man,thanks for the perfect and quick answer!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now