Solved

Want to add Property Page at runtime to Property Sheet

Posted on 2008-10-12
11
564 Views
Last Modified: 2013-11-20
Hi,

I am new to VC++ and Win32 Programming

i want to add Property Page at runtime to Property Sheet. Please help me to implement this. Please give some link in codeproject or some other ready made solution so that i can understand from there.


thanks
0
Comment
Question by:palhade
  • 5
  • 3
11 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 22700443

Adds the supplied page with the rightmost tab in the property sheet.      
  void AddPage(
   CPropertyPage *pPage
);
 Parameters pPage  
Points to the page to be added to the property sheet. Cannot be  NULL. Remarks  
Add pages to the property sheet in the left-to-right order you want them to  appear.
AddPage adds the CPropertyPage object to the  CPropertySheet object's list of pages but does not actually create the  window for the page. The framework postpones creation of the window for the page  until the user selects that page.
When you add a property page using AddPage, the CPropertySheet  is the parent of the CPropertyPage. To gain access to the property sheet  from the property page, call CWnd::GetParent.  
It is not necessary to wait until creation of the property sheet window to  call AddPage. Typically, you will call AddPage before calling DoModal or Create.
If you call AddPage after displaying the property page, the tab row  will reflect the newly added page.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 22700447
AddPage is a member function of the CPropertySheet class.



// Add two pages to a CPropertySheet object, then show the
// CPropertySheet object as a modal dialog.  Both CStylePage
// and CColorPage are CPropertyPage-derived classes created
// by the Add Class wizard.  

CPropertySheet dlgPropertySheet("Simple PropertySheet");

CStylePage     stylePage;
CColorPage     colorPage;
dlgPropertySheet.AddPage(&stylePage);
dlgPropertySheet.AddPage(&colorPage);

dlgPropertySheet.DoModal();
0
 

Author Comment

by:palhade
ID: 22700499
Can you please give me link like codeproject to some ready project as i am not able to understand much from this.
there is structure for proertysheet and structure for property page. and need to fill both.
 
One member of structure for property page is pfnDlgProc. where i need to specify method .
 
Here i am facing problem.
0
 

Author Comment

by:palhade
ID: 22700743
S
0
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.

 
LVL 44

Expert Comment

by:AndyAinscow
ID: 22700809
Be patient - I have only just seen your comment about the problem after my initial comments.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 22700816
Do you want a solution using MFC (which has ready made classes to help you) or C/C++ (code your own) or even .NET ?
0
 

Author Comment

by:palhade
ID: 22701117
i am not using MFC. I am using Win32
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 22701548
I don't have any code here that is of use to you.
I am not going to search the internet for you.
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 500 total points
ID: 22854094
The Microsoft documentation pretty much tells you everything you need to know:
    About Property Sheets
    http://msdn.microsoft.com/en-us/library/bb774538(VS.85).aspx
However, I can tell you that using MFC objects and functions will make it a lot easier, and I suggest that you go that way if at all possible,
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

705 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

19 Experts available now in Live!

Get 1:1 Help Now