Ignore:
Timestamp:
Mar 26, 2000, 6:34:57 PM (25 years ago)
Author:
cbratschi
Message:

merged with Corel WINE 20000324

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/brsfolder.cpp

    r3183 r3243  
    1 /* $Id: brsfolder.cpp,v 1.3 2000-03-21 17:33:21 cbratschi Exp $ */
     1/* $Id: brsfolder.cpp,v 1.4 2000-03-26 16:34:38 cbratschi Exp $ */
    22
    33/*
     
    88 * Project Odin Software License can be found in LICENSE.TXT
    99 *
     10 * Corel WINE 20000324 level
    1011 */
    1112
     
    5556ODINDEBUGCHANNEL(shell32-brsfolder)
    5657
     58#define         BRS_SPACE    40
     59#define         BRS_MARGIN    6
    5760#define         IDD_TREEVIEW 99
    5861
     
    282285}
    283286
     287/*************************************************************************
     288 *     ResizeControls (temporary solution and will be removed
     289 *                    if a horizontal scroll bar added to a tree control)
     290 */
     291
     292void ResizeConrols(HWND hWnd, int Cx, int Cy)
     293{
     294        POINT pt;
     295        HWND  hBtn;
     296        RECT  rcCtl;
     297
     298        // Move the treeView control
     299        if(hwndTreeView)
     300        {
     301                GetWindowRect(hwndTreeView, &rcCtl);
     302                pt.y = rcCtl.top;
     303                pt.x = rcCtl.left;
     304                ScreenToClient(hWnd, &pt);
     305                MoveWindow(hwndTreeView, pt.x, pt.y, Cx - pt.x - BRS_MARGIN, Cy - BRS_SPACE, TRUE);
     306        }
     307       
     308        // Move the OK button
     309        hBtn = GetDlgItem(hWnd, IDOK);
     310        if(hBtn)
     311        {
     312                GetWindowRect(hBtn, &rcCtl);
     313                pt.y = Cy - (BRS_MARGIN + (rcCtl.bottom - rcCtl.top));
     314                pt.x = Cx - 2 * (2 * BRS_MARGIN + (rcCtl.right - rcCtl.left));
     315                MoveWindow(hBtn, pt.x, pt.y, rcCtl.right - rcCtl.left, rcCtl.bottom - rcCtl.top, TRUE);
     316        }
     317
     318        // MOve the cancel button
     319        hBtn = GetDlgItem(hWnd, IDCANCEL);
     320        if(hBtn)
     321        {
     322                pt.x = Cx - (2 * BRS_MARGIN + (rcCtl.right - rcCtl.left));
     323                MoveWindow(hBtn, pt.x, pt.y, rcCtl.right - rcCtl.left, rcCtl.bottom - rcCtl.top, TRUE);
     324        }
     325}
    284326
    285327/*************************************************************************
     
    305347
    306348            InitializeTreeView ( hWnd);
     349            {
     350              RECT rcDlg;
     351
     352              GetClientRect(hWnd, &rcDlg);
     353              ResizeConrols(hWnd, rcDlg.right, rcDlg.bottom);
     354            }
    307355            return 1;
     356
     357          case WM_SIZE:
     358            ResizeConrols(hWnd, LOWORD(lParam), HIWORD(lParam));
     359            break;
    308360
    309361          case WM_NOTIFY:
Note: See TracChangeset for help on using the changeset viewer.