I need to enable/disable a group of controls in one single shot. They are located on a tabbed page of my main wnd. I don't want to send a separate "disable" msg for any control.
The group of controls belongs to a page of a tab control. Every control is a child wnd of a static wnd. The static wnd is itself a child of the Tab control.

I tried to disable the static wnd with
? invoke EnableWindow, hStatic, FALSE

what happens is that all the child controls disappear.? :sad: Instead I wanted them greyed and visible.
When I click on another tabbed page and then come back to the previous one, the group of child controls is again visible and inactive, but they are NOT GREYED.? :mad:

Posted on 2005-07-11 09:21:44 by _OuzO_
Not all controls are grayed when disabled... in any case all you can do is call EnableWindow in a loop. Maybe you can use one of the window enumeration functions too.

BTW EnableWindow does not hide the controls, maybe you have a bug somewhere else in your code?
Posted on 2005-07-11 11:24:18 by QvasiModo
I found out that when I disable the static wnd all its child windows disappear just because they are not repainted. Infact if I cover the client wnd with a wnd of another app and then I uncover it, all child controls are again visible. Now they receive no input because of disabling of their parent wnd, and they look white not greyed.? ?:shock:

Posted on 2005-07-14 02:28:28 by _OuzO_
Try calling InvalidateRect, maybe that does the trick...
Posted on 2005-07-14 09:31:23 by QvasiModo