Solved

Property page

Posted on 2003-12-08
2
214 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 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

14 Experts available now in Live!

Get 1:1 Help Now