Sergio Acosta
May 30th, 1999, 12:56 AM
Does somebody knows a way to enable/disable all the controls in a dialog at the same time?.
I have done it with a for :
for(int i = ID_FIRST_CONTROL; i<=LAST_CONTROL;i++)
{
GetDlgItem()->EnableWindow(FALSE);
}
but i hate to number secuencially all the resources in the Resource.h every time i add a new control, despite i have a macro that does it.
I've tried the CWnd::GetWindow(GW_CHILD) function, but I haven't had it to work.
I hope you could point me in the right direction.
Tank you very much.
I have done it with a for :
for(int i = ID_FIRST_CONTROL; i<=LAST_CONTROL;i++)
{
GetDlgItem()->EnableWindow(FALSE);
}
but i hate to number secuencially all the resources in the Resource.h every time i add a new control, despite i have a macro that does it.
I've tried the CWnd::GetWindow(GW_CHILD) function, but I haven't had it to work.
I hope you could point me in the right direction.
Tank you very much.