Solved

Property page

Posted on 2003-12-08
2
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Progress

636 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