15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Problems with property sheets in wizard mode

Dmitry Gurov -- gds@ultersys.msk.su
Tuesday, May 28, 1996


Hi,

Configuration:
---------------
Windows NT 3.51 (No SP)
MSDEV 4.0 (No SP)

Questions:
-----------

How can I make the Finish button as default in the wizard-type dialog?
How can I set the focus to the Finish button?


Problem description:
---------------------
We are trying to create a wizard-type dialog. 
As we need it to be used with both MS VC 2.x and MSDEV 4.x 
we wrote a MFC-wrapper that used PropertySheet API.

We needed to have all wizard buttons to be visible the same time: Back, Next, Finish.
So we show all these buttons and re-arrange them every time.

Then we ran into the problems.

The first problem is that Windows NT or Windows 95 hangs 
if the last page has no dynamic controls (only static texts, 
pictures - controls that cannot get focus).
If you use ALT-N to navigate through the wizard then the wizard 
hangs OS when you get to the last page.

Note: In Windows 95 the Next button has no shortcut ('N' has no underline) 
and the wizard has no chance to hang OS. Investigating this problem 
I changed the text of the Next button:

      pNext = GetDlgItem(ID_WIZNEXT);
      if (pNext)
          pNext->SetWindowText("&Next >");

      This re-creates the problem on Windows 95 too!
      
Luckily enough, we could easily avoid this problem by adding edit 
control to the last page, but then we get more problems.

When the user gets to the last page we want to have the Finish button to be default button.
We tried to send message EM_SETDEFID without any success. 
As we discovered using SPYXX someone sends another EM_SETDEFID message after we do it.

We have a similar problem with the Next button. Initially the first page 
has the Next button as the default one, but if you make a step forward and 
then return back to the first step, the Next button will not be default anymore.

Another problem is that: in some cases we need to set the focus to the Finish button. 
We call SetFocus, but someone always moves the focus to the first control on the current page.


Thanks for any help,
Alex

----------------------------
Alexander Pivovarov
alx@ultersys.msk.su

Ulter Systems, Inc.




Dmitry Gurov -- gds@ultersys.msk.su
Friday, May 31, 1996

Hi,

Configuration:
---------------
Windows NT 3.51 (No SP)
MSDEV 4.0 (No SP)

Questions:
-----------

How can I make the Finish button as default in the wizard-type dialog?
How can I set the focus to the Finish button?


Problem description:
---------------------
We are trying to create a wizard-type dialog. 
As we need it to be used with both MS VC 2.x and MSDEV 4.x 
we wrote a MFC-wrapper that used PropertySheet API.

We needed to have all wizard buttons to be visible the same time: Back, Next, Finish.
So we show all these buttons and re-arrange them every time.

Then we ran into the problems.

The first problem is that Windows NT or Windows 95 hangs 
if the last page has no dynamic controls (only static texts, 
pictures - controls that cannot get focus).
If you use ALT-N to navigate through the wizard then the wizard 
hangs OS when you get to the last page.

Note: In Windows 95 the Next button has no shortcut ('N' has no underline) 
and the wizard has no chance to hang OS. Investigating this problem 
I changed the text of the Next button:

      pNext = GetDlgItem(ID_WIZNEXT);
      if (pNext)
          pNext->SetWindowText("&Next >");

      This re-creates the problem on Windows 95 too!
      
Luckily enough, we could easily avoid this problem by adding edit 
control to the last page, but then we get more problems.

When the user gets to the last page we want to have the Finish button to be default button.
We tried to send message EM_SETDEFID without any success. 
As we discovered using SPYXX someone sends another EM_SETDEFID message after we do it.

We have a similar problem with the Next button. Initially the first page 
has the Next button as the default one, but if you make a step forward and 
then return back to the first step, the Next button will not be default anymore.

Another problem is that: in some cases we need to set the focus to the Finish button. 
We call SetFocus, but someone always moves the focus to the first control on the current page.


Thanks for any help,
Alex

----------------------------
Alexander Pivovarov
alx@ultersys.msk.su

Ulter Systems, Inc.




patwari -- patwari@m-net.arbornet.org
Wednesday, June 05, 1996

Hi,
 I was going thru MFC-Release notes and found =
PropertyPage::OnWizardFinsh errara.This may be usefull for U.

PropertyPage::OnWizardFinsh  is documented as:
virtual void CPropertyPage::OnWizardFinish();
the correct prototype is :
virtual BOOL CPropertyPage::OnWizardFinish();
=09
When overriding this member function in classes derived from =
CPropertyPage, return FALSE to prevent the property sheet from being =
destroyed. MFC implementation of CPropertyPage::OnWizardFinish returns =
TRUE always.

regards,
Jaiteerth Patwari



----------
From: 	Dmitry Gurov[SMTP:gds@ultersys.msk.su]
Sent: 	Friday, May 31, 1996 5:30 PM
To: 	'mfc-l@netcom.com'
Cc: 	'Pivovarov, Alexander'
Subject: 	Problems with property sheets in wizard mode

Hi,

Configuration:
---------------
Windows NT 3.51 (No SP)
MSDEV 4.0 (No SP)

Questions:
-----------

How can I make the Finish button as default in the wizard-type dialog?
How can I set the focus to the Finish button?


Problem description:
---------------------
We are trying to create a wizard-type dialog.=20
As we need it to be used with both MS VC 2.x and MSDEV 4.x=20
we wrote a MFC-wrapper that used PropertySheet API.

We needed to have all wizard buttons to be visible the same time: Back, =
Next, Finish.
So we show all these buttons and re-arrange them every time.

Then we ran into the problems.

The first problem is that Windows NT or Windows 95 hangs=20
if the last page has no dynamic controls (only static texts,=20
pictures - controls that cannot get focus).
If you use ALT-N to navigate through the wizard then the wizard=20
hangs OS when you get to the last page.

Note: In Windows 95 the Next button has no shortcut ('N' has no =
underline)=20
and the wizard has no chance to hang OS. Investigating this problem=20
I changed the text of the Next button:

      pNext =3D GetDlgItem(ID_WIZNEXT);
      if (pNext)
          pNext->SetWindowText("&Next >");

      This re-creates the problem on Windows 95 too!
     =20
Luckily enough, we could easily avoid this problem by adding edit=20
control to the last page, but then we get more problems.

When the user gets to the last page we want to have the Finish button to =
be default button.
We tried to send message EM_SETDEFID without any success.=20
As we discovered using SPYXX someone sends another EM_SETDEFID message =
after we do it.

We have a similar problem with the Next button. Initially the first page =

has the Next button as the default one, but if you make a step forward =
and=20
then return back to the first step, the Next button will not be default =
anymore.

Another problem is that: in some cases we need to set the focus to the =
Finish button.=20
We call SetFocus, but someone always moves the focus to the first =
control on the current page.


Thanks for any help,
Alex

----------------------------
Alexander Pivovarov
alx@ultersys.msk.su

Ulter Systems, Inc.




| Вернуться в корень Архива |