RE: [Question] Enable/disable controls
WM_ENABLE is a notification: it's sent by the system after something has happened. It doesn't actually control anything. It also doesn't help you got the third and fourth parameters wrong. The third should be 0 for disabled, nonzero for enabled. The fourth is ignored, and should be 0.
fatfreechicken's code is actually a good workaround. To be honest, Patchou should have included an EnableControl() in the scripting engine: it's a common enough task.
Note: Different window messages have different WPARAM and LPARAM uses. Use MSDN to check for each message.
|