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

    MFC, dynamically create a windows control

    Hi, Im a beginner of MFC(and programmation), Can someone tell me how to create dynamically a window control (like a editbox, or a Button) without using a .rc file. Thanks


  2. #2
    Guest

    Re: MFC, dynamically create a windows control

    Something along these lines

    CButton *pNewButton;

    pNewButton = new CButton;

    pNewButton->Create( ... ); // insert needed parameters in place of ...

    I would recommend making the pNewButton a private member variable of the class you create it in so you may access it later.



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