Tab control VS. Property sheet 
Author Message
 Tab control VS. Property sheet

Hello,

I have a view split in half using CSplitterWnd. On the left view I want a
tab control. I've used CPropertySheet to implement this but I'm having
trouble getting the drawing of the property page correct when the view is
resized.
I can resize in OnSize( ) but when the tabs are selected, the control is
automatically re-drawn. I would like to trap the TCN_SELCHANGE but the
message map requires a control ID. I've gotten the tab control from the
property sheet and set the control ID using CWnd SetDlgCtrlID( ) with an ID
that I #defined. Then I've used ON_NOTIFY and written a handler but it
doesn't seem to be called upon tab selection.

I know that CPropertyPage is normally used as a sort of stand alone dialog
box and not embedded in a view.

My question is:

Am I barking up a wrong tree to use CPropertySheet, or should I use a
CTabCtrl by itself?

Bob



Sun, 29 May 2005 17:11:42 GMT  
 Tab control VS. Property sheet
Hi,

I have done just what your trying to do.
"Property Sheet on a FormView".
http://codeguru.earthweb.com/propertysheet/inside_formview.shtml

HTH,

Quote:
> Hello,

> I have a view split in half using CSplitterWnd. On the left view I want a
> tab control. I've used CPropertySheet to implement this but I'm having
> trouble getting the drawing of the property page correct when the view is
> resized.
> I can resize in OnSize( ) but when the tabs are selected, the control is
> automatically re-drawn. I would like to trap the TCN_SELCHANGE but the
> message map requires a control ID. I've gotten the tab control from the
> property sheet and set the control ID using CWnd SetDlgCtrlID( ) with an
ID
> that I #defined. Then I've used ON_NOTIFY and written a handler but it
> doesn't seem to be called upon tab selection.

> I know that CPropertyPage is normally used as a sort of stand alone dialog
> box and not embedded in a view.

> My question is:

> Am I barking up a wrong tree to use CPropertySheet, or should I use a
> CTabCtrl by itself?

> Bob



Sun, 29 May 2005 18:44:22 GMT  
 Tab control VS. Property sheet
Thanks Christopher,

The web page that you referred me to led to another and then back to MSDN
where I found some info which helped me acheive my goal.
The article is entitled: HOWTO: Resize CPropertyPages at Run Time
(I don't know how I missed this)

Basically I had to override OnNotify( ) in my PropertySheet class. Then I
can find out when the tab control has some event which is causing it to
change. One tricky part though, is that I couldn't re-size right in this
function. I had to create a user message and post a message form
OnNotify( ). Then, in the handler, I could re-size, and everything was
honky-dory. You can't re-size in OnNotify( ) because the message that caused
the call has not yet been processed.

Bob



Quote:
> Hi,

> I have done just what your trying to do.
> "Property Sheet on a FormView".
> http://codeguru.earthweb.com/propertysheet/inside_formview.shtml

> HTH,


> > Hello,

> > I have a view split in half using CSplitterWnd. On the left view I want
a
> > tab control. I've used CPropertySheet to implement this but I'm having
> > trouble getting the drawing of the property page correct when the view
is
> > resized.
> > I can resize in OnSize( ) but when the tabs are selected, the control is
> > automatically re-drawn. I would like to trap the TCN_SELCHANGE but the
> > message map requires a control ID. I've gotten the tab control from the
> > property sheet and set the control ID using CWnd SetDlgCtrlID( ) with an
> ID
> > that I #defined. Then I've used ON_NOTIFY and written a handler but it
> > doesn't seem to be called upon tab selection.

> > I know that CPropertyPage is normally used as a sort of stand alone
dialog
> > box and not embedded in a view.

> > My question is:

> > Am I barking up a wrong tree to use CPropertySheet, or should I use a
> > CTabCtrl by itself?

> > Bob



Sun, 29 May 2005 21:55:32 GMT  
 Tab control VS. Property sheet
There are articles on CodeGuru & CodeProject about
Resizing Property pages. (And getting the controls to resize as well.)

I am using the PropertySheet in a CFormView from the Link.
(The PropertySheet uses a Picture Control as it's Parent Window. Neat
trick.)
The PropertyPages Stay the same size. I am not resizing the Pages or the
sheet.
The FormView Changes in size with respect to the SplitterWnd.
If the SplitterWnd is too small, scroll bars appear automatically.
I can hide or show the Property Pages, by moving the Splitter Left or Right.

I don't really know just exactly what it is you are doing. Resizing a Sheet
to a View.
I hope you don't have any probs later on.
I seen another article about PropertySheets in a View, but I like the one
from the link.
It works good.

Good Luck,

Quote:
> Thanks Christopher,

> The web page that you referred me to led to another and then back to MSDN
> where I found some info which helped me acheive my goal.
> The article is entitled: HOWTO: Resize CPropertyPages at Run Time
> (I don't know how I missed this)

> Basically I had to override OnNotify( ) in my PropertySheet class. Then I
> can find out when the tab control has some event which is causing it to
> change. One tricky part though, is that I couldn't re-size right in this
> function. I had to create a user message and post a message form
> OnNotify( ). Then, in the handler, I could re-size, and everything was
> honky-dory. You can't re-size in OnNotify( ) because the message that
caused
> the call has not yet been processed.

> Bob



> > Hi,

> > I have done just what your trying to do.
> > "Property Sheet on a FormView".
> > http://codeguru.earthweb.com/propertysheet/inside_formview.shtml

> > HTH,


> > > Hello,

> > > I have a view split in half using CSplitterWnd. On the left view I
want
> a
> > > tab control. I've used CPropertySheet to implement this but I'm having
> > > trouble getting the drawing of the property page correct when the view
> is
> > > resized.
> > > I can resize in OnSize( ) but when the tabs are selected, the control
is
> > > automatically re-drawn. I would like to trap the TCN_SELCHANGE but the
> > > message map requires a control ID. I've gotten the tab control from
the
> > > property sheet and set the control ID using CWnd SetDlgCtrlID( ) with
an
> > ID
> > > that I #defined. Then I've used ON_NOTIFY and written a handler but it
> > > doesn't seem to be called upon tab selection.

> > > I know that CPropertyPage is normally used as a sort of stand alone
> dialog
> > > box and not embedded in a view.

> > > My question is:

> > > Am I barking up a wrong tree to use CPropertySheet, or should I use a
> > > CTabCtrl by itself?

> > > Bob



Mon, 30 May 2005 00:46:25 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Tab Contol vs Property Sheets

2. Tab Control and Property Sheet

3. Property Sheets and Tab Control

4. Property Sheets and Tab Control

5. Tab and property sheets control...

6. Property sheet with no tab control?

7. Property Sheet Tab Control and TCS_VERTICAL Style

8. Subclass tab control in property sheet?

9. Tab Controls and Property Sheets

10. Tab Control or Property Sheet?

11. Property Sheets v/s Tabbed Control

12. TAB Controls or Property SHeet/Pages?

 

 
Powered by phpBB® Forum Software