Changeset 3250 for trunk/src


Ignore:
Timestamp:
Mar 27, 2000, 5:09:22 PM (25 years ago)
Author:
cbratschi
Message:

* empty log message *

Location:
trunk/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/listview.cpp

    r3242 r3250  
    1 /*$Id: listview.cpp,v 1.8 2000-03-26 16:32:33 cbratschi Exp $*/
     1/*$Id: listview.cpp,v 1.9 2000-03-27 15:08:07 cbratschi Exp $*/
    22/*
    33 * Listview control
     
    73067306  if (bRedraw)
    73077307  {
     7308    if (!(infoPtr->internalFlags & IF_NOREDRAW)) return 0;
    73087309    infoPtr->internalFlags &= ~IF_NOREDRAW;
    73097310    lResult = DefWindowProcA(hwnd, WM_SETREDRAW, bRedraw, 0);
  • trunk/src/comdlg32/filedlg95.c

    r3243 r3250  
    1 /* $Id: filedlg95.c,v 1.4 2000-03-26 16:31:41 cbratschi Exp $*/
     1/* $Id: filedlg95.c,v 1.5 2000-03-27 15:07:22 cbratschi Exp $*/
    22/*
    33 * COMMDLG - File Open Dialogs Win95 look and feel
     
    860860  /* Initialise shell objects */
    861861  FILEDLG95_SHELL_Init(hwnd);
    862 dprintf(("CB: FILEDLG95_InitUI %d ms",GetTickCount()-count));
    863 count = GetTickCount();
     862//dprintf(("CB: FILEDLG95_InitUI %d ms",GetTickCount()-count));
     863//count = GetTickCount();
    864864  /* Initialise dialog UI */
    865865  FILEDLG95_InitUI(hwnd);
    866 dprintf(("CB: FILEDLG95_LOOKIN_Init %d",GetTickCount()-count));
    867 count = GetTickCount();
     866//dprintf(("CB: FILEDLG95_LOOKIN_Init %d",GetTickCount()-count));
     867//count = GetTickCount();
    868868  /* Initialize the Look In combo box*/
    869869  FILEDLG95_LOOKIN_Init(fodInfos->DlgInfos.hwndLookInCB);
    870 dprintf(("CB: FILEDLG95_FILETYPE_Init %d",GetTickCount()-count));
    871 count = GetTickCount();
     870//dprintf(("CB: FILEDLG95_FILETYPE_Init %d",GetTickCount()-count));
     871//count = GetTickCount();
    872872  /* Initialize the filter combo box */
    873873  FILEDLG95_FILETYPE_Init(hwnd);
    874 dprintf(("CB: FILEDLG95_FILETYPE_Init done %d",GetTickCount()-count));
    875 count = GetTickCount();
     874//dprintf(("CB: FILEDLG95_FILETYPE_Init done %d",GetTickCount()-count));
     875//count = GetTickCount();
    876876  /* Get the initial directory pidl */
    877877
     
    887887dprintf(("CB: IShellBrowser_BrowseObject %d",GetTickCount()-count));
    888888count = GetTickCount();
     889//CB: slowest part
    889890  /* Browse to the initial directory */
    890891  IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser,pidlItemId,SBSP_RELATIVE);
  • trunk/src/comdlg32/filedlgbrowser.c

    r3243 r3250  
    1 /* $Id: filedlgbrowser.c,v 1.3 2000-03-26 16:31:42 cbratschi Exp $ */
     1/* $Id: filedlgbrowser.c,v 1.4 2000-03-27 15:07:23 cbratschi Exp $ */
    22/*
    33 *  Implementation of IShellBrowser for the File Open common dialog
     
    756756
    757757    TRACE("(%p)\n", This);
    758 
     758//CB: slow!!!
    759759    fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
    760760
     
    782782    }
    783783    return S_FALSE;
    784 
    785784}
    786785
  • trunk/src/shell32/enumidlist.cpp

    r3243 r3250  
    1 /* $Id: enumidlist.cpp,v 1.2 2000-03-26 16:34:40 cbratschi Exp $ */
     1/* $Id: enumidlist.cpp,v 1.3 2000-03-27 15:09:19 cbratschi Exp $ */
    22
    33/*
     
    6060        LPENUMLIST                      mpLast;
    6161        LPENUMLIST                      mpCurrent;
     62        LPENUMLIST                      mpFirst2;
     63        LPENUMLIST                      mpLast2;
     64        LPENUMLIST                      mpCurrent2;
     65
    6266
    6367} IEnumIDListImpl;
     
    106110
    107111/**************************************************************************
     112 *  AddToEnumList()
     113 */
     114static BOOL AddToEnumList2(
     115        IEnumIDList * iface,
     116        LPITEMIDLIST pidl)
     117{
     118        ICOM_THIS(IEnumIDListImpl,iface);
     119
     120        LPENUMLIST  pNew;
     121
     122        TRACE("(%p)->(pidl=%p)\n",This,pidl);
     123        pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST));
     124        if(pNew)
     125        {
     126          /*set the next pointer */
     127          pNew->pNext = NULL;
     128          pNew->pidl = pidl;
     129
     130          /*is This the first item in the list? */
     131          if(!This->mpFirst2)
     132          {
     133            This->mpFirst2 = pNew;
     134            This->mpCurrent2 = pNew;
     135          }
     136
     137          if(This->mpLast2)
     138          {
     139            /*add the new item to the end of the list */
     140            This->mpLast2->pNext = pNew;
     141          }
     142
     143          /*update the last item pointer */
     144          This->mpLast2 = pNew;
     145          TRACE("-- (%p)->(first=%p, last=%p)\n",This,This->mpFirst2,This->mpLast2);
     146          return TRUE;
     147        }
     148        return FALSE;
     149}
     150
     151static VOID UniteEnumLists(IEnumIDList * iface)
     152{
     153  ICOM_THIS(IEnumIDListImpl,iface);
     154
     155  if (This->mpFirst2)
     156  {
     157    /*is This the first item in the list? */
     158    if(!This->mpFirst)
     159    {
     160      This->mpFirst = This->mpFirst2;
     161      This->mpCurrent = This->mpFirst2;
     162    }
     163
     164    if(This->mpLast)
     165    {
     166      /*add the new item to the end of the list */
     167      This->mpLast->pNext = This->mpFirst2;
     168    }
     169
     170    /*update the last item pointer */
     171    This->mpLast = This->mpLast2;
     172
     173    This->mpFirst2 = NULL;
     174    This->mpCurrent2 = NULL;
     175    This->mpLast2 = NULL;
     176  }
     177}
     178
     179/**************************************************************************
    108180 *  CreateFolderEnumList()
    109181 */
     
    137209            do
    138210            {
    139               if ( (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && strcmp (stffile.cFileName, ".") && strcmp (stffile.cFileName, ".."))
    140               {
    141                 pidl = _ILCreateFolder (&stffile);
    142                 if(pidl && AddToEnumList((IEnumIDList*)This, pidl))
     211              if (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
     212              { //directory
     213                if (strcmp (stffile.cFileName, ".") && strcmp (stffile.cFileName, ".."))
     214                {
     215                  pidl = _ILCreateFolder (&stffile);
     216                  if(pidl && AddToEnumList((IEnumIDList*)This, pidl))
     217                  {
     218                    continue;
     219                  }
     220                  return FALSE;
     221                }
     222              } else if (dwFlags & SHCONTF_NONFOLDERS)
     223              { //file
     224                pidl = _ILCreateValue(&stffile);
     225                if(pidl && AddToEnumList2((IEnumIDList*)This, pidl))
    143226                {
    144227                  continue;
     
    148231            } while( FindNextFileA(hFile,&stffile));
    149232            FindClose (hFile);
     233            UniteEnumLists((IEnumIDList*)This);
    150234          }
    151235        }
    152236
    153237        /*enumerate the non-folder items (values) */
    154         if(dwFlags & SHCONTF_NONFOLDERS)
     238        if((dwFlags & SHCONTF_NONFOLDERS) && !(dwFlags & SHCONTF_FOLDERS))
    155239        {
    156240          TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",This,debugstr_a(szPath));
  • trunk/src/shell32/iconcache.cpp

    r3243 r3250  
    1 /* $Id: iconcache.cpp,v 1.4 2000-03-26 16:34:41 cbratschi Exp $ */
     1/* $Id: iconcache.cpp,v 1.5 2000-03-27 15:09:20 cbratschi Exp $ */
    22
    33/*
     
    135135     size = ne_header.rname_tab_offset - ne_header.resource_tab_offset;
    136136
    137 //@@@PH no NE support
    138 #if 1
    139137     if( size > sizeof(NE_TYPEINFO) )
    140138     { pTypeInfo = (BYTE*)HeapAlloc( GetProcessHeap(), 0, size);
     
    147145       }
    148146     }
    149 #endif
    150147
    151148     *retptr = pTypeInfo;
     
    157154 *       SHELL_LoadResource
    158155 */
    159 //@@@PH no NE support
    160 #if 1
    161156static BYTE * SHELL_LoadResource( HFILE hFile, NE_NAMEINFO* pNInfo, WORD sizeShift, ULONG *uSize)
    162157{  BYTE*  ptr;
     
    173168   return 0;
    174169}
    175 #endif
    176170
    177171/*************************************************************************
     
    256250 */
    257251HGLOBAL WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON * RetPtr, UINT nIconIndex, UINT n, UINT cxDesired, UINT cyDesired )
    258 // @@@PH turned off
    259 #if 0
    260 {
    261   dprintf (("SHELL32: ICO_ExtractIconEx not implemented.\n"));
    262   return 0;
    263 }
    264 #else
    265252{  HGLOBAL  hRet = 0;
    266253   LPBYTE      pData;
     
    268255   DWORD    sig;
    269256   HFILE    hFile = OpenFile( lpszExeFileName, &ofs, OF_READ );
    270    UINT16      iconDirCount = 0,iconCount = 0;
     257   UINT      iconDirCount = 0,iconCount = 0;
    271258   LPBYTE      peimage;
    272259   HANDLE      fmapping;
     
    280267   sig = SHELL_GetResourceTable(hFile,&pData);
    281268
    282 //@@@PH no NE support
    283 #if 1
    284 /* ico file */
     269   /* ico file */
    285270   if( sig==IMAGE_OS2_SIGNATURE || sig==1 ) /* .ICO file */
    286271   { BYTE      *pCIDir = 0;
     
    318303       }
    319304       else if( nIconIndex < iconDirCount )
    320        { UINT16   i, icon;
     305       { UINT   i, icon;
    321306         if( n > iconDirCount - nIconIndex )
    322307           n = iconDirCount - nIconIndex;
     
    357342       HeapFree( GetProcessHeap(), 0, pData);
    358343   }
    359 /* end ico file */
    360 #endif
    361 
    362 /* exe/dll */
     344   /* end ico file */
     345
     346   /* exe/dll */
    363347   if( sig == IMAGE_NT_SIGNATURE)
    364348   { LPBYTE    idata,igdata;
     
    514498   return hRet;
    515499}
    516 #endif
    517500
    518501/********************** THE ICON CACHE ********************************/
     
    948931
    949932/**********************************************************************
    950  *          GetResDirEntryW
    951  *
    952  *      Helper function - goes down one level of PE resource tree
     933 *          GetResDirEntryW
     934 *
     935 *      Helper function - goes down one level of PE resource tree
    953936 *
    954937 */
    955938PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY resdirptr,
    956                                            LPCWSTR name,DWORD root,
    957                                            BOOL allowdefault)
     939                                           LPCWSTR name,DWORD root,
     940                                           BOOL allowdefault)
    958941{
    959942    int entrynum;
     
    962945
    963946    if (HIWORD(name)) {
    964         if (name[0]=='#') {
    965                 char    buf[10];
    966 
    967                 lstrcpynWtoA(buf,name+1,10);
    968                 return GetResDirEntryW(resdirptr,(LPCWSTR)atoi(buf),root,allowdefault);
    969         }
    970         entryTable = (PIMAGE_RESOURCE_DIRECTORY_ENTRY) (
    971                         (BYTE *) resdirptr +
     947        if (name[0]=='#') {
     948                char    buf[10];
     949
     950                lstrcpynWtoA(buf,name+1,10);
     951                return GetResDirEntryW(resdirptr,(LPCWSTR)atoi(buf),root,allowdefault);
     952        }
     953        entryTable = (PIMAGE_RESOURCE_DIRECTORY_ENTRY) (
     954                        (BYTE *) resdirptr +
    972955                        sizeof(IMAGE_RESOURCE_DIRECTORY));
    973         namelen = lstrlenW(name);
    974         for (entrynum = 0; entrynum < resdirptr->NumberOfNamedEntries; entrynum++)
    975         {
    976                 PIMAGE_RESOURCE_DIR_STRING_U str =
    977                 (PIMAGE_RESOURCE_DIR_STRING_U) (root +
    978                         entryTable[entrynum].u1.s.NameOffset);
    979                 if(namelen != str->Length)
    980                         continue;
    981                 if(lstrncmpiW(name,str->NameString,str->Length)==0)
    982                         return (PIMAGE_RESOURCE_DIRECTORY) (
    983                                 root +
    984                                 entryTable[entrynum].u2.s.OffsetToDirectory);
    985         }
    986         return NULL;
     956        namelen = lstrlenW(name);
     957        for (entrynum = 0; entrynum < resdirptr->NumberOfNamedEntries; entrynum++)
     958        {
     959                PIMAGE_RESOURCE_DIR_STRING_U str =
     960                (PIMAGE_RESOURCE_DIR_STRING_U) (root +
     961                        entryTable[entrynum].u1.s.NameOffset);
     962                if(namelen != str->Length)
     963                        continue;
     964                if(lstrncmpiW(name,str->NameString,str->Length)==0)
     965                        return (PIMAGE_RESOURCE_DIRECTORY) (
     966                                root +
     967                                entryTable[entrynum].u2.s.OffsetToDirectory);
     968        }
     969        return NULL;
    987970    } else {
    988         entryTable = (PIMAGE_RESOURCE_DIRECTORY_ENTRY) (
    989                         (BYTE *) resdirptr +
     971        entryTable = (PIMAGE_RESOURCE_DIRECTORY_ENTRY) (
     972                        (BYTE *) resdirptr +
    990973                        sizeof(IMAGE_RESOURCE_DIRECTORY) +
    991                         resdirptr->NumberOfNamedEntries * sizeof(IMAGE_RESOURCE_DIRECTORY_ENTRY));
    992         for (entrynum = 0; entrynum < resdirptr->NumberOfIdEntries; entrynum++)
    993             if ((DWORD)entryTable[entrynum].u1.Name == (DWORD)name)
    994                 return (PIMAGE_RESOURCE_DIRECTORY) (
    995                         root +
    996                         entryTable[entrynum].u2.s.OffsetToDirectory);
    997         /* just use first entry if no default can be found */
    998         if (allowdefault && !name && resdirptr->NumberOfIdEntries)
    999                 return (PIMAGE_RESOURCE_DIRECTORY) (
    1000                         root +
    1001                         entryTable[0].u2.s.OffsetToDirectory);
    1002         return NULL;
     974                        resdirptr->NumberOfNamedEntries * sizeof(IMAGE_RESOURCE_DIRECTORY_ENTRY));
     975        for (entrynum = 0; entrynum < resdirptr->NumberOfIdEntries; entrynum++)
     976            if ((DWORD)entryTable[entrynum].u1.Name == (DWORD)name)
     977                return (PIMAGE_RESOURCE_DIRECTORY) (
     978                        root +
     979                        entryTable[entrynum].u2.s.OffsetToDirectory);
     980        /* just use first entry if no default can be found */
     981        if (allowdefault && !name && resdirptr->NumberOfIdEntries)
     982                return (PIMAGE_RESOURCE_DIRECTORY) (
     983                        root +
     984                        entryTable[0].u2.s.OffsetToDirectory);
     985        return NULL;
    1003986    }
    1004987}
  • trunk/src/shell32/shell.cpp

    r3243 r3250  
    1 /* $Id: shell.cpp,v 1.5 2000-03-26 16:34:43 cbratschi Exp $ */
     1/* $Id: shell.cpp,v 1.6 2000-03-27 15:09:20 cbratschi Exp $ */
    22
    33/*
     
    479479
    480480   if (*(WORD*)magic == IMAGE_OS2_SIGNATURE)
    481    { IMAGE_OS2_HEADER                    ne_header;
     481   {
     482     IMAGE_OS2_HEADER                    ne_header;
    482483     LPBYTE    pTypeInfo = (LPBYTE)-1;
    483484
     
    490491     size = ne_header.rname_tab_offset - ne_header.resource_tab_offset;
    491492
    492 //@@@PH no NE support
    493 #if 1
    494493     if( size > sizeof(NE_TYPEINFO) )
    495      { pTypeInfo = (BYTE*)HeapAlloc( GetProcessHeap(), 0, size);
     494     {
     495       pTypeInfo = (BYTE*)HeapAlloc( GetProcessHeap(), 0, size);
    496496       if( pTypeInfo )
    497        { _llseek(hFile, mz_header.e_lfanew+ne_header.resource_tab_offset, SEEK_SET);
     497       {
     498         _llseek(hFile, mz_header.e_lfanew+ne_header.resource_tab_offset, SEEK_SET);
    498499         if( _lread( hFile, (char*)pTypeInfo, size) != size )
    499          { HeapFree( GetProcessHeap(), 0, pTypeInfo);
    500       pTypeInfo = NULL;
     500         {
     501           HeapFree( GetProcessHeap(), 0, pTypeInfo);
     502           pTypeInfo = NULL;
    501503         }
    502504       }
    503505     }
    504 #endif
    505506
    506507     *retptr = pTypeInfo;
  • trunk/src/shell32/shell32_main.cpp

    r3243 r3250  
    1 /* $Id: shell32_main.cpp,v 1.9 2000-03-26 16:34:49 cbratschi Exp $ */
     1/* $Id: shell32_main.cpp,v 1.10 2000-03-27 15:09:21 cbratschi Exp $ */
    22
    33/*
     
    420420#define     IDC_STATIC_TEXT                 100
    421421#define     IDC_LISTBOX                     99
    422 #define     IDC_WINE_TEXT                   98
     422#define     IDC_ODIN_TEXT                   98
    423423
    424424#define     DROP_FIELD_TOP                  (-15)
     
    430430
    431431static BOOL __get_dropline( HWND hWnd, LPRECT lprect )
    432 { HWND hWndCtl = GetDlgItem(hWnd, IDC_WINE_TEXT);
     432{ HWND hWndCtl = GetDlgItem(hWnd, IDC_ODIN_TEXT);
    433433    if( hWndCtl )
    434434  { GetWindowRect( hWndCtl, lprect );
     
    705705            hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX);
    706706            SendMessageA( hWndCtl, WM_SETREDRAW, 0, 0 );
    707 #if 0 //CB: not used
     707#if 0 //CB: not used (hIconTitleFont not valid!!!), default font is ok
    708708            SendMessageA( hWndCtl, WM_SETFONT, hIconTitleFont, 0 );
    709709#endif
     
    733733   }
    734734
    735 #if 0
    736 // @@@PH turned off
    737735    case WM_LBTRACKPOINT:
    738736   hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX);
     
    750748         SendMessageA( hWndCtl, LB_DELETESTRING, (WPARAM)idx, 0 );
    751749         UpdateWindow( hWndCtl );
    752    //@@@PH DragObject16 experimentally replaced by DragObject
     750
    753751         if( !DragObject(hWnd, hWnd, DRAGOBJ_DATA, hMemObj, hCursor) )
    754752             SendMessageA( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)pstr );
     
    763761    case WM_QUERYDROPOBJECT:
    764762   if( wParam == 0 )
    765       { LPDRAGINFO lpDragInfo = (LPDRAGINFO)PTR_SEG_TO_LIN((SEGPTR)lParam);
     763      { LPDRAGINFO lpDragInfo = (LPDRAGINFO)lParam;
    766764       if( lpDragInfo && lpDragInfo->wFlags == DRAGOBJ_DATA )
    767765        { RECT rect;
     
    782780    case WM_DROPOBJECT:
    783781   if( wParam == hWnd )
    784       { LPDRAGINFO lpDragInfo = (LPDRAGINFO)PTR_SEG_TO_LIN((SEGPTR)lParam);
     782      { LPDRAGINFO lpDragInfo = (LPDRAGINFO)lParam;
    785783       if( lpDragInfo && lpDragInfo->wFlags == DRAGOBJ_DATA && lpDragInfo->hList )
    786784        { char* pstr = (char*)GlobalLock( (HGLOBAL)(lpDragInfo->hList) );
     
    788786          { static char __appendix_str[] = " with";
    789787
    790           hWndCtl = GetDlgItem( hWnd, IDC_WINE_TEXT );
     788          hWndCtl = GetDlgItem( hWnd, IDC_ODIN_TEXT );
    791789          SendMessageA( hWndCtl, WM_GETTEXT, 512, (LPARAM)Template );
    792           if( !strncmp( Template, "WINE", 4 ) )
     790          if( !strncmp( Template, "ODIN", 4 ) )
    793791         SetWindowTextA( GetDlgItem(hWnd, IDC_STATIC_TEXT), Template );
    794792          else
     
    808806   }
    809807   break;
    810 #endif
    811 
    812808
    813809    case WM_COMMAND:
  • trunk/src/shell32/shlfolder.cpp

    r3243 r3250  
    1 /* $Id: shlfolder.cpp,v 1.9 2000-03-26 16:34:52 cbratschi Exp $ */
     1/* $Id: shlfolder.cpp,v 1.10 2000-03-27 15:09:21 cbratschi Exp $ */
    22/*
    33 * Shell Folder stuff
     
    20972097       DWORD dwVolumeSerialNumber,dwMaximumComponetLength,dwFileSystemFlags;
    20982098
    2099        GetVolumeInformationA(szPath,szDrive,12,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0);
     2099       if ((szPath[0] == 'A') || (szPath[0] == 'a') || (szPath[0] == 'B') || (szPath[0] == 'b'))
     2100       {
     2101//CB: todo: move to resource, German name is "3,5-Diskette" -> English "3.5-Disk"?
     2102         strcpy(szDrive,"Floppy drive");
     2103       } else
     2104       {
     2105         GetVolumeInformationA(szPath,szDrive,12,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0);
     2106       }
    21002107       strcat (szDrive," (");
    21012108       strncat (szDrive, szPath, 2);
  • trunk/src/shell32/shlview.cpp

    r3243 r3250  
    1 /* $Id: shlview.cpp,v 1.9 2000-03-26 16:34:54 cbratschi Exp $ */
     1/* $Id: shlview.cpp,v 1.10 2000-03-27 15:09:22 cbratschi Exp $ */
    22/*
    33 * ShellView
     
    1717 * buily according to the columns shown.
    1818 *
    19  * FIXME: Load/Save the view state from/into the stream provied by
     19 * FIXME: Load/Save the view state from/into the stream provided by
    2020 * the ShellBrowser
    2121 *
     
    496496   LPITEMIDLIST   pidl;
    497497   DWORD    dwFetched;
    498    UINT     i;
     498   UINT     i,iPos;
    499499   LVITEMA  lvItem;
    500500   HRESULT  hRes;
     
    502502
    503503//CB: really slow, even without debug information
    504    //DecreaseLogCount();
    505504   TRACE("%p\n",This);
    506505
     
    517516   }
    518517
    519 //CB: ILClone calls
    520518   /* create a pointer array */
    521    hdpa = pDPA_Create(64);
     519   hdpa = pDPA_Create(1024);
    522520   if (!hdpa)
    523521   {
     
    526524
    527525   /* copy the items into the array*/
    528    while((S_OK == IEnumIDList_Next(pEnumIDList,1, &pidl, &dwFetched)) && dwFetched)
     526   while((S_OK == IEnumIDList_Next(pEnumIDList,1,(LPITEMIDLIST*)&pidl,&dwFetched)) && dwFetched)
    529527   {
    530528     if (pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
     
    534532   }
    535533
    536 //CB: only Get* calls
    537534   /*sort the array*/
    538535   pDPA_Sort(hdpa, (PFNDPACOMPARE)ShellView_CompareItems, (LPARAM)This->pSFParent);
     
    545542   lvItem.pszText = LPSTR_TEXTCALLBACKA;                  /*get text on a callback basis*/
    546543   lvItem.iImage = I_IMAGECALLBACK;                       /*get the image on a callback basis*/
     544   iPos = ListView_GetItemCount(This->hWndList);
    547545
    548546   for (i = 0; i < DPA_GetPtrCount(hdpa); ++i)   /* DPA_GetPtrCount is a macro*/
     
    552550     if (IncludeObject(This, pidl) == S_OK) /* in a commdlg This works as a filemask*/
    553551     {
    554        lvItem.iItem = i;                                      /*add the item to the end of the list*/
     552       lvItem.iItem = iPos;                                      /*add the item to the end of the list*/
    555553       lvItem.lParam = (LPARAM)pidl;                         /*set the item's data*/
    556554       ListView_InsertItemA(This->hWndList, &lvItem);
     555       iPos++;
    557556     }
    558557     else
     
    565564   IEnumIDList_Release(pEnumIDList); /* destroy the list*/
    566565   pDPA_Destroy(hdpa);
    567    //IncreaseLogCount();
    568566
    569567   return S_OK;
  • trunk/src/user32/dc.cpp

    r2881 r3250  
    1 /* $Id: dc.cpp,v 1.49 2000-02-24 19:19:07 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.50 2000-03-27 15:06:29 cbratschi Exp $ */
    22
    33/*
     
    501501   {
    502502      long height  = wnd->getClientHeight();
     503
    503504      rect.yTop    = height - rect.yTop;
    504505      rect.yBottom = height - rect.yBottom;
  • trunk/src/user32/oslibwin.cpp

    r3144 r3250  
    1 /* $Id: oslibwin.cpp,v 1.71 2000-03-17 17:12:08 cbratschi Exp $ */
     1/* $Id: oslibwin.cpp,v 1.72 2000-03-27 15:06:29 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    199199//******************************************************************************
    200200//******************************************************************************
    201 LONG OSLibWinQuerySysValue(HWND hwndDeskTop,LONG iSysValue)
    202 {
    203   return WinQuerySysValue(hwndDeskTop,iSysValue);
     201LONG OSLibWinQuerySysValue(LONG iSysValue)
     202{
     203  return WinQuerySysValue(HWND_DESKTOP,iSysValue);
    204204}
    205205//******************************************************************************
     
    217217//******************************************************************************
    218218//******************************************************************************
    219 BOOL OSLibWinQueryPointerPos(HWND hwndDeskTop,PPOINT pptlPoint)
    220 {
    221   return WinQueryPointerPos(hwndDeskTop,(PPOINTL)pptlPoint);
     219BOOL OSLibWinQueryPointerPos(PPOINT pptlPoint)
     220{
     221  return WinQueryPointerPos(HWND_DESKTOP,(PPOINTL)pptlPoint);
    222222}
    223223//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r2676 r3250  
    1 /* $Id: oslibwin.h,v 1.39 2000-02-07 14:30:18 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.40 2000-03-27 15:06:30 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    177177#define SVOS_CSYSVALUES              108
    178178
    179 LONG OSLibWinQuerySysValue(HWND hwndDeskTop,LONG iSysValue);
     179LONG OSLibWinQuerySysValue(LONG iSysValue);
    180180ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer);
    181181BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText);
    182 BOOL OSLibWinQueryPointerPos(HWND hwndDeskTop,PPOINT pptlPoint); //pptlPoint == POINTL pointer!
     182BOOL OSLibWinQueryPointerPos(PPOINT pptlPoint); //pptlPoint == POINTL pointer!
    183183
    184184#define SWPOS_SIZE                   0x0001
  • trunk/src/user32/user32.cpp

    r3209 r3250  
    1 /* $Id: user32.cpp,v 1.75 2000-03-23 23:06:52 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.76 2000-03-27 15:06:30 cbratschi Exp $ */
    22
    33/*
     
    3434#include "syscolor.h"
    3535#include "pmwindow.h"
     36#include "oslibgdi.h"
    3637
    3738#include <wchar.h>
     
    8788/* Coordinate Transformation */
    8889
    89 inline void OS2ToWin32ScreenPos(POINT *dest,POINT *source)
    90 {
    91   dest->x = source->x;
    92   dest->y = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN)-1-source->y;
    93 }
    94 
    95 inline void Win32ToOS2ScreenPos(POINT *dest,POINT *source)
    96 {
    97   OS2ToWin32ScreenPos(dest,source); //transform back
    98 }
    99 
    10090/* Rectangle Functions - parts from wine/windows/rect.c */
    10191
     
    368358BOOL WIN32API GetCursorPos( PPOINT lpPoint)
    369359{
    370     BOOL rc;
    371     POINT point;
    372 
    373360    dprintf2(("USER32:  GetCursorPos\n"));
    374361
    375362    if (!lpPoint) return FALSE;
    376     if (OSLibWinQueryPointerPos(OSLIB_HWND_DESKTOP,&point)) //POINT == POINTL
     363    if (OSLibWinQueryPointerPos(lpPoint)) //POINT == POINTL
    377364    {
    378       OS2ToWin32ScreenPos(lpPoint,&point);
     365      mapScreenPoint((OSLIBPOINT*)lpPoint);
    379366      return TRUE;
    380367    } else return FALSE;
     
    687674
    688675    case SM_CXVSCROLL:
    689         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXVSCROLL);
     676        rc = OSLibWinQuerySysValue(SVOS_CXVSCROLL);
    690677        break;
    691678
    692679    case SM_CYHSCROLL:
    693         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYHSCROLL);
     680        rc = OSLibWinQuerySysValue(SVOS_CYHSCROLL);
    694681        break;
    695682
    696683    case SM_CYCAPTION:
    697684        rc = 19;
    698         //rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYTITLEBAR);
     685        //rc = OSLibWinQuerySysValue(SVOS_CYTITLEBAR);
    699686        break;
    700687
     
    755742
    756743    case SM_CXICONSPACING: //TODO: size of grid cell for large icons
    757         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXICON);
     744        rc = OSLibWinQuerySysValue(SVOS_CXICON);
    758745        //CB: return standard windows icon size?
    759746        //rc = 32;
    760747        break;
    761748    case SM_CYICONSPACING:
    762         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYICON);
     749        rc = OSLibWinQuerySysValue(SVOS_CYICON);
    763750        //read SM_CXICONSPACING comment
    764751        //rc = 32;
     
    795782    case SM_CXMAXTRACK: //max window size
    796783    case SM_CXMAXIMIZED:    //max toplevel window size
    797         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
     784        rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
    798785        break;
    799786
    800787    case SM_CYMAXTRACK:
    801788    case SM_CYMAXIMIZED:
    802         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
     789        rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
    803790        break;
    804791
     
    822809        break;
    823810    case SM_CYMENUCHECK:
    824         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYMENU);
     811        rc = OSLibWinQuerySysValue(SVOS_CYMENU);
    825812        break;
    826813    case SM_SLOWMACHINE:
     
    841828
    842829    case SM_CXVIRTUALSCREEN:
    843         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
     830        rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
    844831        break;
    845832    case SM_CYVIRTUALSCREEN:
    846         rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
     833        rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
    847834        break;
    848835    case SM_CMONITORS:
Note: See TracChangeset for help on using the changeset viewer.