Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Shannon Barber

UpdateData()

This topic is 6499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
hehe
not only did I know the answer to this, i had already written the code to do it... i was just calling updatedate for no reason

    
DWORD now = clock();
DWORD elapsed = now - timesnap;
timesnap = now;
CStatic* fr = (CStatic*)GetDlgItem(IDC_STATIC_CLOCK);
char stemp[80];
itoa(elapsed,stemp,10);
CString str("Elapsed: ");
str += stemp + CString("ms");
itoa(timer,stemp,10);
str += CString(" Delay: ") + stemp + CString("ms");
fr->SetWindowText(str);
//UpdateData(false);

Share this post


Link to post
Share on other sites
The correct method of doing this depends on the control you are updating. For instance, SetWindowText is a method to update edit control text without calling OnUpdate, but to update a CComboBox you would probably use SetCurSel or SetEditSel. Reference MSDN help for the item you wish to explicitly update.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!