Solved

Property page

Posted on 2003-12-08
2
228 Views
Last Modified: 2012-05-04
I have a property sheet with 3 pages. When i refer the items in the propery page (other than from the current tab )from property sheet I am getting ASSERT FAILED error.  But if i  use 'SetActivePage ' and then refer the items it is working. Can i get rid of this error without moving into that page


thanks
gp
0
Comment
Question by:Gopakumar
2 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 9896576
Please show your code.
0
 
LVL 3

Accepted Solution

by:
freewell earned 250 total points
ID: 9901599
The property page is not inited when it is added to the property sheet. The initialization happens when it is active for the first time.

int CMyProperty::DoModal()
{
    // TODO: Add your specialized code here and/or call the base class
    int nTotalPage = GetPageCount();
    if(nTotalPage > 0)
    {
        for(int i=0;i<nTotalPage;i++)
           SetActivePage(i);
       SetActivePage(0);
    }

    // You can access page's item here

    return CPropertySheet::DoModal();
}
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now