Changeset 21916 for trunk/src/comdlg32


Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 deleted
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/comdlg32/cdlg.h

    r8593 r21916  
    6464#define PD32_PRINTER_STATUS_READY             1536
    6565#define PD32_PRINTER_STATUS_PAUSED            1537
    66 #define PD32_PRINTER_STATUS_ERROR             1538 
     66#define PD32_PRINTER_STATUS_ERROR             1538
    6767#define PD32_PRINTER_STATUS_PENDING_DELETION  1539
    6868#define PD32_PRINTER_STATUS_PAPER_JAM         1540
     
    102102/* DPA */
    103103#ifdef __WIN32OS2__
    104 #include <win\shell.h>
     104#include <win/shell.h>
    105105
    106106LPVOID WINAPI SHAlloc(DWORD);
  • trunk/src/comdlg32/colordlg.c

    r6709 r21916  
    99   sometimes, especially when 2 instances of the
    1010   dialog are loaded at the same time */
     11
     12#include <ctype.h>
     13#include <stdlib.h>
     14#include <stdio.h>
     15#include <string.h>
    1116
    1217#ifdef __WIN32OS2__
     
    1924#endif
    2025
    21 #include <ctype.h>
    22 #include <stdlib.h>
    23 #include <stdio.h>
    24 #include <string.h>
    2526#include "windef.h"
    2627#include "winbase.h"
  • trunk/src/comdlg32/comdlg32.def

    r4809 r21916  
    99
    1010EXPORTS
    11     ChooseColorA               = _ChooseColorA@4             @101
    12     ChooseColorW               = _ChooseColorW@4             @102
    13     ChooseFontA                = _ChooseFontA@4              @103
    14     ChooseFontW                = _ChooseFontW@4              @104
    15     CommDlgExtendedError       = _CommDlgExtendedError@0     @105
    16     FindTextA                  = _FindTextA@4                @106
    17     FindTextW                  = _FindTextW@4                @107
    18     GetFileTitleA              = _GetFileTitleA@12           @108
    19     GetFileTitleW              = _GetFileTitleW@12           @109
    20     GetOpenFileNameA           = _GetOpenFileNameA@4         @110
    21     GetOpenFileNameW           = _GetOpenFileNameW@4         @111
    22     GetSaveFileNameA           = _GetSaveFileNameA@4         @112
    23     GetSaveFileNameW           = _GetSaveFileNameW@4         @113
     11    ChooseColorA               = "_ChooseColorA@4"           @101
     12    ChooseColorW               = "_ChooseColorW@4"           @102
     13    ChooseFontA                = "_ChooseFontA@4"            @103
     14    ChooseFontW                = "_ChooseFontW@4"            @104
     15    CommDlgExtendedError       = "_CommDlgExtendedError@0"   @105
     16    FindTextA                  = "_FindTextA@4"              @106
     17    FindTextW                  = "_FindTextW@4"              @107
     18    GetFileTitleA              = "_GetFileTitleA@12"         @108
     19    GetFileTitleW              = "_GetFileTitleW@12"         @109
     20    GetOpenFileNameA           = "_GetOpenFileNameA@4"       @110
     21    GetOpenFileNameW           = "_GetOpenFileNameW@4"       @111
     22    GetSaveFileNameA           = "_GetSaveFileNameA@4"       @112
     23    GetSaveFileNameW           = "_GetSaveFileNameW@4"       @113
    2424;   LoadAlterBitmap                      @114
    25     PageSetupDlgA              = _PageSetupDlgA@4            @115
    26     PageSetupDlgW              = _PageSetupDlgW@4            @116
    27     PrintDlgA                  = _PrintDlgA@4                @117
    28     PrintDlgW                  = _PrintDlgW@4                @118
    29     ReplaceTextA               = _ReplaceTextA@4             @119
    30     ReplaceTextW               = _ReplaceTextW@4             @120
     25    PageSetupDlgA              = "_PageSetupDlgA@4"          @115
     26    PageSetupDlgW              = "_PageSetupDlgW@4"          @116
     27    PrintDlgA                  = "_PrintDlgA@4"              @117
     28    PrintDlgW                  = "_PrintDlgW@4"              @118
     29    ReplaceTextA               = "_ReplaceTextA@4"           @119
     30    ReplaceTextW               = "_ReplaceTextW@4"           @120
    3131;   WantArrows                           @121
    3232;   dwLBSubclass                         @122
  • trunk/src/comdlg32/filedlg.c

    r9522 r21916  
    2222
    2323#ifdef __WIN32OS2__
    24 #include <win\cursoricon.h>
     24#include <win/cursoricon.h>
    2525#include <heapstring.h>
    2626
     
    4242
    4343#define BUFFILE 512
    44 #define BUFFILEALLOC 512 * sizeof(WCHAR)   
    45 
    46 struct FSPRIVATE 
     44#define BUFFILEALLOC 512 * sizeof(WCHAR)
     45
     46struct FSPRIVATE
    4747{
    4848    HWND hwnd; /* file dialog window handle */
     
    7575#define LFS32A 2
    7676#define LFS32W 3
    77  
     77
    7878static const WCHAR FILE_star[] = {'*','.','*', 0};
    7979static const WCHAR FILE_bslash[] = {'\\', 0};
     
    125125    static BOOL initialized = 0;
    126126    CURSORICONINFO *fldrInfo;
    127    
     127
    128128    if (!initialized) {
    129129#ifdef __WIN32OS2__
     
    148148        hNet     = LoadImageA( inst, "NETWORK", IMAGE_ICON, 16, 16, LR_SHARED );
    149149#endif
    150         if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 || 
     150        if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 ||
    151151            hHDisk == 0 || hCDRom == 0 || hNet == 0)
    152152        {
     
    160160        fldrInfo = (CURSORICONINFO *) GlobalLock16( hFolder2 );
    161161        if (!fldrInfo)
    162         {       
     162        {
    163163            ERR("Error measuring icons !\n");
    164164            return FALSE;
     
    219219    } else { /* get it from internal Wine resource */
    220220        HANDLE hResInfo;
    221         if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 
     221        if (!(hResInfo = FindResourceA(COMMDLG_hInstance32,
    222222             lfs->open? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA)))
    223223        {
     
    274274        DWORD size;
    275275
    276         if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 
     276        if (!(hResInfo = FindResourceA(COMMDLG_hInstance32,
    277277               lfs->open ? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA)))
    278278        {
     
    424424  i = 0;
    425425  if (cfptr)
    426     for ( ;(n = lstrlenW(cfptr)) != 0; i++) 
     426    for ( ;(n = lstrlenW(cfptr)) != 0; i++)
    427427      {
    428428        cfptr += n + 1;
     
    432432      }
    433433  if (fptr)
    434     for ( ;(n = lstrlenW(fptr)) != 0; i++) 
     434    for ( ;(n = lstrlenW(fptr)) != 0; i++)
    435435      {
    436436        fptr += n + 1;
     
    455455    {
    456456        if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC))) return FALSE;
    457         SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 
     457        SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
    458458                      (LPARAM)str);
    459459
     
    486486        if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC)))
    487487            return FALSE;
    488         SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 
     488        SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
    489489                      (LPARAM)str);
    490490
     
    515515        if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC)))
    516516            return FALSE;
    517         SendMessageW(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID, 
     517        SendMessageW(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID,
    518518                      (LPARAM)str);
    519519        root[0] += str[2] - 'a';
     
    550550 *                              FILEDLG_WMMeasureItem           [internal]
    551551 */
    552 static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) 
     552static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
    553553{
    554554    LPMEASUREITEMSTRUCT lpmeasure;
    555    
     555
    556556    lpmeasure = (LPMEASUREITEMSTRUCT)lParam;
    557557    lpmeasure->itemHeight = fldrHeight;
     
    562562 */
    563563#ifdef __WIN32OS2__
    564 static LONG FILEDLG_WMMeasureItem16(HWND hWnd, WPARAM wParam, LPARAM lParam) 
     564static LONG FILEDLG_WMMeasureItem16(HWND hWnd, WPARAM wParam, LPARAM lParam)
    565565{
    566566    LPMEASUREITEMSTRUCT lpmeasure;
    567    
     567
    568568    lpmeasure = (LPMEASUREITEMSTRUCT)lParam;
    569569    lpmeasure->itemHeight = fldrHeight;
     
    571571}
    572572#else
    573 static LONG FILEDLG_WMMeasureItem16(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam) 
     573static LONG FILEDLG_WMMeasureItem16(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam)
    574574{
    575575    LPMEASUREITEMSTRUCT16 lpmeasure;
    576    
     576
    577577    lpmeasure = MapSL(lParam);
    578578    lpmeasure->itemHeight = fldrHeight;
     
    641641  if (ofn->nFilterIndex == 0 && ofn->lpstrCustomFilter == NULL)
    642642        ofn->nFilterIndex = 1;
    643   SendDlgItemMessageW(hWnd, cmb1, CB_SETCURSEL, ofn->nFilterIndex - 1, 0);   
     643  SendDlgItemMessageW(hWnd, cmb1, CB_SETCURSEL, ofn->nFilterIndex - 1, 0);
    644644  lstrcpynW(tmpstr, FILEDLG_GetFileType(ofn->lpstrCustomFilter,
    645645             (LPWSTR)ofn->lpstrFilter, ofn->nFilterIndex - 1),BUFFILE);
    646   TRACE("nFilterIndex = %ld, SetText of edt1 to '%s'\n", 
     646  TRACE("nFilterIndex = %ld, SetText of edt1 to '%s'\n",
    647647                        ofn->nFilterIndex, debugstr_w(tmpstr));
    648648  SetDlgItemTextW( hWnd, edt1, tmpstr );
     
    651651  DlgDirListComboBoxW(hWnd, tmpstr, cmb2, 0, DDL_DRIVES | DDL_EXCLUSIVE);
    652652  /* read initial directory */
    653   if (ofn->lpstrInitialDir != NULL) 
     653  if (ofn->lpstrInitialDir != NULL)
    654654    {
    655655      int len;
     
    720720/***********************************************************************
    721721 *                              FILEDLG_UpdateResult            [internal]
    722  *      update the displayed file name (with path) 
     722 *      update the displayed file name (with path)
    723723 */
    724724void FILEDLG_UpdateResult(LFSPRIVATE lfs, WCHAR *tmpstr)
     
    779779/***********************************************************************
    780780 *                              FILEDLG_UpdateFileTitle         [internal]
    781  *      update the displayed file name (without path) 
     781 *      update the displayed file name (without path)
    782782 */
    783783void FILEDLG_UpdateFileTitle(LFSPRIVATE lfs)
     
    785785  LONG lRet;
    786786  LPOPENFILENAMEW ofnW = lfs->ofnW;
    787   if (ofnW->lpstrFileTitle != NULL) 
     787  if (ofnW->lpstrFileTitle != NULL)
    788788  {
    789789    lRet = SendDlgItemMessageW(lfs->hwnd, lst1, LB_GETCURSEL, 0, 0);
     
    997997        lRet = (BOOL)FILEDLG_CallWindowProc(lfs, lfs->fileokstring,
    998998                  0, lfs->lParam );
    999         if (lRet)       
     999        if (lRet)
    10001000        {
    10011001            *ofnW = ofnsav; /* restore old state */
     
    10351035                         (LPARAM)pstr);
    10361036    wsprintfW(diskname, FILE_specc, pstr[2]);
    1037     HeapFree(GetProcessHeap(), 0, pstr);   
     1037    HeapFree(GetProcessHeap(), 0, pstr);
    10381038
    10391039    return FILEDLG_Validate( lfs, diskname, cmb2, lRet, TRUE );
     
    10671067 */
    10681068static LRESULT FILEDLG_WMCommand(HWND hWnd, LPARAM lParam, UINT notification,
    1069        UINT control, LFSPRIVATE lfs ) 
     1069       UINT control, LFSPRIVATE lfs )
    10701070{
    10711071    switch (control)
     
    10901090
    10911091        case cmb1: /* file type drop list */
    1092         if (notification == CBN_SELCHANGE) 
     1092        if (notification == CBN_SELCHANGE)
    10931093            return FILEDLG_FileTypeChange( lfs );
    10941094        break;
     
    12151215    if (ofnA->lpstrTitle)
    12161216        str = ofnA->lpstrTitle;
    1217     else 
     1217    else
    12181218        /* Allocates default title (FIXME : get it from resource) */
    12191219        str = open ? defaultopen:defaultsave;
     
    12721272/************************************************************************
    12731273 *                              FILEDLG_DestroyPrivate            [internal]
    1274  *      destroys the private object 
     1274 *      destroys the private object
    12751275 */
    12761276void FILEDLG_DestroyPrivate(LFSPRIVATE lfs)
     
    13111311/************************************************************************
    13121312 *                              FILEDLG_AllocPrivate            [internal]
    1313  *      allocate a private object to hold 32 bits Unicode 
     1313 *      allocate a private object to hold 32 bits Unicode
    13141314 *      structure that will be used throughtout the calls, while
    13151315 *      keeping available the original structures and a few variables
     
    13691369                FILEDLG_MapOfnStructA(lfs->ofnA, lfs->ofnW, lfs->open);
    13701370        }
    1371         else 
     1371        else
    13721372            ret = NULL;
    13731373    }
     
    13901390 * Creates a win31 style dialog box for the user to select a file to open/save.
    13911391 */
    1392 BOOL WINAPI GetFileName31A( 
     1392BOOL WINAPI GetFileName31A(
    13931393                           LPOPENFILENAMEA lpofn, /* addess of structure with data*/
    13941394                           UINT dlgType /* type dialogue : open/save */
     
    14051405    {
    14061406        hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
    1407         bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner, 
     1407        bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner,
    14081408             (DLGPROC) FileOpenDlgProc, (DWORD) lfs);
    14091409        FILEDLG_DestroyPrivate(lfs);
     
    14201420 * Creates a win31 style dialog box for the user to select a file to open/save
    14211421 */
    1422 BOOL WINAPI GetFileName31W( 
     1422BOOL WINAPI GetFileName31W(
    14231423                           LPOPENFILENAMEW lpofn, /* addess of structure with data*/
    14241424                           UINT dlgType /* type dialogue : open/save */
     
    14351435    {
    14361436        hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
    1437         bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner, 
     1437        bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner,
    14381438             (DLGPROC) FileOpenDlgProc, (DWORD) lfs);
    14391439        FILEDLG_DestroyPrivate(lfs);
     
    14531453LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
    14541454                               LPARAM lParam)
    1455 { 
     1455{
    14561456    LFSPRIVATE lfs = (LFSPRIVATE)GetPropA(hWnd,OFN_PROP);
    14571457    DRAWITEMSTRUCT dis;
    1458  
     1458
    14591459    TRACE("msg=%x wparam=%x lParam=%lx\n", wMsg, wParam, lParam);
    14601460    if ((wMsg != WM_INITDIALOG) && lfs && lfs->hook)
    14611461        {
    14621462            LRESULT lRet = (BOOL16)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam);
    1463             if (lRet)   
     1463            if (lRet)
    14641464                return lRet;         /* else continue message processing */
    14651465        }
     
    15101510   LRESULT  lRet;
    15111511   lRet = (BOOL16)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam);
    1512    if (lRet)   
     1512   if (lRet)
    15131513    return lRet;         /* else continue message processing */
    1514   }             
     1514  }
    15151515  switch (wMsg) {
    15161516   case WM_INITDIALOG:
    15171517      return FILEDLG_WMInitDialog(hWnd, wParam, lParam);
    1518      
     1518
    15191519   case WM_MEASUREITEM:
    15201520      return FILEDLG_WMMeasureItem16(hWnd, wParam, lParam);
    1521    
     1521
    15221522   case WM_DRAWITEM:
    15231523      FILEDLG_MapDrawItemStruct(MapSL(lParam), &dis);
     
    15271527      return FILEDLG_WMCommand(hWnd, lParam, HIWORD(lParam), wParam, lfs);
    15281528  }
    1529  
     1529
    15301530  /*
    15311531  case WM_CTLCOLOR:
     
    15411541   }
    15421542   return FALSE;
    1543    
     1543
    15441544   */
    15451545  return FALSE;
     
    15491549/***********************************************************************
    15501550 *           FileOpenDlgProc                                    [internal]
    1551  *      Used for open and save, in fact.   
     1551 *      Used for open and save, in fact.
    15521552 */
    15531553static LRESULT WINAPI FileOpenDlgProc(HWND hWnd, UINT wMsg,
     
    15611561            LRESULT lRet;
    15621562            lRet  = (BOOL)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam);
    1563             if (lRet)   
     1563            if (lRet)
    15641564                return lRet;         /* else continue message processing */
    15651565        }
     
    15951595}
    15961596
    1597 /* ------------------ APIs ---------------------- */ 
     1597/* ------------------ APIs ---------------------- */
    15981598#ifndef __WIN32OS2__
    15991599/***********************************************************************
     
    16091609 *    unknown, there are some FIXME's left.
    16101610 */
    1611 BOOL16 WINAPI GetOpenFileName16( 
     1611BOOL16 WINAPI GetOpenFileName16(
    16121612                                SEGPTR ofn /* [in/out] address of structure with data*/
    16131613                                )
     
    16261626        hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
    16271627        ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6);
    1628         bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 
     1628        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
    16291629             (DLGPROC16) ptr, (DWORD) lfs);
    16301630        FILEDLG_DestroyPrivate(lfs);
     
    16471647 *    unknown. There are some FIXME's left.
    16481648 */
    1649 BOOL16 WINAPI GetSaveFileName16( 
     1649BOOL16 WINAPI GetSaveFileName16(
    16501650                                SEGPTR ofn /* [in/out] addess of structure with data*/
    16511651                                )
     
    16641664        hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
    16651665        ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7);
    1666         bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 
     1666        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
    16671667             (DLGPROC16) ptr, (DWORD) lfs);
    16681668        FILEDLG_DestroyPrivate(lfs);
    1669     } 
     1669    }
    16701670
    16711671    TRACE("return lpstrFile='%s' !\n", (char *)MapSL(lpofn->lpstrFile));
     
    17751775    {
    17761776        return GetFileDialog95A(ofn, SAVE_DIALOG);
    1777     } 
     1777    }
    17781778    else
    17791779    {
     
    18111811    {
    18121812        return GetFileDialog95W(ofn, SAVE_DIALOG);
    1813     } 
     1813    }
    18141814    else
    18151815    {
  • trunk/src/comdlg32/filedlg95.c

    r21512 r21916  
    3434 *
    3535 */
     36
     37#include <ctype.h>
     38#include <stdlib.h>
     39#include <stdio.h>
     40#include <string.h>
     41
    3642#ifdef __WIN32OS2__
    3743#include <windef.h>
     
    4147#include <heapstring.h>
    4248#include <misc.h>
    43 #include <win\shlwapi.h>
     49#include <win/shlwapi.h>
    4450
    4551#define MapHModuleSL(a) a
     
    4753#define snprintf  wsnprintfA
    4854#endif
    49 
    50 #include <ctype.h>
    51 #include <stdlib.h>
    52 #include <stdio.h>
    53 #include <string.h>
    5455
    5556#include "winbase.h"
     
    8687  HIMAGELIST hImgList;
    8788  int m_iIndent;      /* Indentation index */
    88   LPITEMIDLIST pidlItem;  /* absolute pidl of the item */ 
     89  LPITEMIDLIST pidlItem;  /* absolute pidl of the item */
    8990
    9091} SFOLDER,*LPSFOLDER;
     
    216217 *      GetFileName95
    217218 *
    218  * Creates an Open common dialog box that lets the user select 
     219 * Creates an Open common dialog box that lets the user select
    219220 * the drive, directory, and the name of a file or set of files to open.
    220221 *
     
    251252        return FALSE;
    252253    }
    253    
     254
    254255    /* old style hook messages */
    255256    if (IsHooked(fodInfos))
     
    260261      fodInfos->HookMsg.sharevistring = RegisterWindowMessageA(SHAREVISTRINGA);
    261262    }
    262    
     263
    263264    lRes = DialogBoxIndirectParamA(COMMDLG_hInstance32,
    264265                                  (LPDLGTEMPLATEA) template,
     
    270271    if( lRes == -1)
    271272        return FALSE;
    272    
     273
    273274    return lRes;
    274275}
     
    291292  LPSTR lpstrSavDir = NULL;
    292293  DWORD dwFlags = 0;
    293  
    294   /* Initialise FileOpenDlgInfos structure*/ 
     294
     295  /* Initialise FileOpenDlgInfos structure*/
    295296  fodInfos = (FileOpenDlgInfos*)MemAlloc(sizeof(FileOpenDlgInfos));
    296297  ZeroMemory(fodInfos, sizeof(FileOpenDlgInfos));
    297  
     298
    298299  /* Pass in the original ofn */
    299300  fodInfos->ofnInfos = ofn;
    300  
     301
    301302  /* Save original hInstance value */
    302303  hInstance = ofn->hInstance;
     
    316317  fodInfos->DlgInfos.dwDlgProp = 0;
    317318  fodInfos->DlgInfos.hwndCustomDlg = (HWND)NULL;
    318  
     319
    319320  switch(iDlgType)
    320321  {
     
    400401  FileOpenDlgInfos *fodInfos;
    401402  HINSTANCE hInstance;
    402  
     403
    403404  /* out arguments */
    404405  LPWSTR lpstrFile = NULL;
     
    437438    /* filter is a list...  title\0ext\0......\0\0 */
    438439    s = ofn->lpstrFilter;
    439    
     440
    440441    while (*s) s = s+strlenW(s)+1;
    441442    s++;
     
    528529  }
    529530#endif
    530      
     531
    531532  /* restore saved IN arguments and convert OUT arguments back */
    532533  ofn->Flags = dwFlags;
     
    613614    SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left),
    614615        (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER);
    615        
     616
    616617    hwndChild = GetWindow(hwndChildDlg,GW_CHILD);
    617618    if(hwndStc32)
     
    633634          GetWindowRect(hwndChild,&rectCtrl);
    634635          MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2);
    635                                  
     636
    636637          /*
    637638            Check the initial position of the controls relative to the initial
     
    651652            rectCtrl.top  += ptMoveCtl.y;
    652653          }
    653                                        
    654           SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 
     654
     655          SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top,
    655656                                rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top,
    656657                                SWP_NOSIZE | SWP_NOZORDER );
     
    659660    }
    660661    hwndChild = GetWindow(hwndParentDlg,GW_CHILD);
    661        
     662
    662663    if(hwndStc32)
    663664    {
     
    680681            rectCtrl.top += ptMoveCtl.y;
    681682
    682             SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 
     683            SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top,
    683684                rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top,
    684685                SWP_NOSIZE |SWP_NOZORDER );
    685686          }
    686687        } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL);
    687       }         
     688      }
    688689    }
    689690}
     
    701702    {
    702703      case WM_INITDIALOG:
    703       {         
     704      {
    704705        fodInfos = (FileOpenDlgInfos *)lParam;
    705706        lParam = (LPARAM) fodInfos->ofnInfos;
     
    708709        if(fodInfos && IsHooked(fodInfos))
    709710          return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam);
    710         return 0;       
    711       } 
     711        return 0;
     712      }
    712713    }
    713714
    714715    if(fodInfos && IsHooked(fodInfos))
    715       return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam); 
    716 
    717     return DefWindowProcA(hwnd,uMsg,wParam,lParam); 
     716      return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam);
     717
     718    return DefWindowProcA(hwnd,uMsg,wParam,lParam);
    718719}
    719720
     
    757758      if(hChildDlg)
    758759      {
    759         ShowWindow(hChildDlg,SW_SHOW); 
     760        ShowWindow(hChildDlg,SW_SHOW);
    760761        return hChildDlg;
    761762      }
     
    773774      tmplate.cx = rectHwnd.right-rectHwnd.left;
    774775      tmplate.cy = rectHwnd.bottom-rectHwnd.top;
    775        
     776
    776777      return CreateDialogIndirectParamA(fodInfos->ofnInfos->hInstance,&tmplate,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos);
    777778    }
    778779    return (HWND)NULL;
    779780}
    780  
     781
    781782/***********************************************************************
    782783*          SendCustomDlgNotificationMessage
     
    830831            GetDlgItemTextA(hwnd,IDC_FILENAME,lpstrPath, sizeof(lpstrPath));
    831832            lpstrFileSpec = (LPSTR)PathFindFileNameA(lpstrPath);
    832             if (lpstrFileSpec==lpstrPath) 
     833            if (lpstrFileSpec==lpstrPath)
    833834            {
    834835                char lpstrCurrentDir[MAX_PATH];
     
    838839                    snprintf((LPSTR)lParam,(int)wParam,"%s\\%s",lpstrCurrentDir,lpstrPath);
    839840                reqSize=strlen(lpstrCurrentDir)+1+strlen(lpstrPath)+1;
    840             } 
    841             else 
     841            }
     842            else
    842843            {
    843844                lstrcpynA((LPSTR)lParam,(LPSTR)lpstrPath,(int)wParam);
     
    872873    return TRUE;
    873874}
    874  
     875
    875876/***********************************************************************
    876877 *          FileOpenDlgProc95
     
    883884  TRACE("0x%04x 0x%04x\n", hwnd, uMsg);
    884885#endif
    885  
     886
    886887  switch(uMsg)
    887888  {
     
    890891         FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam;
    891892
    892          /* Adds the FileOpenDlgInfos in the property list of the dialog 
     893         /* Adds the FileOpenDlgInfos in the property list of the dialog
    893894            so it will be easily accessible through a GetPropA(...) */
    894895         SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos);
    895896
    896          fodInfos->DlgInfos.hwndCustomDlg = 
     897         fodInfos->DlgInfos.hwndCustomDlg =
    897898           CreateTemplateDialog((FileOpenDlgInfos *)lParam, hwnd);
    898899
     
    917918      }
    918919      return FALSE;
    919          
     920
    920921    case WM_GETISHELLBROWSER:
    921922      return FILEDLG95_OnWMGetIShellBrowser(hwnd);
     
    933934        if(TTN_GETDISPINFOA == lpnmh->code )
    934935        {
    935             LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam; 
     936            LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam;
    936937            switch(lpnmh->idFrom )
    937938            {
     
    959960                    stringId = 0;
    960961            }
    961             lpdi->hinst = COMMDLG_hInstance32; 
     962            lpdi->hinst = COMMDLG_hInstance32;
    962963            lpdi->lpszText =  (LPSTR) stringId;
    963964        }
     
    995996   { COMDLG32_hInstance, 800 }                  // desktop icon
    996997  };
    997  
     998
    998999  RECT rectTB;
    999  
     1000
    10001001  FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr);
    10011002
     
    10111012  MapWindowPoints( 0, hwnd,(LPPOINT)&rectTB,2);
    10121013
    1013   fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL, 
     1014  fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL,
    10141015        WS_CHILD | WS_GROUP | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE,
    1015         0, 0, 150, 26, hwnd, (HMENU) IDC_TOOLBAR, COMMDLG_hInstance32, NULL); 
    1016  
    1017   SetWindowPos(fodInfos->DlgInfos.hwndTB, 0, 
     1016        0, 0, 150, 26, hwnd, (HMENU) IDC_TOOLBAR, COMMDLG_hInstance32, NULL);
     1017
     1018  SetWindowPos(fodInfos->DlgInfos.hwndTB, 0,
    10181019        rectTB.left,rectTB.top, rectTB.right-rectTB.left, rectTB.bottom-rectTB.top,
    10191020        SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER );
     
    10271028
    10281029  SendMessageA(fodInfos->DlgInfos.hwndTB, TB_ADDBUTTONSA, (WPARAM) 9,(LPARAM) &tbb);
    1029   SendMessageA(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0); 
     1030  SendMessageA(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0);
    10301031
    10311032  /* Set the window text with the text specified in the OPENFILENAME structure */
     
    10671068     are hidden and we are not using a custom template */
    10681069  if ( (fodInfos->ofnInfos->Flags & OFN_HIDEREADONLY) &&
    1069        (!(fodInfos->ofnInfos->Flags & 
     1070       (!(fodInfos->ofnInfos->Flags &
    10701071         (OFN_SHOWHELP|OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE))))
    10711072  {
     
    10761077    /* subtract the height of the help button plus the space between
    10771078       the help button and the cancel button to the height of the dialog */
    1078     SetWindowPos(hwnd, 0, 0, 0, rectDlg.right-rectDlg.left, 
    1079                  (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom), 
     1079    SetWindowPos(hwnd, 0, 0, 0, rectDlg.right-rectDlg.left,
     1080                 (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom),
    10801081                 SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
    10811082  }
     
    11021103  FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) lParam;
    11031104
    1104   TRACE("dir=%s file=%s\n", 
     1105  TRACE("dir=%s file=%s\n",
    11051106  fodInfos->ofnInfos->lpstrInitialDir, fodInfos->ofnInfos->lpstrFile);
    11061107
    11071108#ifdef __WIN32OS2__
    1108   /*@PF 
     1109  /*@PF
    11091110  How can Wine miss this?? Very common situation for Windows apps!
    11101111  If InitialDir is NULL and we have full blown path in lpstrFile we set
     
    11121113
    11131114  Q: What about Unicode?
    1114  
     1115
    11151116  */
    11161117
    1117   if (fodInfos->ofnInfos->lpstrInitialDir == NULL && fodInfos->ofnInfos->lpstrFile && 
     1118  if (fodInfos->ofnInfos->lpstrInitialDir == NULL && fodInfos->ofnInfos->lpstrFile &&
    11181119    !PathIsRelativeA(fodInfos->ofnInfos->lpstrFile) &&
    11191120    PathGetDriveNumberA(fodInfos->ofnInfos->lpstrFile) != -1)
    11201121  {
    1121    dopstr = HEAP_strdupA(GetProcessHeap(), 0,fodInfos->ofnInfos->lpstrFile);     
     1122   dopstr = HEAP_strdupA(GetProcessHeap(), 0,fodInfos->ofnInfos->lpstrFile);
    11221123   *strrchr(dopstr,'\\') = '\0';
    11231124   fodInfos->ofnInfos->lpstrInitialDir = dopstr;
     
    11741175   fodInfos->ofnInfos->lpstrInitialDir = NULL;
    11751176   HEAP_free(dopstr);
    1176   } 
     1177  }
    11771178#endif
    11781179  return TRUE;
     
    12611262  /* Do not use the listview selection anymore */
    12621263  fodInfos->DlgInfos.dwDlgProp &= ~FODPROP_USEVIEW;
    1263   return 0; 
     1264  return 0;
    12641265}
    12651266
     
    12781279  SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser);
    12791280
    1280   return TRUE; 
     1281  return TRUE;
    12811282}
    12821283
     
    12841285/***********************************************************************
    12851286 *      FILEDLG95_OnOpenMultipleFiles
    1286  *     
     1287 *
    12871288 * Handles the opening of multiple files.
    12881289 *
     
    13011302  lpstrFile = fodInfos->ofnInfos->lpstrFile;
    13021303  lpstrFile[0] = '\0';
    1303  
     1304
    13041305  SHGetPathFromIDListA( fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathSpec );
    13051306
     
    13071308      ( fodInfos->ofnInfos->Flags & OFN_FILEMUSTEXIST))
    13081309  {
    1309     LPSTR lpstrTemp = lpstrFileList; 
     1310    LPSTR lpstrTemp = lpstrFileList;
    13101311
    13111312    for ( nCount = 0; nCount < nFileCount; nCount++ )
     
    13321333        return FALSE;
    13331334      }
    1334  
     1335
    13351336      /* move to the next file in the list of files */
    13361337      lpstrTemp += strlen(lpstrTemp) + 1;
     
    13551356 *
    13561357 * Ok button WM_COMMAND message handler
    1357  * 
     1358 *
    13581359 * If the function succeeds, the return value is nonzero.
    13591360 */
     
    13961397      return FALSE;
    13971398  }
    1398  
     1399
    13991400  if(nFileCount > 1)
    14001401  {
     
    14551456  to a folder if the path points to a directory or the last
    14561457  valid element is a directory.
    1457  
     1458
    14581459  valid variables:
    14591460    lpstrPathAndFile: cleaned up path
     
    16571658        {
    16581659          LPSTR lpszTemp;
    1659          
     1660
    16601661          /* fill destination buffer */
    16611662          strcpy(fodInfos->ofnInfos->lpstrFile, lpstrPathAndFile);
     
    16671668          lpszTemp = PathFindFileNameA(lpstrPathAndFile);
    16681669          fodInfos->ofnInfos->nFileOffset = lpszTemp - lpstrPathAndFile;
    1669  
     1670
    16701671          /* set extension offset */
    16711672          lpszTemp = PathFindExtensionA(lpstrPathAndFile);
    16721673          fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? lpszTemp - lpstrPathAndFile + 1 : 0;
    1673    
     1674
    16741675          /* set the lpstrFileTitle */
    16751676          if(fodInfos->ofnInfos->lpstrFileTitle)
     
    16951696            }
    16961697          }
    1697          
     1698
    16981699          TRACE("close\n");
    16991700          FILEDLG95_Clean(hwnd);
     
    17281729
    17291730  /*
    1730    * Initialisation of the FileOpenDialogInfos structure 
     1731   * Initialisation of the FileOpenDialogInfos structure
    17311732   */
    17321733
     
    17391740  if (!(fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT))
    17401741  {
    1741      fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL; 
     1742     fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL;
    17421743  }
    17431744  fodInfos->ShellInfos.folderSettings.fFlags |= FWF_AUTOARRANGE | FWF_ALIGNLEFT;
     
    17491750
    17501751  /* Construct the IShellBrowser interface */
    1751   fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); 
    1752    
     1752  fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd);
     1753
    17531754  return NOERROR;
    17541755}
     
    18171818  LPITEMIDLIST pidl;
    18181819  HRESULT hres;
    1819  
     1820
    18201821  TRACE("\n");
    18211822
     
    18501851 *      FILEDLG95_FILETYPE_Init
    18511852 *
    1852  * Initialisation of the file type combo box 
     1853 * Initialisation of the file type combo box
    18531854 */
    18541855static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd)
     
    18661867    for(;;)
    18671868    {
    1868       /* filter is a list...  title\0ext\0......\0\0 
     1869      /* filter is a list...  title\0ext\0......\0\0
    18691870       * Set the combo item text to the title and the item data
    18701871       *  to the ext
     
    18831884      strcpy(lpstrExt,lpstrPos);
    18841885      lpstrPos += strlen(lpstrPos) + 1;
    1885            
     1886
    18861887      /* Add the item at the end of the combo */
    18871888      CBAddString(fodInfos->DlgInfos.hwndFileTypeCB, lpstrDisplay);
     
    18941895     * FIXME: lpstrCustomFilter not handled at all
    18951896     */
    1896  
     1897
    18971898    /* set default filter index */
    18981899    if(fodInfos->ofnInfos->nFilterIndex == 0 && fodInfos->ofnInfos->lpstrCustomFilter == NULL)
     
    19021903    if ( fodInfos->ofnInfos->nFilterIndex > nFilters )
    19031904      fodInfos->ofnInfos->nFilterIndex = nFilters;
    1904  
     1905
    19051906    /* Set the current index selection. */
    19061907    CBSetCurSel(fodInfos->DlgInfos.hwndFileTypeCB, fodInfos->ofnInfos->nFilterIndex-1);
    1907  
     1908
    19081909    /* Get the corresponding text string from the combo box. */
    19091910    lpstrFilter = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB,
     
    19111912
    19121913    if ((INT)lpstrFilter == CB_ERR)  /* control is empty */
    1913       lpstrFilter = NULL;       
     1914      lpstrFilter = NULL;
    19141915
    19151916    if(lpstrFilter)
     
    20202021
    20212022}
    2022    
     2023
    20232024/***********************************************************************
    20242025 *      FILEDLG95_LOOKIN_Init
    20252026 *
    2026  * Initialisation of the look in combo box 
     2027 * Initialisation of the look in combo box
    20272028 */
    20282029static HRESULT FILEDLG95_LOOKIN_Init(HWND hwndCombo)
     
    21272128  {
    21282129    ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,
    2129                                                0,   
    2130                                                &sfi,   
    2131                                                sizeof (SHFILEINFOA),   
    2132                                                SHGFI_PIDL | SHGFI_SMALLICON |   
    2133                                                SHGFI_OPENICON | SHGFI_SYSICONINDEX    | 
    2134                                                SHGFI_DISPLAYNAME );   
     2130                                               0,
     2131                                               &sfi,
     2132                                               sizeof (SHFILEINFOA),
     2133                                               SHGFI_PIDL | SHGFI_SMALLICON |
     2134                                               SHGFI_OPENICON | SHGFI_SYSICONINDEX    |
     2135                                               SHGFI_DISPLAYNAME );
    21352136  }
    21362137  else
    21372138  {
    21382139    ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,
    2139                                                   0, 
    2140                                                   &sfi, 
     2140                                                  0,
     2141                                                  &sfi,
    21412142                                                  sizeof (SHFILEINFOA),
    2142                                                   SHGFI_PIDL | SHGFI_SMALLICON | 
    2143                                                   SHGFI_SYSICONINDEX | 
     2143                                                  SHGFI_PIDL | SHGFI_SMALLICON |
     2144                                                  SHGFI_SYSICONINDEX |
    21442145                                                  SHGFI_DISPLAYNAME);
    21452146  }
     
    21642165    iIndentation = 0;
    21652166    ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,
    2166                                                 0, 
    2167                                                 &sfi, 
    2168                                                 sizeof (SHFILEINFOA), 
    2169                                                 SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON 
     2167                                                0,
     2168                                                &sfi,
     2169                                                sizeof (SHFILEINFOA),
     2170                                                SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON
    21702171                                                | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME  );
    21712172
     
    21912192  rectText.bottom =
    21922193          (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom + tm.tmHeight) / 2;
    2193  
     2194
    21942195  /* Draw the icon from the image list */
    21952196  ImageList_Draw(ilItemImage,
    21962197                 sfi.iIcon,
    2197                  pDIStruct->hDC, 
    2198                  rectIcon.left, 
    2199                  rectIcon.top, 
    2200                  ILD_TRANSPARENT ); 
     2198                 pDIStruct->hDC,
     2199                 rectIcon.left,
     2200                 rectIcon.top,
     2201                 ILD_TRANSPARENT );
    22012202
    22022203  /* Draw the associated text */
     
    22252226    {
    22262227      LPSFOLDER tmpFolder;
    2227       int iItem; 
     2228      int iItem;
    22282229
    22292230      iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB);
     
    22422243      break;
    22432244    }
    2244      
     2245
    22452246  }
    22462247  return FALSE;
     
    22672268  if(!(liInfos = (LookInInfos *)GetPropA(hwnd,LookInInfosStr)))
    22682269    return -1;
    2269    
     2270
    22702271  tmpFolder = MemAlloc(sizeof(SFOLDER));
    22712272  tmpFolder->m_iIndent = 0;
     
    22822283  if(tmpFolder->m_iIndent > liInfos->iMaxIndentation)
    22832284    liInfos->iMaxIndentation = tmpFolder->m_iIndent;
    2284  
     2285
    22852286  sfi.dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM;
    22862287  SHGetFileInfoA((LPSTR)pidl,
     
    22882289                  &sfi,
    22892290                  sizeof(sfi),
    2290                   SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 
     2291                  SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX
    22912292                  | SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED);
    22922293
     
    22962297  {
    22972298    int iItemID;
    2298  
     2299
    22992300    TRACE("-- Add %s at %u\n", sfi.szDisplayName, tmpFolder->m_iIndent);
    23002301
     
    23222323 *      FILEDLG95_LOOKIN_InsertItemAfterParent
    23232324 *
    2324  * Insert an item below its parent 
     2325 * Insert an item below its parent
    23252326 */
    23262327static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl)
    23272328{
    2328  
     2329
    23292330  LPITEMIDLIST pidlParent = GetParentPidl(pidl);
    23302331  int iParentPos;
     
    23812382    }
    23822383  }
    2383  
     2384
    23842385  CBSetCurSel(hwnd,iItemPos);
    23852386  liInfos->uSelectedItem = iItemPos;
     
    25032504      {
    25042505        pidl = GetPidlFromDataObject( fodInfos->Shell.FOIDataObject, nFileToOpen+1 );
    2505    
     2506
    25062507        if (pidl)
    25072508        {
     
    25762577        {
    25772578          case STRRET_WSTR:
    2578             WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
    2579             COMDLG32_SHFree(src->u.pOleStr);
     2579            WideCharToMultiByte(CP_ACP, 0, src->DUMMYUNIONNAME_DOT pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
     2580            COMDLG32_SHFree(src->DUMMYUNIONNAME_DOT pOleStr);
    25802581            break;
    25812582
    25822583          case STRRET_CSTR:
    2583             lstrcpynA((LPSTR)dest, src->u.cStr, len);
     2584            lstrcpynA((LPSTR)dest, src->DUMMYUNIONNAME_DOT cStr, len);
    25842585            break;
    25852586
    25862587          case STRRET_OFFSET:
    2587             lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
     2588            lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->DUMMYUNIONNAME_DOT uOffset, len);
    25882589            break;
    25892590
     
    26212622
    26222623        TRACE("nStrLen=%u str=%s\n", nStrLen, lpstrEdit);
    2623        
     2624
    26242625        /* we might get single filename without any '"',
    26252626         * so we need nStrLen + terminating \0 + end-of-list \0 */
     
    26422643            (*sizeUsed)++;
    26432644            nFileCount++;
    2644           } 
     2645          }
    26452646          nStrCharCount++;
    26462647        }
     
    26892690      else
    26902691      {
    2691         GlobalUnlock(medium.u.hGlobal);
    2692         GlobalFree(medium.u.hGlobal);
     2692        GlobalUnlock(medium.DUMMYUNIONNAME_DOT hGlobal);
     2693        GlobalFree(medium.DUMMYUNIONNAME_DOT hGlobal);
    26932694      }
    26942695}
     
    27032704LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex)
    27042705{
    2705      
     2706
    27062707    STGMEDIUM medium;
    27072708    FORMATETC formatetc;
    27082709    LPITEMIDLIST pidl = NULL;
    2709    
     2710
    27102711    TRACE("sv=%p index=%u\n", doSelected, nPidlIndex);
    2711    
     2712
    27122713    /* Set the FORMATETC structure*/
    27132714    SETDefFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL);
     
    27162717    if(SUCCEEDED(IDataObject_GetData(doSelected,&formatetc,&medium)))
    27172718    {
    2718       LPIDA cida = GlobalLock(medium.u.hGlobal);
     2719      LPIDA cida = GlobalLock(medium.DUMMYUNIONNAME_DOT hGlobal);
    27192720      if(nPidlIndex <= cida->cidl)
    27202721      {
     
    27482749    if(SUCCEEDED(IDataObject_GetData(doSelected,&formatetc,&medium)))
    27492750    {
    2750       LPIDA cida = GlobalLock(medium.u.hGlobal);
     2751      LPIDA cida = GlobalLock(medium.DUMMYUNIONNAME_DOT hGlobal);
    27512752      retVal = cida->cidl;
    27522753      COMCTL32_ReleaseStgMedium(medium);
     
    27632764 *      GetName
    27642765 *
    2765  * Get the pidl's display name (relative to folder) and 
     2766 * Get the pidl's display name (relative to folder) and
    27662767 * put it in lpstrFileName.
    2767  * 
     2768 *
    27682769 * Return NOERROR on success,
    27692770 * E_FAIL otherwise
     
    27972798 *      GetShellFolderFromPidl
    27982799 *
    2799  * pidlRel is the item pidl relative 
     2800 * pidlRel is the item pidl relative
    28002801 * Return the IShellFolder of the absolute pidl
    28012802 */
     
    28332834
    28342835  TRACE("%p\n", pidl);
    2835  
     2836
    28362837  pidlParent = COMDLG32_PIDL_ILClone(pidl);
    28372838  COMDLG32_PIDL_ILRemoveLastID(pidlParent);
    2838      
     2839
    28392840  return pidlParent;
    28402841}
     
    28432844 *      GetPidlFromName
    28442845 *
    2845  * returns the pidl of the file name relative to folder 
     2846 * returns the pidl of the file name relative to folder
    28462847 * NULL if an error occurred
    28472848 */
     
    28572858  if(!*lpcstrFileName) return NULL;
    28582859
    2859   MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH); 
     2860  MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH);
    28602861
    28612862  if(!lpsf)
     
    28672868  else
    28682869  {
    2869     IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL); 
     2870    IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL);
    28702871  }
    28712872  return pidl;
     
    28782879        ULONG uAttr  = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
    28792880        HRESULT ret;
    2880        
     2881
    28812882        TRACE("%p, %p\n", psf, pidl);
    28822883
     
    29192920
    29202921  return bBrowseSelFolder;
    2921 } 
     2922}
    29222923
    29232924/*
  • trunk/src/comdlg32/filedlgbrowser.c

    r21512 r21916  
    103103        {
    104104          case STRRET_WSTR:
    105             lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
    106             COMDLG32_SHFree(src->u.pOleStr);
     105            lstrcpynW((LPWSTR)dest, src->DUMMYUNIONNAME_DOT pOleStr, len);
     106            COMDLG32_SHFree(src->DUMMYUNIONNAME_DOT pOleStr);
    107107            break;
    108108
    109109          case STRRET_CSTR:
    110             if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, (LPWSTR)dest, len ))
     110            if (len && !MultiByteToWideChar( CP_ACP, 0, src->DUMMYUNIONNAME_DOT cStr, -1, (LPWSTR)dest, len ))
    111111                ((LPWSTR)dest)[len-1] = 0;
    112112            break;
     
    115115            if (pidl)
    116116            {
    117                 if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset,
     117                if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->DUMMYUNIONNAME_DOT uOffset,
    118118                                                 -1, (LPWSTR)dest, len ))
    119119                    ((LPWSTR)dest)[len-1] = 0;
  • trunk/src/comdlg32/fontdlg.c

    r6709 r21916  
    55 * Copyright 1996 Albrecht Kleine
    66 */
     7
     8#include <ctype.h>
     9#include <stdlib.h>
     10#include <stdio.h>
     11#include <string.h>
    712
    813#ifdef __WIN32OS2__
     
    1520#endif
    1621
    17 #include <ctype.h>
    18 #include <stdlib.h>
    19 #include <stdio.h>
    20 #include <string.h>
    2122#include "windef.h"
    2223#include "winbase.h"
     
    573574    s.hWnd1=GetDlgItem(hDlg,cmb1);
    574575    s.lpcf32a=lpcf;
    575     if (!EnumFontFamiliesA(hdc, NULL, FontFamilyEnumProc, (LPARAM)&s))
     576    if (!EnumFontFamiliesA(hdc, NULL, (FONTENUMPROCA)FontFamilyEnumProc, (LPARAM)&s))
    576577      TRACE("EnumFontFamilies returns 0\n");
    577578    if (lpcf->Flags & CF_INITTOLOGFONTSTRUCT)
     
    806807                        s.hWnd2=GetDlgItem(hDlg, cmb3);
    807808                        s.lpcf32a=lpcf;
    808                         EnumFontFamiliesA(hdc, str, FontStyleEnumProc, (LPARAM)&s);
     809                        EnumFontFamiliesA(hdc, str, (FONTENUMPROCW)FontStyleEnumProc, (LPARAM)&s);
    809810                        SetCursor(hcursor);
    810811                      }
Note: See TracChangeset for help on using the changeset viewer.