News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Problem enabling control

Started by zemtex, December 22, 2010, 05:50:04 PM

Previous topic - Next topic

zemtex

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
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

Tight_Coder_Ex

Invoke EnableWindow, eax, FALSE

Your code was enabling a window that was probably already active