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 700 of file mainframe.cpp.

 :  super(hwnd)
{
    TBBUTTON mdiBtns[] = {
        {0, 0, 0, BTNS_SEP, {0, 0}, 0, 0},
        {0, ID_WINDOW_NEW, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
        {1, ID_WINDOW_CASCADE, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
        {2, ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
        {3, ID_WINDOW_TILE_VERT, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}
    };

    SendMessage(_htoolbar, TB_ADDBUTTONS, sizeof(mdiBtns)/sizeof(TBBUTTON), (LPARAM)&mdiBtns);

    CLIENTCREATESTRUCT ccs;

    ccs.hWindowMenu = _hMenuWindow;
    ccs.idFirstChild = IDW_FIRST_CHILD;

    _hmdiclient = CreateWindowEx(WS_EX_CLIENTEDGE|WS_EX_NOPARENTNOTIFY, TEXT("MDICLIENT"), NULL,
                    WS_CHILD|WS_CLIPCHILDREN|WS_VSCROLL|WS_HSCROLL|WS_VISIBLE|WS_BORDER,
                    0, 0, 0, 0,
                    hwnd, 0, g_Globals._hInstance, &ccs);

    TBBUTTON extraBtns = {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0};

#ifndef _NO_REBAR
    _hextrabar = CreateToolbarEx(hwnd,
                CCS_NOPARENTALIGN|CCS_NORESIZE|CCS_NODIVIDER|
                WS_CHILD|TBSTYLE_FLAT|WS_VISIBLE|CCS_NOMOVEY|TBSTYLE_LIST,
                IDW_EXTRABAR, 2, g_Globals._hInstance, IDB_DRIVEBAR, NULL, 0,
                16, 16, 16, 16, sizeof(TBBUTTON));
#else
    _hextrabar = CreateToolbarEx(hwnd,
                WS_CHILD|WS_VISIBLE|CCS_NOMOVEY|TBSTYLE_LIST,CCS_NODIVIDER|
                IDW_EXTRABAR, 2, g_Globals._hInstance, IDB_DRIVEBAR, &extraBtns, 1,
                16, 13, 16, 13, sizeof(TBBUTTON));
#endif

    CheckMenuItem(_menu_info._hMenuView, ID_VIEW_EXTRA_BAR, MF_BYCOMMAND|MF_CHECKED);


    extraBtns.fsStyle = BTNS_BUTTON;

#ifdef __WINE__
     // insert unix file system button
    extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("/\0"));
    extraBtns.idCommand = ID_DRIVE_UNIX_FS;
    SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);
#endif

     // insert explorer window button
    extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Explore\0"));
    extraBtns.idCommand = ID_DRIVE_DESKTOP;
    SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);

     // insert shell namespace button
    extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Shell\0"));
    extraBtns.idCommand = ID_DRIVE_SHELL_NS;
    extraBtns.iBitmap = 6;
    SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);

     // insert web control button
    extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Web\0"));
    extraBtns.idCommand = ID_WEB_WINDOW;
    extraBtns.iBitmap = 7;
    SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);

    if ((HIWORD(GetVersion())>>14) == W_VER_NT) {
         // insert NT object namespace button
        extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("NT Obj\0"));
        extraBtns.idCommand = ID_DRIVE_NTOBJ_NS;
        extraBtns.iBitmap = 8;
        SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);
    }
#ifndef __REACTOS__ // don't insert reg button for ROS. Regedit should be used.
     // insert Registry button
    extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Reg.\0"));
    extraBtns.idCommand = ID_DRIVE_REGISTRY;
    extraBtns.iBitmap = 9;
    SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);
#endif

#ifdef _DEBUG
     // insert FAT direct file system access button
    extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("FAT\0"));
    extraBtns.idCommand = ID_DRIVE_FAT;
    extraBtns.iBitmap = 10;
    SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);
#endif


    TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0};
