Solved

Newbie Question!

Posted on 2001-06-15
2
141 Views
Last Modified: 2013-11-20
Hi,

I am new to MFC and VC.

Just playing around with the Class Wizzard and resource editor.

What i want is to be able to responsd to a button press changing a piece of static text.

I have seup a member varible for DDX with the static text.

When the dialog is show the Static text is initially blank?

And when i set the member varible in reponse to a button been clicked there is no change.

Anyone know where i am going wrong??

Thanks

Rich

0
Comment
Question by:RichJackson
2 Comments
 
LVL 4

Accepted Solution

by:
aponcealbuerne earned 20 total points
ID: 6196201
call UpdateData(FALSE);
hope helps...
0
 
LVL 3

Expert Comment

by:GlennDean
ID: 6197275
UpdateData(FALSE) is right.  
Your handler for the button should look something like

void CMyDlg::OnButton1()
{
  m_Text="Hi World";  //Added m_Text DDX variable for static text
  UpdateData(FALSE);
}
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

17 Experts available now in Live!

Get 1:1 Help Now