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

VOID MainWndOnSize ( HWND  hwnd,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 437 of file winmain.c.

Referenced by MainWindowProc().

{
    HDWP hdwp = BeginDeferWindowPos(5);
    INT SearchBarWidth = GetWindowWidth(hSearchBar);
    INT RichPos = GetWindowHeight(hRichEdit);
    INT NewPos = HIWORD(lParam) - (RichPos + SPLIT_WIDTH + GetWindowHeight(hStatusBar));
    INT VSplitterPos;

    /* Size status bar */
    SendMessage(hStatusBar, WM_SIZE, 0, 0);

    /* Size tool bar */
    SendMessage(hToolBar, TB_AUTOSIZE, 0, 0);

    /* Size SearchBar */
    MoveWindow(hSearchBar, LOWORD(lParam) - SearchBarWidth - 4, 5, SearchBarWidth, 22, TRUE);

    /*
     * HIWORD(lParam) - Height of main window
     * LOWORD(lParam) - Width of main window
     */

    /* Size vertical splitter bar */
    DeferWindowPos(hdwp,
                   hVSplitter,
                   0,
                   (VSplitterPos = GetWindowWidth(hTreeView)),
                   GetWindowHeight(hToolBar),
                   SPLIT_WIDTH,
                   HIWORD(lParam) - GetWindowHeight(hToolBar) - GetWindowHeight(hStatusBar),
                   SWP_NOZORDER|SWP_NOACTIVATE);

    /* Size TreeView */
    DeferWindowPos(hdwp,
                   hTreeView,
                   0,
                   0,
                   GetWindowHeight(hToolBar),
                   VSplitterPos,
                   HIWORD(lParam) - GetWindowHeight(hToolBar) - GetWindowHeight(hStatusBar),
                   SWP_NOZORDER|SWP_NOACTIVATE);

    while (NewPos < SPLIT_WIDTH + GetWindowHeight(hToolBar))
    {
        RichPos--;
        NewPos = HIWORD(lParam) - (RichPos +
                 SPLIT_WIDTH + GetWindowHeight(hStatusBar));
    }
    SetHSplitterPos(NewPos);

    /* Size ListView */
    DeferWindowPos(hdwp,
                   hListView,
                   0,
                   VSplitterPos + SPLIT_WIDTH,
                   GetWindowHeight(hToolBar),
                   LOWORD(lParam) - (VSplitterPos + SPLIT_WIDTH),
                   GetHSplitterPos() - GetWindowHeight(hToolBar),
                   SWP_NOZORDER|SWP_NOACTIVATE);

    /* Size RichEdit */
    DeferWindowPos(hdwp,
                   hRichEdit,
                   0,
                   VSplitterPos + SPLIT_WIDTH,
                   GetHSplitterPos() + SPLIT_WIDTH,
                   LOWORD(lParam) - (VSplitterPos + SPLIT_WIDTH),
                   RichPos,
                   SWP_NOZORDER|SWP_NOACTIVATE);

    /* Size horizontal splitter bar */
    DeferWindowPos(hdwp,
                   hHSplitter,
                   0,
                   VSplitterPos + SPLIT_WIDTH,
                   GetHSplitterPos(),
                   LOWORD(lParam) - (VSplitterPos + SPLIT_WIDTH),
                   SPLIT_WIDTH,
                   SWP_NOZORDER|SWP_NOACTIVATE);

    EndDeferWindowPos(hdwp);
}

Generated on Sat May 26 2012 04:38:33 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.