Sdílet prostřednictvím


CRect::operator LPCRECT

Převede CRect se LPCRECT.

operator LPCRECT( ) const throw( );

Poznámky

Při použití této funkce není třeba adresy z (a) operátor.Tento operátor bude automaticky použita při předání CRect funkci, která očekává objekt LPCRECT.

Příklad

BOOL CMyDlg::OnInitDialog()
{
   CDialog::OnInitDialog();

   // CWnd::GetWindowRect() takes a LPRECT, but we can 
   // simply pass our CRect object because of the LPRECT 
   // cast operator in the CRect class.

   CRect rect;
   GetWindowRect(rect);

   // Similarly, CWnd::MoveWindow() takes a LPCRECT but 
   // the LPCRECT cast operator is used implicitly:

   MoveWindow(rect, FALSE);

   return TRUE;
}

Požadavky

Záhlaví: atltypes.h

Viz také

Referenční dokumentace

Třída CRect

Graf hierarchie

CRect::operator LPRECT