Wrong tab order in a property sheet after adding a custom button 
Author Message
 Wrong tab order in a property sheet after adding a custom button

Hi everybody!

I have to implement a modal property sheet that must have two buttons: Close
and Help instead of the classic four buttons: OK, Cancel, Apply and Help.
I've followed the procedure described in the article Q140586 in the KB.
Basically I've overrided the OnInitDialog and I've created the command
buttons as required.
Everything looks OK. The buttons are there and working but now the tab order
is totally screwed up.
Instead of going form the last control on the property page to the buttons
and then to the page caption, it is going to the page caption and then to
the buttons.

Can anybody explain this phenomenon to me?? Is there a fix for this problem.
I've tried all the available docs and the KB.

Thanx



Sat, 05 Aug 2000 03:00:00 GMT  
 Wrong tab order in a property sheet after adding a custom button

Quote:
>Everything looks OK. The buttons are there and working but now the tab order
>is totally screwed up.

You can alter the Tab order of your dynamically added controls by
using SetWindowPos.

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Sun, 06 Aug 2000 03:00:00 GMT  
 Wrong tab order in a property sheet after adding a custom button

Hello Valentin,

I noticed your PropertySheet thread in a Newsgroup and was wondering if you
could help me.

I can add a four button controls to a PropertySheet as follows:

CSheet::OnInitDialog()
{

    m_First.CreateEx(WS_EX_CLIENTEDGE, _T("BUTTON"), ........
    m_Prev.CreateEx(WS_EX_CLIENTEDGE, _T("BUTTON"), ........
    m_Next.CreateEx(WS_EX_CLIENTEDGE, _T("BUTTON"), ........
    m_Lasst.CreateEx(WS_EX_CLIENTEDGE, _T("BUTTON"), ........

The button shows up nicely on the PropertySheet, but how and where do you
trap the OnButton message?

I override the CSheet::OnCommand( WPARAM wParam, LPARAM lParam )
and set a breakpoint and can trap the OnButton command message, but:

        - wParam and lParam don't seem to indicate anything
        - how do I get the control ID of the button to determine which button was
pressed
        - or some other way of determining which of the 4 buttons where pressed

Any input would be appreciated.

Joe Waldron



Quote:
> Hi everybody!

> I have to implement a modal property sheet that must have two buttons:
Close
> and Help instead of the classic four buttons: OK, Cancel, Apply and Help.
> I've followed the procedure described in the article Q140586 in the KB.
> Basically I've overrided the OnInitDialog and I've created the command
> buttons as required.
> Everything looks OK. The buttons are there and working but now the tab
order
> is totally screwed up.
> Instead of going form the last control on the property page to the
buttons
> and then to the page caption, it is going to the page caption and then to
> the buttons.

> Can anybody explain this phenomenon to me?? Is there a fix for this
problem.
> I've tried all the available docs and the KB.

> Thanx



Mon, 07 Aug 2000 03:00:00 GMT  
 Wrong tab order in a property sheet after adding a custom button

Quote:
>    - how do I get the control ID of the button to determine which button was
>pressed

Joe,

Have you passed a unique control ID when you've called CreateEx? It's
the HMENU parameter.

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Mon, 07 Aug 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Tab order on Property Sheets

2. Cannot get correct TAB order when using MSMASK32.OCX in Property Sheets

3. Custom buttons to a property sheet

4. Add/Remove Tabs to a modeless Property Sheet

5. Adding display properties tabbed sheets

6. Property Sheets - Adding More Buttons

7. Property Sheets - Adding Buttons - Urgent

8. How to add user-defined buttons to property sheet

9. Q: Adding a button to a property sheet

10. Adding buttons to modeless property sheet

11. How to Add My own Property Tab in the PropertyGrid for Button Control

12. Property sheets: Changing [tab] to [alt][tab]?

 

 
Powered by phpBB® Forum Software