Solved

talk between dialog boxes

Posted on 2000-02-22
2
163 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

760 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

19 Experts available now in Live!

Get 1:1 Help Now