CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    27

    how to create buttons during runtime

    I want to create buttons during runtime.... the number of buttons may vary... but how can I create them on my dialog ??

  2. #2
    Join Date
    Dec 2002
    Posts
    47
    Use CreateWindow with a window class of "button". Pass the dialog window's HWND as the parent window to the button. You will likely need to make the dialog window resizeable to accomodate a large number of buttons.

    Of course, instead of a dialog, you could just create your own frame or popup window and host the button controls there.

    -rick

  3. #3
    Join Date
    Feb 2002
    Posts
    5,757
    Furthermore, define the ID for the controls at compile-time.

    Kuphryn

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