CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: disable

  1. #1
    Guest

    disable

    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


  2. #2
    Join Date
    Jul 1999
    Location
    Pasadena, CA - USA
    Posts
    351

    Re: disable

    Hello,

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


    Regards,

    Paul Belikian

  3. #3
    Guest

    Re: disable

    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:ialog(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


  4. #4
    Join Date
    Aug 1999
    Location
    Vic, Australia
    Posts
    11

    Re: disable

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured