Click to See Complete Forum and Search --> : disable


August 29th, 1999, 03:33 PM
hi,
how can i disable a CIPAddressCtrl-member-object (m_IPSource) in CPropertsPage-object during the runtime ( when i create the CProperteySheet-object with DoModal(), i will manualy disable and enable it before).
bs

Paul Belikian
August 29th, 1999, 04:12 PM
Hello,

m_IPSource.EnableWindow(FALSE); Is this what you're asking? Make sure the member var is a control.


Regards,

Paul Belikian

August 29th, 1999, 04:44 PM
hello paul,

thank for your coment. but it doesn't function.

i call this function within the CDocument-calss, when i add an item to the CTreeCtrl object


int CUniJobDoc::Dialog(LPCTSTR titel) {
CPageJob PageJob; // 1. page, CPageJob is drived from CPropertyPage and m_IPSource is a control
PageJob.m_IPSource.EnableWindow(FALSE); //???????????????? your opinion
CPagePersonUndMailing PagePersonenUndMailing; // 2. page, CPagePersonUndMailing is drived from CPropertyPage and m_IPSource is a control

CPropertySheetjob PropertySheetJob (titel); // titel = name of page, CPropertySheetjob is drived from CPropertySheet

PropertySheetJob.AddPage(&PageJob); // adding 1. page
PropertySheetJob.AddPage(&PagePersonenUndMailing); // adding 2. page

return (PropertySheetJob.DoModal()); // greate it

}

......

what do you think i do wrong?

bab

Woffy
August 29th, 1999, 07:39 PM
I have a sneeking suspicion that you are trying to disable a control that is not yet created.

Try puting the EnableWindow(false) into a function like InitDialog.

I think you will have much more success.