How to use CEdit Control variable updated from a tab to the dialog box ? - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17

Thread: How to use CEdit Control variable updated from a tab to the dialog box ?

  1. #16
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,556

    Re: How to use CEdit Control variable updated from a tab to the dialog box ?

    IMO it's good practice to define the number of elements in a fixed size array (even those created via new) as constants (const int) near the top of the program and then use these constants when the array is defined and iterated (use < rather than <=). That way you stand less chance of accessing (and modifying!) non-existent array elements. It also makes it easier to see what are the sizes of arrays without having to trawl through the program trying to find them!

    IMO it is also not a good idea to allocate memory in one place and then have to remember to free it up somewhere else. Where possible use RAII and put allocation in the constructor and free in the destructor
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  2. #17
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,527

    Re: How to use CEdit Control variable updated from a tab to the dialog box ?

    Quote Originally Posted by Mendeln View Post
    I don't know either how to use debugger to find this bug.
    Make sure you are in Debug configuration.
    Place the cursor on your line:
    Code:
    GainExTimeF = SettingsTab.ModeCustom(k);
    and hit F5.
    When you "break" into debugger, use F11 to step into the function or F10 - to step over.
    See how far you get...
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center