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

Threaded View

  1. #1
    Join Date
    Oct 2010
    Location
    Australia
    Posts
    98

    [RESOLVED] Another Logic Question: Button Control Only To Fire Once.

    Well I have a Dialog with all kinds of things going on but for this question it regards a single Button Control. I would like the user to be able to use this button only once. It is pretty basic, but using a simple BOOL does not seem to do the trick - or at least how I have tried it.

    My version:
    Code:
    //Reset Button
    case IDC_BTN_RSTR:
    {
         BOOL var = TRUE;
         if(var == FALSE) return TRUE;
         SetDlgItemInt(hwndDlg, IDC_STR, 0, FALSE);
         SetDlgItemInt(hwndDlg, IDC_STR_, 0, FALSE);
         SetDlgItemInt(hwndDlg, IDC_STR__, 0, FALSE);
    
         var = FALSE;
         return TRUE;
    }
    Last edited by Morbane; November 11th, 2010 at 04:54 AM.

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