From: JCO on
I have an application (MFC dialog type) that needs to be modified. The
current app provides the customer a type of "Test" to be performed. As part
of an Add-On, I want to add a 3-tab control (CPropertySheet & CPropertyPage)
where the existing "Test 1" is done on tab 1. Then I will add a "Test 2" &
"Test 3" on Tab 2 and Tab 3. The user can choose which "Test" to do based
on selecting the proper Tab.

I created the CMyPropertySheet along with the 3-Tabs (CTab1, CTab2, CTab3).

The problem is this. Right now the 3-tab dialog comes up independent by
itself. After I close it, the application comes up. This is not what I
want. I want the 3-tabs to be part of the main application. What did I do
wrong. I initialize the 3-tab dialog in ::InitDialog() of the main
application. Is that wrong?

Thanks



From: Scott McPhillips [MVP] on
"JCO" <someone(a)somewhere.com> wrote in message
news:ObjL3I2CLHA.5784(a)TK2MSFTNGP05.phx.gbl...
>I have an application (MFC dialog type) that needs to be modified. The
>current app provides the customer a type of "Test" to be performed. As
>part of an Add-On, I want to add a 3-tab control (CPropertySheet &
>CPropertyPage) where the existing "Test 1" is done on tab 1. Then I will
>add a "Test 2" & "Test 3" on Tab 2 and Tab 3. The user can choose which
>"Test" to do based on selecting the proper Tab.
>
> I created the CMyPropertySheet along with the 3-Tabs (CTab1, CTab2,
> CTab3).
>
> The problem is this. Right now the 3-tab dialog comes up independent by
> itself. After I close it, the application comes up. This is not what I
> want. I want the 3-tabs to be part of the main application. What did I
> do wrong. I initialize the 3-tab dialog in ::InitDialog() of the main
> application. Is that wrong?
>
> Thanks


Do you want to replace the existing dialog with the new property sheet? If
so, the place to do that is in the app InitInstance. It creates the old
dialog there and calls its DoModal. Replace the dialog with your
CMyPropertySheet.

--
Scott McPhillips [VC++ MVP]

From: Joseph M. Newcomer on
What I do is use a tab control then use my modified CTabView class to interface to it. You
can find the source for this on several of my projects on my MVP Tips site, most notably
my Locale Explorer. Or send me an email and I'll send it to you. I've found this much
easier than fighting to make a CPropertySheet do what I want.
joe

On Sun, 13 Jun 2010 20:37:56 -0500, "JCO" <someone(a)somewhere.com> wrote:

>I have an application (MFC dialog type) that needs to be modified. The
>current app provides the customer a type of "Test" to be performed. As part
>of an Add-On, I want to add a 3-tab control (CPropertySheet & CPropertyPage)
>where the existing "Test 1" is done on tab 1. Then I will add a "Test 2" &
>"Test 3" on Tab 2 and Tab 3. The user can choose which "Test" to do based
>on selecting the proper Tab.
>
>I created the CMyPropertySheet along with the 3-Tabs (CTab1, CTab2, CTab3).
>
>The problem is this. Right now the 3-tab dialog comes up independent by
>itself. After I close it, the application comes up. This is not what I
>want. I want the 3-tabs to be part of the main application. What did I do
>wrong. I initialize the 3-tab dialog in ::InitDialog() of the main
>application. Is that wrong?
>
>Thanks
>
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: JCO on
No my intent is not to replace the current Dialog. I was under the
impression that you must use the CPropertySheet with CPropertyPage to do a
tab. Sounds like, if I understand you correctly, I don't need the
PropertySheet.
Getting rid of that might bring up other issues as far as hiding certain
buttons???

I want my existing dialog. On part of that dialog (50% coverage) I want a
3-tab control. (no Wizard and no buttons on the tabs).

"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:OMj05U3CLHA.3492(a)TK2MSFTNGP02.phx.gbl...
> "JCO" <someone(a)somewhere.com> wrote in message
> news:ObjL3I2CLHA.5784(a)TK2MSFTNGP05.phx.gbl...
>>I have an application (MFC dialog type) that needs to be modified. The
>>current app provides the customer a type of "Test" to be performed. As
>>part of an Add-On, I want to add a 3-tab control (CPropertySheet &
>>CPropertyPage) where the existing "Test 1" is done on tab 1. Then I will
>>add a "Test 2" & "Test 3" on Tab 2 and Tab 3. The user can choose which
>>"Test" to do based on selecting the proper Tab.
>>
>> I created the CMyPropertySheet along with the 3-Tabs (CTab1, CTab2,
>> CTab3).
>>
>> The problem is this. Right now the 3-tab dialog comes up independent by
>> itself. After I close it, the application comes up. This is not what I
>> want. I want the 3-tabs to be part of the main application. What did I
>> do wrong. I initialize the 3-tab dialog in ::InitDialog() of the main
>> application. Is that wrong?
>>
>> Thanks
>
>
> Do you want to replace the existing dialog with the new property sheet?
> If so, the place to do that is in the app InitInstance. It creates the old
> dialog there and calls its DoModal. Replace the dialog with your
> CMyPropertySheet.
>
> --
> Scott McPhillips [VC++ MVP]

From: JCO on
Can you use that if your not using the MFC's document/view architecture? My
base application uses CDialog.
I sent you an email too.

"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
news:2njc165r0dlmc9pd165dloteho9nqrs0s3(a)4ax.com...
> What I do is use a tab control then use my modified CTabView class to
> interface to it. You
> can find the source for this on several of my projects on my MVP Tips
> site, most notably
> my Locale Explorer. Or send me an email and I'll send it to you. I've
> found this much
> easier than fighting to make a CPropertySheet do what I want.
> joe
>
> On Sun, 13 Jun 2010 20:37:56 -0500, "JCO" <someone(a)somewhere.com> wrote:
>
>>I have an application (MFC dialog type) that needs to be modified. The
>>current app provides the customer a type of "Test" to be performed. As
>>part
>>of an Add-On, I want to add a 3-tab control (CPropertySheet &
>>CPropertyPage)
>>where the existing "Test 1" is done on tab 1. Then I will add a "Test 2"
>>&
>>"Test 3" on Tab 2 and Tab 3. The user can choose which "Test" to do based
>>on selecting the proper Tab.
>>
>>I created the CMyPropertySheet along with the 3-Tabs (CTab1, CTab2,
>>CTab3).
>>
>>The problem is this. Right now the 3-tab dialog comes up independent by
>>itself. After I close it, the application comes up. This is not what I
>>want. I want the 3-tabs to be part of the main application. What did I
>>do
>>wrong. I initialize the 3-tab dialog in ::InitDialog() of the main
>>application. Is that wrong?
>>
>>Thanks
>>
>>
> Joseph M. Newcomer [MVP]
> email: newcomer(a)flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm