Advertisement

UpdateData()

Started by October 02, 2000 11:14 PM
1 comment, last by Shannon Barber 24 years, 3 months ago
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
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
Advertisement
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. ~

This topic is closed to new replies.

Advertisement