// JP opened flex table

Click to See Complete Forum and Search --> : Property Sheet in CFormView Tabstop problm


Brad Bruce
May 7th, 1998, 06:15 PM
How do I tab from my property sheet to any other controls in the form view


+---------------+

|+--+--+ [b1]|

||t1|t2|---+[b2]|

|| | |

|| | |

|+---------+ |

+---------------+

Philippe della Faille
June 30th, 1998, 02:15 PM
Hello Brad,


You create the PropertySheet as child of your CFormView in a "PlaceHolderand" control define in your CFormView template. After you modify the style of your PropertySheet to notify tabbing messages to his parent (the FormView).


See example in this function:


BOOL CXPropertySheet::CreateAsChild(CWnd* pParentWnd, int nIDPlaceHolder/* = -1*/)

{

if(!Create(pParentWnd, WS_CHILD|WS_VISIBLE, WS_EX_CONTROLPARENT))

{

TRACE("Failed to create CXPropSheet\n");

return FALSE;

}


// allow tabbing into child

CWnd *pParent;


pParent = GetParent();

if(NULL!=pParent)

{

pParent->ModifyStyleEx(0, WS_EX_CONTROLPARENT);

if(-1 != nIDPlaceHolder)

{

CWnd* pWin;

CRect rcSheet;



pWin = pParent->GetDlgItem(nIDPlaceHolder);

if(NULL!=pWin)

{

pWin->GetWindowRect(rcSheet);

pParent->ScreenToClient(rcSheet);

SetWindowPos(pWin, rcSheet.left, rcSheet.top, 0, 0, SWP_NOACTIVATE|SWP_NOSIZE);

#ifndef _DEBUG

pWin->DestroyWindow();

#endif

}

else

{

TRACE("Placeholder Window not found\n");

}

}

}


return TRUE;

}


I hope that can help you.


Bye.

Philippe

//JP added flex table