Ignore:
Timestamp:
Apr 13, 2002, 8:19:31 AM (23 years ago)
Author:
bird
Message:

Corrected call to GetDriveType. (missing ':')

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/pmwindow.cpp

    r8129 r8256  
    1 /* $Id: pmwindow.cpp,v 1.171 2002-03-28 11:26:00 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.172 2002-04-13 06:19:31 bird Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    193193
    194194    fOS2Look = PROFILE_GetOdinIniBool(ODINSYSTEM_SECTION, "OS2Look", FALSE);
    195     if(fOS2Look) 
     195    if(fOS2Look)
    196196    {
    197197        CHAR szDisplay[30];
     
    224224void WIN32API SetWindowAppearance(int fLooks)
    225225{
    226     if(fLooks == OS2_APPEARANCE || fLooks == OS2_APPEARANCE_SYSMENU) 
     226    if(fLooks == OS2_APPEARANCE || fLooks == OS2_APPEARANCE_SYSMENU)
    227227    {
    228228        CHAR szDisplay[30];
     
    231231        SYSCOLOR_Init(FALSE); //use OS/2 colors
    232232
    233         if(hbmFrameMenu[0] == 0) 
     233        if(hbmFrameMenu[0] == 0)
    234234        {
    235235            CHAR szDisplay[30];
     
    282282    case WM_CREATE:
    283283    {
    284         char drive[2];
     284        char drive[4];
    285285
    286286        //skip floppy drives
    287287        drive[0] = 'C';
    288         drive[1] = 0;
     288        drive[1] = ':';
     289        drive[2] = '\0';
    289290
    290291        for(int i=2;i<26;i++) {
    291292           drives[i] = GetDriveTypeA(drive);
    292            if(drives[i] == DRIVE_CDROM_W) 
     293           if(drives[i] == DRIVE_CDROM_W)
    293294           {
    294295                DWORD parsize = sizeof(ParameterBlock);
     
    322323    case WM_TIMER:
    323324    {
    324         for(int i=0;i<26;i++) 
     325        for(int i=0;i<26;i++)
    325326        {
    326327            //for now only cdrom/dvd drives
    327             if(drives[i] == DRIVE_CDROM_W) 
     328            if(drives[i] == DRIVE_CDROM_W)
    328329            {
    329330                DWORD parsize = sizeof(ParameterBlock);
     
    342343                }
    343344                //Send WM_DEVICECHANGE message when CD status changes
    344                 if((status & 4) != drivestatus[i]) 
     345                if((status & 4) != drivestatus[i])
    345346                {
    346347                    PID pidThis, pidTemp;
     
    358359
    359360                    WinQueryWindowProcess(hwnd, &pidThis, NULL);
    360  
     361
    361362                    //Iterate over all child windows of the desktop
    362363                    henum = WinBeginEnumWindows(HWND_DESKTOP);
    363364
    364                     SetWin32TIB();   
     365                    SetWin32TIB();
    365366                    while(hwndEnum = WinGetNextWindow(henum))
    366367                    {
     
    370371                            HWND hwndWin32 = OS2ToWin32Handle(hwndEnum);
    371372                            if(hwndWin32) {
    372                                 SendMessageA(hwndWin32, 
    373                                              WM_DEVICECHANGE_W, 
    374                                              (status & 4) ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE, 
     373                                SendMessageA(hwndWin32,
     374                                             WM_DEVICECHANGE_W,
     375                                             (status & 4) ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE,
    375376                                             (LPARAM)&volchange);
    376377                            }
     
    691692        win32wnd->DispatchMsgA(pWinMsg);
    692693        break;
    693      
     694
    694695    case WM_CHAR_SPECIAL:
    695696      /* NO BREAK! FALLTHRU CASE! */
    696      
     697
    697698    case WM_CHAR:
    698699        dprintf(("OS2: WM_CHAR %x %x %x, %x %x", win32wnd->getWindowHandle(), mp1, mp2, pWinMsg->wParam, pWinMsg->lParam));
     
    10541055        win32wnd->MsgPosChanging((LPARAM)&wp);
    10551056
    1056         if(win32wnd->getOldStyle() != win32wnd->getStyle()) 
     1057        if(win32wnd->getOldStyle() != win32wnd->getStyle())
    10571058        {
    10581059             OSLibSetWindowStyle(win32wnd->getOS2FrameWindowHandle(), win32wnd->getOS2WindowHandle(), win32wnd->getStyle(), win32wnd->getExStyle());
     
    11261127adjustend:
    11271128        //The next part needs to be done for top-level windows only
    1128         if(!((win32wnd->getStyle() & (WS_POPUP_W|WS_CHILD_W)) == WS_CHILD_W)) 
     1129        if(!((win32wnd->getStyle() & (WS_POPUP_W|WS_CHILD_W)) == WS_CHILD_W))
    11291130        {
    11301131            //Setting these flags is necessary to avoid activation/focus problems
     
    11321133                ret |= AWP_DEACTIVATE;
    11331134            }
    1134             if(ulFlags & SWP_ACTIVATE) 
     1135            if(ulFlags & SWP_ACTIVATE)
    11351136            {
    11361137                if(ulFlags & SWP_ZORDER) {
     
    11511152        }
    11521153        else {
    1153             if(ulFlags & (SWP_ACTIVATE|SWP_FOCUSACTIVATE)) 
     1154            if(ulFlags & (SWP_ACTIVATE|SWP_FOCUSACTIVATE))
    11541155            {
    11551156                win32wnd->MsgChildActivate(TRUE);
     
    11591160                }
    11601161            }
    1161             else 
    1162             if(ulFlags & (SWP_DEACTIVATE|SWP_FOCUSDEACTIVATE)) 
     1162            else
     1163            if(ulFlags & (SWP_DEACTIVATE|SWP_FOCUSDEACTIVATE))
    11631164            {
    11641165                win32wnd->MsgChildActivate(FALSE);
     
    11931194            win32wnd->callVisibleRgnNotifyProc(TRUE);
    11941195        }
    1195         else 
     1196        else
    11961197        if(pswp->fl & SWP_HIDE) {
    11971198            win32wnd->callVisibleRgnNotifyProc(FALSE);
     
    12101211            if(pswp->fl & SWP_HIDE) {
    12111212                WinShowWindow(win32wnd->getOS2WindowHandle(), 0);
    1212             } 
     1213            }
    12131214            //MUST call the old frame window proc!
    12141215            goto RunDefFrameWndProc;
     
    15471548                if(win32wnd->getOwner()) {
    15481549                    Win32BaseWindow *topOwner = Win32BaseWindow::GetWindowFromHandle(win32wnd->getOwner()->GetTopParent());
    1549  
     1550
    15501551                    if (topOwner) {
    15511552                        WinSetWindowPos(topOwner->getOS2FrameWindowHandle(),hwnd,0,0,0,0,SWP_ZORDER);
     
    17391740    WinSetWindowUShort(hwnd, QWS_FLAGS, ulFrameFlags);
    17401741}
    1741 #ifndef CUSTOM_TRACKFRAME 
     1742#ifndef CUSTOM_TRACKFRAME
    17421743//******************************************************************************
    17431744//TODO: Quickly moving a window two times doesn't force a repaint (1st time)
Note: See TracChangeset for help on using the changeset viewer.