modeless dialog doesnt work in tab control 
Author Message
 modeless dialog doesnt work in tab control

i have a modeless dialog that should display on top of the
tab control. it doesnt. here's what i have
 CWnd * m_pParent;
        int m_nID;
        CTabCtrl        m_tabControl;
when i press on the tab control selection i create the
dialog:
CRect rect;
        GetClientRect(rect);
then
        m_tabControl.Create(WS_VISIBLE , rect, m_pParent,
m_nID);
This is my code. There is a problem with create.
please tell me what i'm doing wrong and give EXAMPLE.
thanks
overwhelmed!!!!!!


Thu, 01 Jan 2004 00:29:34 GMT  
 modeless dialog doesnt work in tab control

Quote:

> i have a modeless dialog that should display on top of the
> tab control. it doesnt. here's what i have
>  CWnd * m_pParent;
>         int m_nID;
>         CTabCtrl        m_tabControl;
> when i press on the tab control selection i create the
> dialog:
> CRect rect;
>         GetClientRect(rect);
> then
>         m_tabControl.Create(WS_VISIBLE , rect, m_pParent,
> m_nID);
> This is my code. There is a problem with create.
> please tell me what i'm doing wrong and give EXAMPLE.
> thanks
> overwhelmed!!!!!!

There is no dialog anywhere in this code.  It is trying to create a tab
control when the tab control is clicked  :)

Usual practice is to create the dialog(s) at the same time you create
the tab control, with only one of them visible.  When the tab is clicked
make a different one visible.

--
Scott McPhillips [VC++ MVP]



Thu, 01 Jan 2004 00:51:20 GMT  
 modeless dialog doesnt work in tab control

Quote:
>-----Original Message-----

>> i have a modeless dialog that should display on top of
the
>> tab control. it doesnt. here's what i have
>>  CWnd * m_pParent;
>>         int m_nID;
>>         CTabCtrl        m_tabControl;
>> when i press on the tab control selection i create the
>> dialog:
>> CRect rect;
>>         GetClientRect(rect);
>> then
>>         m_tabControl.Create(WS_VISIBLE , rect,
m_pParent,
>> m_nID);
>> This is my code. There is a problem with create.
>> please tell me what i'm doing wrong and give EXAMPLE.
>> thanks
>> overwhelmed!!!!!!

>There is no dialog anywhere in this code.  It is trying
to create a tab
>control when the tab control is clicked  :)

>Usual practice is to create the dialog(s) at the same
time you create
>the tab control, with only one of them visible.  When the
tab is clicked
>make a different one visible.

>--
>Scott McPhillips [VC++ MVP]
>.

now i changed the m_tabControl to the modeless dialog
pointer
        CModeless1 *dlg1;
        dlg1 = new CModeless1();
        dlg1->Create(IDD_DIALOG1, this);
        dlg1->ShowWindow(SW_SHOW);  
when i am clicking on the tab. the modeless dialog is not
displayed on the tab control. how do i code it to make
sure that it is displayed on the tab control and not on
the desktop?


Thu, 01 Jan 2004 04:59:53 GMT  
 modeless dialog doesnt work in tab control

Quote:

> >-----Original Message-----

> >> i have a modeless dialog that should display on top of
> the
> >> tab control. it doesnt. here's what i have
> >>  CWnd * m_pParent;
> >>         int m_nID;
> >>         CTabCtrl        m_tabControl;
> >> when i press on the tab control selection i create the
> >> dialog:
> >> CRect rect;
> >>         GetClientRect(rect);
> >> then
> >>         m_tabControl.Create(WS_VISIBLE , rect,
> m_pParent,
> >> m_nID);
> >> This is my code. There is a problem with create.
> >> please tell me what i'm doing wrong and give EXAMPLE.
> >> thanks
> >> overwhelmed!!!!!!

> >There is no dialog anywhere in this code.  It is trying
> to create a tab
> >control when the tab control is clicked  :)

> >Usual practice is to create the dialog(s) at the same
> time you create
> >the tab control, with only one of them visible.  When the
> tab is clicked
> >make a different one visible.

> >--
> >Scott McPhillips [VC++ MVP]
> >.
> now i changed the m_tabControl to the modeless dialog
> pointer
>         CModeless1 *dlg1;
>         dlg1 = new CModeless1();
>         dlg1->Create(IDD_DIALOG1, this);
>         dlg1->ShowWindow(SW_SHOW);
> when i am clicking on the tab. the modeless dialog is not
> displayed on the tab control. how do i code it to make
> sure that it is displayed on the tab control and not on
> the desktop?

What's it doing on the desktop! You should make it a child of the tab
control instead of a child of 'this'.
Then you place it where you want it with respect to its parent.
Something like...

CRect rcDialog;
m_tabControl.GetClientRect(&rcDialog);
rcDialog.top += 27;
dlg1->MoveWindow(&rcDialog);

--
Scott McPhillips [VC++ MVP]



Thu, 01 Jan 2004 08:24:21 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem with TAB control and a MODELESS dialog in a ATL COM DLL

2. Problem with TAB control and a MODELESS dialog in a ATL COM DLL

3. Q: tabbing not possible in modeless propertysheet / modeless dialog

4. TAB not working when use WbeBrowser control in ATL Dialog

5. Tab key to tab between controls does not work properly

6. Dialog containing a CTabCtrl containing a modeless dialog box, shortcuts don't work

7. ATL Dialog Template - Modal/Modeless Tab Stop Behaviour

8. Using TAB in modeless dialog loaded from dll

9. Modeless dialog and tab key...

10. Modeless Dialog and Tab Order

11. custom control in dialog doesnt get WM_MOUSEWHEEL message

12. HELP - Using TAB in modeless dialog loaded from dll

 

 
Powered by phpBB® Forum Software