ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static LRESULT Display_OnSize ( HWND  hwnd) [static]

Definition at line 275 of file display.c.

Referenced by DisplayProc().

{
    RECT rect;
    SCROLLINFO si;
    int nOldPos;

    GetClientRect(hwnd, &rect);

    /* Get the old scroll pos */
    si.cbSize = sizeof(si);
    si.fMask  = SIF_POS;
    GetScrollInfo(hwnd, SB_VERT, &si);
    nOldPos = si.nPos;

    /* Set the new page size */
    si.fMask  = SIF_PAGE;
    si.nPage  = rect.bottom;
    SetScrollInfo(hwnd, SB_VERT, &si, TRUE);

    /* Get the new scroll pos */
    si.fMask  = SIF_POS;
    GetScrollInfo(hwnd, SB_VERT, &si);

    /* If they don't match ... */
    if (nOldPos != si.nPos)
    {
        /* ... scroll the window */
        ScrollWindowEx(hwnd, 0, nOldPos - si.nPos, NULL, NULL, NULL, NULL, SW_INVALIDATE);
        UpdateWindow(hwnd);
    }

    return 0;
}

Generated on Fri May 25 2012 04:38:24 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.