You can accompish this by just removing and re-adding all of the tabs in the
order you want. As you said, it doesn't remove the property page so this
works pretty quick and the data is retained.
"KMA" <kma@schneeberger.ch> wrote in message
news:ea5c3u$6j2$1@atlas.ip-plus.net...
I have a tabctrl with, say, 5 tabs, each property page representing
settings for a particular printer.
How can I programatically hide particlar tabs and re-show them without
destroying the dialog class underneath? I can grey out the tab, and make
it unclickable, but what I want is to hide it then redisplay it at will.
CPropertySheet::AddPage() and CPropertySheet::RemovePage() allows you to
add/remove tabs as appropriate. RemovePage() doesn't destroy the removed
CPropertyPage, so you should be able to re-add it later. But AddPage()
always puts it in the rightmost position (after the existing tabs). If
you want to insert it in the middle of the existing tabs, I guess you
would have to remove the tabs to the right of the insert position, add
your page, then re-add the pages just removed.
-- David