#ifndef _NO_WIN_FS
    PTSTR p;

#ifndef _NO_REBAR
    _hdrivebar = CreateToolbarEx(hwnd,
                CCS_NOPARENTALIGN|CCS_NORESIZE|CCS_NODIVIDER|
                WS_CHILD|WS_VISIBLE|TBSTYLE_FLAT|CCS_NOMOVEY|TBSTYLE_LIST,
                IDW_DRIVEBAR, 2, g_Globals._hInstance, IDB_DRIVEBAR, NULL, 0,
                16, 16, 16, 16, sizeof(TBBUTTON));
#else
    _hdrivebar = CreateToolbarEx(hwnd,
                WS_CHILD|WS_VISIBLE|CCS_NOMOVEY|TBSTYLE_LIST|CCS_NODIVIDER,
                IDW_DRIVEBAR, 2, g_Globals._hInstance, IDB_DRIVEBAR, &drivebarBtn, 1,
                16, 13, 16, 13, sizeof(TBBUTTON));
#endif
#endif

    CheckMenuItem(_menu_info._hMenuView, ID_VIEW_DRIVE_BAR, MF_BYCOMMAND|MF_UNCHECKED);


#ifndef _NO_WIN_FS
    GetLogicalDriveStrings(BUFFER_LEN, _drives);

     // register windows drive root strings
    SendMessage(_hdrivebar, TB_ADDSTRING, 0, (LPARAM)_drives);

    drivebarBtn.fsStyle = BTNS_BUTTON;
    drivebarBtn.idCommand = ID_DRIVE_FIRST;

    for(p=_drives; *p; ) {
        switch(GetDriveType(p)) {
            case DRIVE_REMOVABLE:   drivebarBtn.iBitmap = 1;    break;
            case DRIVE_CDROM:       drivebarBtn.iBitmap = 3;    break;
            case DRIVE_REMOTE:      drivebarBtn.iBitmap = 4;    break;
            case DRIVE_RAMDISK:     drivebarBtn.iBitmap = 5;    break;
            default:/*DRIVE_FIXED*/ drivebarBtn.iBitmap = 2;
        }

        SendMessage(_hdrivebar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&drivebarBtn);
        ++drivebarBtn.idCommand;
        ++drivebarBtn.iString;

        while(*p++);
    }
#endif


#ifndef _NO_REBAR
    int btn_hgt = HIWORD(SendMessage(_htoolbar, TB_GETBUTTONSIZE, 0, 0));

    REBARBANDINFO rbBand;

    rbBand.cbSize = sizeof(REBARBANDINFO);
    rbBand.fMask  = RBBIM_TEXT|RBBIM_STYLE|RBBIM_CHILD|RBBIM_CHILDSIZE|RBBIM_SIZE;
#ifndef RBBS_HIDETITLE // missing in MinGW headers as of 25.02.2004
#define RBBS_HIDETITLE  0x400
#endif
    rbBand.fStyle = RBBS_CHILDEDGE|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE;

    TCHAR ExtrasBand[] = _T("Extras");
    rbBand.lpText = ExtrasBand;
    rbBand.hwndChild = _hextrabar;
    rbBand.cxMinChild = 0;
    rbBand.cyMinChild = btn_hgt;
    rbBand.cx = 284;
    SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)1, (LPARAM)&rbBand);

#ifndef _NO_WIN_FS
    rbBand.fStyle |= RBBS_BREAK;
    TCHAR DrivesBand[] = _T("Drives");
    rbBand.lpText = DrivesBand;
    rbBand.hwndChild = _hdrivebar;
    rbBand.cxMinChild = 0;
    rbBand.cyMinChild = btn_hgt;
    rbBand.cx = 400;
    SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)2, (LPARAM)&rbBand);

    // hide the drivebar by default
    SendMessage(_hwndrebar, RB_SHOWBAND, 2, FALSE);
#endif
#endif
}

Generated on Sun May 27 2012 06:30:08 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.