Disable/Enable OK on propertysheet
-
Can anyone tell me how to enable/disable the ok button on a property sheet? I want to have the button disabled until the user enter all the required information, then enable it. -ken Ken Goguen
-
Can anyone tell me how to enable/disable the ok button on a property sheet? I want to have the button disabled until the user enter all the required information, then enable it. -ken Ken Goguen
You can get hold of a
CWnd *
to the OK button withGetDlgItem(IDOK)
(if inside a method of the property sheet) orGetParent()->GetDlgItem(IDOK)
(from a method of a child property page). Then you can callCWnd::EnableWindow
for that pointer. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo -
You can get hold of a
CWnd *
to the OK button withGetDlgItem(IDOK)
(if inside a method of the property sheet) orGetParent()->GetDlgItem(IDOK)
(from a method of a child property page). Then you can callCWnd::EnableWindow
for that pointer. Joaquín M López Muñoz Telefónica, Investigación y DesarrolloThanks. -kg Ken Goguen