CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2011
    Location
    India
    Posts
    18

    Angry About Spin Control

    How to attach spin control to Edit Control which is designed in older version of the project, in MFC
    dialog box.

    The older version Edit Boxes are w/o spin controls .. and I need spin control now.

    What to do ?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: About Spin Control

    Either use a resource editor to add the spin control and set its properties like UDS_AUTOBUDDY, UDS_AUTOBUDDY and so on
    or create it dynamically using CSpinButtonCtrl::Create
    Victor Nijegorodov

  3. #3
    Join Date
    May 2011
    Location
    India
    Posts
    18

    Smile Re: About Spin Control

    Thank u Sir ..

    I have already tried that but with resource editor , I failed to attach it to required Edit Box.
    Now I will try dynamically

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: About Spin Control

    Define "I failed to attach it":what exactly failed?
    Victor Nijegorodov

  5. #5
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: About Spin Control

    I believe that for AUTOBUDDY to work the spin control must immediately follow edit control in the tab order.
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  6. #6
    Join Date
    May 2011
    Location
    India
    Posts
    18

    Smile Re: About Spin Control

    Sir ,
    what mr Vald has said is 100 % correct .

    U need to create Edit Control and then Spin Control with Auto buddy on . Then it is attached to
    the Edit Control.

    I have old dialog box with many Edit Controls in that and I need to attach Spin control to some
    of them as an additional feature.

    I tried hard to attach Spin afterwards .. not possible.

    Either I need to delete Edit Controls and put new ones with spin or altogether a new dialog box.

    I was just trying for any other simpler way.

  7. #7
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: About Spin Control

    You don't need to delete anything. Just add Spin controls and then change the Tab Order of the controls to let every spin follow the corresponding buddy edit control
    Victor Nijegorodov

  8. #8
    Join Date
    May 2011
    Location
    India
    Posts
    18

    Thumbs up Re: About Spin Control

    Thankx a lot sir .. for answering my simple query.

    I am learning VC++ on my own and working on the project.

    and always get a gr8 help from Net.

    Thank u once again

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured