CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    42

    Creating ctrls on the fly - generating unique control id

    In my app I have to generate CEdit controls on the fly. these controls need a controle ID. Is there a way to generate id's run-time?

    Martin van den Berg

    Martin van den Berg
    High Tech Automation
    The Netherlands
    [email protected]

  2. #2
    Join Date
    Jun 1999
    Location
    San Diego, CA
    Posts
    600

    Re: Creating ctrls on the fly - generating unique control id

    In your dynamically created CEdit Ctrl,
    after you create it, call the member function:
    SetDlgCtrlID(yourID);
    And it will work.
    This works for any child window.


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