Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Property page

Posted on 2003-12-08
2
Medium Priority
?
275 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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
This is about my first experience with programming Arduino.
Introduction to Processes
Loops Section Overview

876 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