Skip to main content
GameDev.net gamedev.net
🔒 Locked

UpdateData()

Started by Shannon Barber Oct 2, 2000 at 11:14 PM 1 replies 250+ views
Original Post
Shannon Barber
Shannon Barber
Is there a way to update a dialog item in a CDialog (and on the screen) without calling UpdateData(false) ?
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Shannon Barber
Shannon Barber
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);
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
felisandria
felisandria
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.

~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.