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

Definition at line 783 of file window.cpp.

Referenced by Resize(), and ResizeController< Dialog >::WndProc().

{
    ClientRect clnt_rect(_hwnd);
    SIZE new_size = {cx, cy};

    int dx = new_size.cx - _last_size.cx;
    int dy = new_size.cy - _last_size.cy;

    if (!dx && !dy)
        return;

    _last_size = new_size;

    HDWP hDWP = BeginDeferWindowPos(size());

    for(ResizeManager::const_iterator it=begin(); it!=end(); ++it) {
        const ResizeEntry& e = *it;
        RECT move = {0};

        if (e._flags & MOVE_LEFT)
            move.left += dx;

        if (e._flags & MOVE_RIGHT)
            move.right += dx;

        if (e._flags & MOVE_TOP)
            move.top += dy;

        if (e._flags & MOVE_BOTTOM)
            move.bottom += dy;

        UINT flags = 0;

        if (!move.left && !move.top)
            flags = SWP_NOMOVE;

        if (move.right==move.left && move.bottom==move.top)
            flags |= SWP_NOSIZE;

        if (flags != (SWP_NOMOVE|SWP_NOSIZE)) {
            HWND hwnd = GetDlgItem(_hwnd, e._id);

            if (hwnd) {
                WindowRect rect(hwnd);
                ScreenToClient(_hwnd, rect);

                rect.left   += move.left;
                rect.right  += move.right;
                rect.top    += move.top;
                rect.bottom += move.bottom;

                hDWP = DeferWindowPos(hDWP, hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, flags|SWP_NOACTIVATE|SWP_NOZORDER);
            }
        }
    }

    EndDeferWindowPos(hDWP);
}

Generated on Thu May 24 2012 06:43:37 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.