Re: CSpinControl/CEdit relationship

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mkennedy1102 (Mkennedy1102_at_discussions.microsoft.com)
Date: 01/25/05


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
>



Relevant Pages

  • Re: Need Help, Trying to learn WCF
    ... Right now I have a windows application that does some room calculations, ... is instead of use the roomrate class is send those 5 arguments to a ... [Operational Contract] ... int MyMethod ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Multithreading / Scalability
    ... int thread_number; ... catch (InterruptedException e) ... public static void main{ ... every increase in threads reduced the number of calculations that could be performed although again not as dramatically as I expected with the increase in number of threads. ...
    (comp.lang.java.programmer)
  • Re: Rounding error when converting from double to int
    ... the original double amount contains fractions of a cent (due to some ... interest calculations). ... then it converts to int. ...     else ...
    (comp.lang.c)
  • Re: Convert color-image to bw *fast*
    ... Float Function Call = 780 ms ... type for intermediate calculations. ... int stride = bmData.Stride; ... private double GetBrightnessDouble(int red, int green, int ...
    (microsoft.public.dotnet.framework.drawing)
  • =?iso-8859-1?q?Re:_For_Kim_G._S._=D8yhus?=
    ... >>> it was that bit which had the calculations. ... As far as Kolmogorov Complexity, let's look at the basic definition one ... When discussion a string of characters. ... This has a lot to do with chaos theory since the concept of randomness ...
    (talk.origins)