The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: zemtex on December 22, 2010, 05:50:04 PM

Title: Problem enabling control
Post by: zemtex on December 22, 2010, 05:50:04 PM
I've tried a dozen ways to deactivate my button (gray out and disable).. This code does not work, can anyone enlighten me what it is that I am not doing right?

         Invoke GetDlgItem, hWnd, IDC_BTN2
         Invoke EnableWindow, eax, TRUE

I have a suspicion that I need to shift values into HO of wParam, but I'm not sure if this is the case.

It is really just unbeliveable that i mistyped TRUE where it should have been FALSE.  :dance:

This is the correct code, now it works:
         Invoke GetDlgItem, hWnd, IDC_BTN2
         Invoke EnableWindow, eax, FALSE
Title: Re: Problem enabling control
Post by: Tight_Coder_Ex on December 22, 2010, 06:00:37 PM
Invoke EnableWindow, eax, FALSE

Your code was enabling a window that was probably already active