CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Clear a dialog

  1. #1
    Join Date
    Apr 2005
    Posts
    33

    Clear a dialog

    Hello,

    Is there any way to clear the dialog completely, i.e. to clear all its fields (set them like they were when I've opened the dialog), instead of doing it manually for each control?

  2. #2
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Re: Clear a dialog

    what you means if you want to clear all the field on some button click then in Button click use the Handle of your all control Present on Dialog and initialize them .Like if some edit control Then you can use SetWindowText("") with the handle of your edit control same you can do with all comtrols. but remember you have to do all of these things manually.
    Thanx

  3. #3
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: Clear a dialog

    You could move the member variable initialization from the constructor into a seperate function, call it followed by UpdateData(FALSE).

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