mvp_tips/CPUID/CPUID/ScrollableCaptions.cpp
void CScrollableCaptions::SavePos()
    {
     for(CWnd * wnd = GetWindow(GW_CHILD); wnd != NULL; wnd = wnd->GetWindow(GW_HWNDNEXT))
        { /* capture original */
         CRect r;
         wnd->GetWindowRect(&r);
         ScreenToClient(&r);
         CPoint pt(r.left, r.top);
         ::SetWindowLong(wnd->m_hWnd, GWL_USERDATA, POINTTOPOINTS(pt));
        } /* capture original */
    }
/****************************************************************************
*                        CScrollableCaptions::SavePos
* Result: void
*       
* Effect: 
*       Saves the x,y points for the top left corner of the window
****************************************************************************/


Saves the x,y points for the top left corner of the window
Saves the x y points for the top left corner of the window
void CScrollableCaptions::SavePos()
    {
     for(CWnd * wnd = GetWindow(GW_CHILD); wnd != NULL; wnd = wnd->GetWindow(GW_HWNDNEXT))
        { 
         CRect r;
         wnd->GetWindowRect(&r);
         ScreenToClient(&r);
         CPoint pt(r.left, r.top);
         ::SetWindowLong(wnd->m_hWnd, GWL_USERDATA, POINTTOPOINTS(pt));
        } 
    }
void CScrollableCaptions :: SavePos ( ) { for ( CWnd * wnd = GetWindow ( GW_CHILD ) ; wnd != NULL ; wnd = wnd -> GetWindow ( GW_HWNDNEXT ) ) { CRect r ; wnd -> GetWindowRect ( & r ) ; ScreenToClient ( & r ) ; CPoint pt ( r . left , r . top ) ; :: SetWindowLong ( wnd -> m_hWnd , GWL_USERDATA , POINTTOPOINTS ( pt ) ) ; } }
CScrollableCaptions::SavePos
Result: void
CScrollableCaptions :: SavePos Result : void
/* capture original */ /* capture original */