Re: CSpinControl/CEdit relationship
From: Mkennedy1102 (Mkennedy1102_at_discussions.microsoft.com)
Date: 01/25/05
- Next message: Scott McPhillips [MVP]: "Re: Problem with CMutex"
- Previous message: selvam: "RE: How create a list control whit check box, in a Dialog ?"
- In reply to: David Lowndes: "Re: CSpinControl/CEdit relationship"
- Next in thread: David Lowndes: "Re: CSpinControl/CEdit relationship"
- Reply: David Lowndes: "Re: CSpinControl/CEdit relationship"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 Jan 2005 04:15:01 -0800
Actually that complexity is what Im banking on, there are several different
calculations that need to be redone based on the value of the int in that
edit, as well as several others, when one changes, they all need to be
recalculated.
"David Lowndes" wrote:
> >In an app im working on, I use a spin control to increment/decrement the int
> >in a CEdit. The int is part of a calculation that I want to recalc every
> >time the value changes. I wrote a function to call UpdateData(TRUE), then
> >manipulate the data accordingly, then call UpdateData(False) to update the
> >result in the window.
>
> I'd recommend that you ditch using UpdateData - it's a sledgehammer
> for what you want to do (get the edit control value and then update
> it). It's complexity (performs the DDX on all the controls of your
> dialog) will probably cause issues in anything but a trivial dialog.
> Instead, use GetDlgItemInt and SetDlgItemInt to read/write the edit
> control values.
>
> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq
>
- Next message: Scott McPhillips [MVP]: "Re: Problem with CMutex"
- Previous message: selvam: "RE: How create a list control whit check box, in a Dialog ?"
- In reply to: David Lowndes: "Re: CSpinControl/CEdit relationship"
- Next in thread: David Lowndes: "Re: CSpinControl/CEdit relationship"
- Reply: David Lowndes: "Re: CSpinControl/CEdit relationship"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|