Solved

customize the MFC tabs (Property Page) with propertysheet.addpage()

Posted on 2008-10-06
2
738 Views
Last Modified: 2013-11-20
When I have many property pages,  It gets ordered in a certain way (number of tabs in each row).

How do i customize what tabs go in which row. All I able to do is call addpage() and the property pages get added in that order but I have no way of controlling if I want a certain property page in a certain row.

Any suggestions ?

Thanks
0
Comment
Question by:suda4130
2 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 300 total points
ID: 22657854
Hi suda4130,

I don't think there's an easy way to do this - it might be possible to rearrange the pages by directly accessing the members of the PROPSHEETHEADER pointed to by CPropertySheet::m_psh, but I'm not sure.

So maybe the only way to do this is to remove all pages (CPropertySheet::RemovePage) and re-add them in the order you want to have them. You can use LockWindowUpdate and UnlockWindowUpdate to avoid the property sheet is redrawn with any remove/add action.

Hope that helps,

ZOPPO
0
 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 100 total points
ID: 22657910
Zoppo is right. I had the same issue some years ago. To insert a page x at row y we removed all pages from the minimum of x and y to the end. Then we added the pages in the order we wanted to show them.
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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

912 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

23 Experts available now in Live!

Get 1:1 Help Now