Changeset 21916 for trunk/src/comdlg32
- Timestamp:
 - Dec 18, 2011, 10:28:22 PM (14 years ago)
 - Location:
 - trunk
 - Files:
 - 
      
- 2 deleted
 - 8 edited
 - 2 copied
 
- 
          
  . (modified) (2 props)
 - 
          
  src/comdlg32/Makefile.kmk (copied) (copied from branches/gcc-kmk/src/comdlg32/Makefile.kmk )
 - 
          
  src/comdlg32/cdlg.h (modified) (2 diffs)
 - 
          
  src/comdlg32/colordlg.c (modified) (2 diffs)
 - 
          
  src/comdlg32/comdlg32.def (modified) (1 diff)
 - 
          
  src/comdlg32/filedlg.c (modified) (46 diffs)
 - 
          
  src/comdlg32/filedlg95.c (modified) (88 diffs)
 - 
          
  src/comdlg32/filedlgbrowser.c (modified) (2 diffs)
 - 
          
  src/comdlg32/fontdlg.c (modified) (4 diffs)
 - 
          
  src/comdlg32/initcomdlg32.cpp (deleted)
 - 
          
  src/comdlg32/initterm.cpp (copied) (copied from branches/gcc-kmk/src/comdlg32/initterm.cpp )
 - 
          
  src/comdlg32/makefile (deleted)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk
- Property svn:ignore
- 
      
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk  
 - 
      
 - 
Property       svn:mergeinfo
 set to       
/branches/gcc-kmk merged eligible  
 - Property svn:ignore
 - 
      
trunk/src/comdlg32/cdlg.h
r8593 r21916 64 64 #define PD32_PRINTER_STATUS_READY 1536 65 65 #define PD32_PRINTER_STATUS_PAUSED 1537 66 #define PD32_PRINTER_STATUS_ERROR 1538 66 #define PD32_PRINTER_STATUS_ERROR 1538 67 67 #define PD32_PRINTER_STATUS_PENDING_DELETION 1539 68 68 #define PD32_PRINTER_STATUS_PAPER_JAM 1540 … … 102 102 /* DPA */ 103 103 #ifdef __WIN32OS2__ 104 #include <win \shell.h>104 #include <win/shell.h> 105 105 106 106 LPVOID WINAPI SHAlloc(DWORD);  - 
      
trunk/src/comdlg32/colordlg.c
r6709 r21916 9 9 sometimes, especially when 2 instances of the 10 10 dialog are loaded at the same time */ 11 12 #include <ctype.h> 13 #include <stdlib.h> 14 #include <stdio.h> 15 #include <string.h> 11 16 12 17 #ifdef __WIN32OS2__ … … 19 24 #endif 20 25 21 #include <ctype.h>22 #include <stdlib.h>23 #include <stdio.h>24 #include <string.h>25 26 #include "windef.h" 26 27 #include "winbase.h"  - 
      
trunk/src/comdlg32/comdlg32.def
r4809 r21916 9 9 10 10 EXPORTS 11 ChooseColorA = _ChooseColorA@4@10112 ChooseColorW = _ChooseColorW@4@10213 ChooseFontA = _ChooseFontA@4@10314 ChooseFontW = _ChooseFontW@4@10415 CommDlgExtendedError = _CommDlgExtendedError@0@10516 FindTextA = _FindTextA@4@10617 FindTextW = _FindTextW@4@10718 GetFileTitleA = _GetFileTitleA@12@10819 GetFileTitleW = _GetFileTitleW@12@10920 GetOpenFileNameA = _GetOpenFileNameA@4@11021 GetOpenFileNameW = _GetOpenFileNameW@4@11122 GetSaveFileNameA = _GetSaveFileNameA@4@11223 GetSaveFileNameW = _GetSaveFileNameW@4@11311 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 24 24 ; LoadAlterBitmap @114 25 PageSetupDlgA = _PageSetupDlgA@4@11526 PageSetupDlgW = _PageSetupDlgW@4@11627 PrintDlgA = _PrintDlgA@4@11728 PrintDlgW = _PrintDlgW@4@11829 ReplaceTextA = _ReplaceTextA@4@11930 ReplaceTextW = _ReplaceTextW@4@12025 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 31 31 ; WantArrows @121 32 32 ; dwLBSubclass @122  - 
      
trunk/src/comdlg32/filedlg.c
r9522 r21916 22 22 23 23 #ifdef __WIN32OS2__ 24 #include <win \cursoricon.h>24 #include <win/cursoricon.h> 25 25 #include <heapstring.h> 26 26 … … 42 42 43 43 #define BUFFILE 512 44 #define BUFFILEALLOC 512 * sizeof(WCHAR) 45 46 struct FSPRIVATE 44 #define BUFFILEALLOC 512 * sizeof(WCHAR) 45 46 struct FSPRIVATE 47 47 { 48 48 HWND hwnd; /* file dialog window handle */ … … 75 75 #define LFS32A 2 76 76 #define LFS32W 3 77 77 78 78 static const WCHAR FILE_star[] = {'*','.','*', 0}; 79 79 static const WCHAR FILE_bslash[] = {'\\', 0}; … … 125 125 static BOOL initialized = 0; 126 126 CURSORICONINFO *fldrInfo; 127 127 128 128 if (!initialized) { 129 129 #ifdef __WIN32OS2__ … … 148 148 hNet = LoadImageA( inst, "NETWORK", IMAGE_ICON, 16, 16, LR_SHARED ); 149 149 #endif 150 if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 || 150 if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 || 151 151 hHDisk == 0 || hCDRom == 0 || hNet == 0) 152 152 { … … 160 160 fldrInfo = (CURSORICONINFO *) GlobalLock16( hFolder2 ); 161 161 if (!fldrInfo) 162 { 162 { 163 163 ERR("Error measuring icons !\n"); 164 164 return FALSE; … … 219 219 } else { /* get it from internal Wine resource */ 220 220 HANDLE hResInfo; 221 if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 221 if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 222 222 lfs->open? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA))) 223 223 { … … 274 274 DWORD size; 275 275 276 if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 276 if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, 277 277 lfs->open ? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA))) 278 278 { … … 424 424 i = 0; 425 425 if (cfptr) 426 for ( ;(n = lstrlenW(cfptr)) != 0; i++) 426 for ( ;(n = lstrlenW(cfptr)) != 0; i++) 427 427 { 428 428 cfptr += n + 1; … … 432 432 } 433 433 if (fptr) 434 for ( ;(n = lstrlenW(fptr)) != 0; i++) 434 for ( ;(n = lstrlenW(fptr)) != 0; i++) 435 435 { 436 436 fptr += n + 1; … … 455 455 { 456 456 if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC))) return FALSE; 457 SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 457 SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 458 458 (LPARAM)str); 459 459 … … 486 486 if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC))) 487 487 return FALSE; 488 SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 488 SendMessageW(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID, 489 489 (LPARAM)str); 490 490 … … 515 515 if (!(str = HeapAlloc(GetProcessHeap(), 0, BUFFILEALLOC))) 516 516 return FALSE; 517 SendMessageW(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID, 517 SendMessageW(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID, 518 518 (LPARAM)str); 519 519 root[0] += str[2] - 'a'; … … 550 550 * FILEDLG_WMMeasureItem [internal] 551 551 */ 552 static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) 552 static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) 553 553 { 554 554 LPMEASUREITEMSTRUCT lpmeasure; 555 555 556 556 lpmeasure = (LPMEASUREITEMSTRUCT)lParam; 557 557 lpmeasure->itemHeight = fldrHeight; … … 562 562 */ 563 563 #ifdef __WIN32OS2__ 564 static LONG FILEDLG_WMMeasureItem16(HWND hWnd, WPARAM wParam, LPARAM lParam) 564 static LONG FILEDLG_WMMeasureItem16(HWND hWnd, WPARAM wParam, LPARAM lParam) 565 565 { 566 566 LPMEASUREITEMSTRUCT lpmeasure; 567 567 568 568 lpmeasure = (LPMEASUREITEMSTRUCT)lParam; 569 569 lpmeasure->itemHeight = fldrHeight; … … 571 571 } 572 572 #else 573 static LONG FILEDLG_WMMeasureItem16(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam) 573 static LONG FILEDLG_WMMeasureItem16(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam) 574 574 { 575 575 LPMEASUREITEMSTRUCT16 lpmeasure; 576 576 577 577 lpmeasure = MapSL(lParam); 578 578 lpmeasure->itemHeight = fldrHeight; … … 641 641 if (ofn->nFilterIndex == 0 && ofn->lpstrCustomFilter == NULL) 642 642 ofn->nFilterIndex = 1; 643 SendDlgItemMessageW(hWnd, cmb1, CB_SETCURSEL, ofn->nFilterIndex - 1, 0); 643 SendDlgItemMessageW(hWnd, cmb1, CB_SETCURSEL, ofn->nFilterIndex - 1, 0); 644 644 lstrcpynW(tmpstr, FILEDLG_GetFileType(ofn->lpstrCustomFilter, 645 645 (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", 647 647 ofn->nFilterIndex, debugstr_w(tmpstr)); 648 648 SetDlgItemTextW( hWnd, edt1, tmpstr ); … … 651 651 DlgDirListComboBoxW(hWnd, tmpstr, cmb2, 0, DDL_DRIVES | DDL_EXCLUSIVE); 652 652 /* read initial directory */ 653 if (ofn->lpstrInitialDir != NULL) 653 if (ofn->lpstrInitialDir != NULL) 654 654 { 655 655 int len; … … 720 720 /*********************************************************************** 721 721 * FILEDLG_UpdateResult [internal] 722 * update the displayed file name (with path) 722 * update the displayed file name (with path) 723 723 */ 724 724 void FILEDLG_UpdateResult(LFSPRIVATE lfs, WCHAR *tmpstr) … … 779 779 /*********************************************************************** 780 780 * FILEDLG_UpdateFileTitle [internal] 781 * update the displayed file name (without path) 781 * update the displayed file name (without path) 782 782 */ 783 783 void FILEDLG_UpdateFileTitle(LFSPRIVATE lfs) … … 785 785 LONG lRet; 786 786 LPOPENFILENAMEW ofnW = lfs->ofnW; 787 if (ofnW->lpstrFileTitle != NULL) 787 if (ofnW->lpstrFileTitle != NULL) 788 788 { 789 789 lRet = SendDlgItemMessageW(lfs->hwnd, lst1, LB_GETCURSEL, 0, 0); … … 997 997 lRet = (BOOL)FILEDLG_CallWindowProc(lfs, lfs->fileokstring, 998 998 0, lfs->lParam ); 999 if (lRet) 999 if (lRet) 1000 1000 { 1001 1001 *ofnW = ofnsav; /* restore old state */ … … 1035 1035 (LPARAM)pstr); 1036 1036 wsprintfW(diskname, FILE_specc, pstr[2]); 1037 HeapFree(GetProcessHeap(), 0, pstr); 1037 HeapFree(GetProcessHeap(), 0, pstr); 1038 1038 1039 1039 return FILEDLG_Validate( lfs, diskname, cmb2, lRet, TRUE ); … … 1067 1067 */ 1068 1068 static LRESULT FILEDLG_WMCommand(HWND hWnd, LPARAM lParam, UINT notification, 1069 UINT control, LFSPRIVATE lfs ) 1069 UINT control, LFSPRIVATE lfs ) 1070 1070 { 1071 1071 switch (control) … … 1090 1090 1091 1091 case cmb1: /* file type drop list */ 1092 if (notification == CBN_SELCHANGE) 1092 if (notification == CBN_SELCHANGE) 1093 1093 return FILEDLG_FileTypeChange( lfs ); 1094 1094 break; … … 1215 1215 if (ofnA->lpstrTitle) 1216 1216 str = ofnA->lpstrTitle; 1217 else 1217 else 1218 1218 /* Allocates default title (FIXME : get it from resource) */ 1219 1219 str = open ? defaultopen:defaultsave; … … 1272 1272 /************************************************************************ 1273 1273 * FILEDLG_DestroyPrivate [internal] 1274 * destroys the private object 1274 * destroys the private object 1275 1275 */ 1276 1276 void FILEDLG_DestroyPrivate(LFSPRIVATE lfs) … … 1311 1311 /************************************************************************ 1312 1312 * FILEDLG_AllocPrivate [internal] 1313 * allocate a private object to hold 32 bits Unicode 1313 * allocate a private object to hold 32 bits Unicode 1314 1314 * structure that will be used throughtout the calls, while 1315 1315 * keeping available the original structures and a few variables … … 1369 1369 FILEDLG_MapOfnStructA(lfs->ofnA, lfs->ofnW, lfs->open); 1370 1370 } 1371 else 1371 else 1372 1372 ret = NULL; 1373 1373 } … … 1390 1390 * Creates a win31 style dialog box for the user to select a file to open/save. 1391 1391 */ 1392 BOOL WINAPI GetFileName31A( 1392 BOOL WINAPI GetFileName31A( 1393 1393 LPOPENFILENAMEA lpofn, /* addess of structure with data*/ 1394 1394 UINT dlgType /* type dialogue : open/save */ … … 1405 1405 { 1406 1406 hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE ); 1407 bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner, 1407 bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner, 1408 1408 (DLGPROC) FileOpenDlgProc, (DWORD) lfs); 1409 1409 FILEDLG_DestroyPrivate(lfs); … … 1420 1420 * Creates a win31 style dialog box for the user to select a file to open/save 1421 1421 */ 1422 BOOL WINAPI GetFileName31W( 1422 BOOL WINAPI GetFileName31W( 1423 1423 LPOPENFILENAMEW lpofn, /* addess of structure with data*/ 1424 1424 UINT dlgType /* type dialogue : open/save */ … … 1435 1435 { 1436 1436 hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE ); 1437 bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner, 1437 bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner, 1438 1438 (DLGPROC) FileOpenDlgProc, (DWORD) lfs); 1439 1439 FILEDLG_DestroyPrivate(lfs); … … 1453 1453 LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, 1454 1454 LPARAM lParam) 1455 { 1455 { 1456 1456 LFSPRIVATE lfs = (LFSPRIVATE)GetPropA(hWnd,OFN_PROP); 1457 1457 DRAWITEMSTRUCT dis; 1458 1458 1459 1459 TRACE("msg=%x wparam=%x lParam=%lx\n", wMsg, wParam, lParam); 1460 1460 if ((wMsg != WM_INITDIALOG) && lfs && lfs->hook) 1461 1461 { 1462 1462 LRESULT lRet = (BOOL16)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam); 1463 if (lRet) 1463 if (lRet) 1464 1464 return lRet; /* else continue message processing */ 1465 1465 } … … 1510 1510 LRESULT lRet; 1511 1511 lRet = (BOOL16)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam); 1512 if (lRet) 1512 if (lRet) 1513 1513 return lRet; /* else continue message processing */ 1514 } 1514 } 1515 1515 switch (wMsg) { 1516 1516 case WM_INITDIALOG: 1517 1517 return FILEDLG_WMInitDialog(hWnd, wParam, lParam); 1518 1518 1519 1519 case WM_MEASUREITEM: 1520 1520 return FILEDLG_WMMeasureItem16(hWnd, wParam, lParam); 1521 1521 1522 1522 case WM_DRAWITEM: 1523 1523 FILEDLG_MapDrawItemStruct(MapSL(lParam), &dis); … … 1527 1527 return FILEDLG_WMCommand(hWnd, lParam, HIWORD(lParam), wParam, lfs); 1528 1528 } 1529 1529 1530 1530 /* 1531 1531 case WM_CTLCOLOR: … … 1541 1541 } 1542 1542 return FALSE; 1543 1543 1544 1544 */ 1545 1545 return FALSE; … … 1549 1549 /*********************************************************************** 1550 1550 * FileOpenDlgProc [internal] 1551 * Used for open and save, in fact. 1551 * Used for open and save, in fact. 1552 1552 */ 1553 1553 static LRESULT WINAPI FileOpenDlgProc(HWND hWnd, UINT wMsg, … … 1561 1561 LRESULT lRet; 1562 1562 lRet = (BOOL)FILEDLG_CallWindowProc(lfs, wMsg, wParam, lParam); 1563 if (lRet) 1563 if (lRet) 1564 1564 return lRet; /* else continue message processing */ 1565 1565 } … … 1595 1595 } 1596 1596 1597 /* ------------------ APIs ---------------------- */ 1597 /* ------------------ APIs ---------------------- */ 1598 1598 #ifndef __WIN32OS2__ 1599 1599 /*********************************************************************** … … 1609 1609 * unknown, there are some FIXME's left. 1610 1610 */ 1611 BOOL16 WINAPI GetOpenFileName16( 1611 BOOL16 WINAPI GetOpenFileName16( 1612 1612 SEGPTR ofn /* [in/out] address of structure with data*/ 1613 1613 ) … … 1626 1626 hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE ); 1627 1627 ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6); 1628 bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 1628 bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 1629 1629 (DLGPROC16) ptr, (DWORD) lfs); 1630 1630 FILEDLG_DestroyPrivate(lfs); … … 1647 1647 * unknown. There are some FIXME's left. 1648 1648 */ 1649 BOOL16 WINAPI GetSaveFileName16( 1649 BOOL16 WINAPI GetSaveFileName16( 1650 1650 SEGPTR ofn /* [in/out] addess of structure with data*/ 1651 1651 ) … … 1664 1664 hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE ); 1665 1665 ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7); 1666 bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 1666 bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner, 1667 1667 (DLGPROC16) ptr, (DWORD) lfs); 1668 1668 FILEDLG_DestroyPrivate(lfs); 1669 } 1669 } 1670 1670 1671 1671 TRACE("return lpstrFile='%s' !\n", (char *)MapSL(lpofn->lpstrFile)); … … 1775 1775 { 1776 1776 return GetFileDialog95A(ofn, SAVE_DIALOG); 1777 } 1777 } 1778 1778 else 1779 1779 { … … 1811 1811 { 1812 1812 return GetFileDialog95W(ofn, SAVE_DIALOG); 1813 } 1813 } 1814 1814 else 1815 1815 {  - 
      
trunk/src/comdlg32/filedlg95.c
r21512 r21916 34 34 * 35 35 */ 36 37 #include <ctype.h> 38 #include <stdlib.h> 39 #include <stdio.h> 40 #include <string.h> 41 36 42 #ifdef __WIN32OS2__ 37 43 #include <windef.h> … … 41 47 #include <heapstring.h> 42 48 #include <misc.h> 43 #include <win \shlwapi.h>49 #include <win/shlwapi.h> 44 50 45 51 #define MapHModuleSL(a) a … … 47 53 #define snprintf wsnprintfA 48 54 #endif 49 50 #include <ctype.h>51 #include <stdlib.h>52 #include <stdio.h>53 #include <string.h>54 55 55 56 #include "winbase.h" … … 86 87 HIMAGELIST hImgList; 87 88 int m_iIndent; /* Indentation index */ 88 LPITEMIDLIST pidlItem; /* absolute pidl of the item */ 89 LPITEMIDLIST pidlItem; /* absolute pidl of the item */ 89 90 90 91 } SFOLDER,*LPSFOLDER; … … 216 217 * GetFileName95 217 218 * 218 * Creates an Open common dialog box that lets the user select 219 * Creates an Open common dialog box that lets the user select 219 220 * the drive, directory, and the name of a file or set of files to open. 220 221 * … … 251 252 return FALSE; 252 253 } 253 254 254 255 /* old style hook messages */ 255 256 if (IsHooked(fodInfos)) … … 260 261 fodInfos->HookMsg.sharevistring = RegisterWindowMessageA(SHAREVISTRINGA); 261 262 } 262 263 263 264 lRes = DialogBoxIndirectParamA(COMMDLG_hInstance32, 264 265 (LPDLGTEMPLATEA) template, … … 270 271 if( lRes == -1) 271 272 return FALSE; 272 273 273 274 return lRes; 274 275 } … … 291 292 LPSTR lpstrSavDir = NULL; 292 293 DWORD dwFlags = 0; 293 294 /* Initialise FileOpenDlgInfos structure*/ 294 295 /* Initialise FileOpenDlgInfos structure*/ 295 296 fodInfos = (FileOpenDlgInfos*)MemAlloc(sizeof(FileOpenDlgInfos)); 296 297 ZeroMemory(fodInfos, sizeof(FileOpenDlgInfos)); 297 298 298 299 /* Pass in the original ofn */ 299 300 fodInfos->ofnInfos = ofn; 300 301 301 302 /* Save original hInstance value */ 302 303 hInstance = ofn->hInstance; … … 316 317 fodInfos->DlgInfos.dwDlgProp = 0; 317 318 fodInfos->DlgInfos.hwndCustomDlg = (HWND)NULL; 318 319 319 320 switch(iDlgType) 320 321 { … … 400 401 FileOpenDlgInfos *fodInfos; 401 402 HINSTANCE hInstance; 402 403 403 404 /* out arguments */ 404 405 LPWSTR lpstrFile = NULL; … … 437 438 /* filter is a list... title\0ext\0......\0\0 */ 438 439 s = ofn->lpstrFilter; 439 440 440 441 while (*s) s = s+strlenW(s)+1; 441 442 s++; … … 528 529 } 529 530 #endif 530 531 531 532 /* restore saved IN arguments and convert OUT arguments back */ 532 533 ofn->Flags = dwFlags; … … 613 614 SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left), 614 615 (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER); 615 616 616 617 hwndChild = GetWindow(hwndChildDlg,GW_CHILD); 617 618 if(hwndStc32) … … 633 634 GetWindowRect(hwndChild,&rectCtrl); 634 635 MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2); 635 636 636 637 /* 637 638 Check the initial position of the controls relative to the initial … … 651 652 rectCtrl.top += ptMoveCtl.y; 652 653 } 653 654 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 654 655 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 655 656 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 656 657 SWP_NOSIZE | SWP_NOZORDER ); … … 659 660 } 660 661 hwndChild = GetWindow(hwndParentDlg,GW_CHILD); 661 662 662 663 if(hwndStc32) 663 664 { … … 680 681 rectCtrl.top += ptMoveCtl.y; 681 682 682 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 683 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 683 684 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 684 685 SWP_NOSIZE |SWP_NOZORDER ); 685 686 } 686 687 } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL); 687 } 688 } 688 689 } 689 690 } … … 701 702 { 702 703 case WM_INITDIALOG: 703 { 704 { 704 705 fodInfos = (FileOpenDlgInfos *)lParam; 705 706 lParam = (LPARAM) fodInfos->ofnInfos; … … 708 709 if(fodInfos && IsHooked(fodInfos)) 709 710 return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam); 710 return 0; 711 } 711 return 0; 712 } 712 713 } 713 714 714 715 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); 718 719 } 719 720 … … 757 758 if(hChildDlg) 758 759 { 759 ShowWindow(hChildDlg,SW_SHOW); 760 ShowWindow(hChildDlg,SW_SHOW); 760 761 return hChildDlg; 761 762 } … … 773 774 tmplate.cx = rectHwnd.right-rectHwnd.left; 774 775 tmplate.cy = rectHwnd.bottom-rectHwnd.top; 775 776 776 777 return CreateDialogIndirectParamA(fodInfos->ofnInfos->hInstance,&tmplate,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos); 777 778 } 778 779 return (HWND)NULL; 779 780 } 780 781 781 782 /*********************************************************************** 782 783 * SendCustomDlgNotificationMessage … … 830 831 GetDlgItemTextA(hwnd,IDC_FILENAME,lpstrPath, sizeof(lpstrPath)); 831 832 lpstrFileSpec = (LPSTR)PathFindFileNameA(lpstrPath); 832 if (lpstrFileSpec==lpstrPath) 833 if (lpstrFileSpec==lpstrPath) 833 834 { 834 835 char lpstrCurrentDir[MAX_PATH]; … … 838 839 snprintf((LPSTR)lParam,(int)wParam,"%s\\%s",lpstrCurrentDir,lpstrPath); 839 840 reqSize=strlen(lpstrCurrentDir)+1+strlen(lpstrPath)+1; 840 } 841 else 841 } 842 else 842 843 { 843 844 lstrcpynA((LPSTR)lParam,(LPSTR)lpstrPath,(int)wParam); … … 872 873 return TRUE; 873 874 } 874 875 875 876 /*********************************************************************** 876 877 * FileOpenDlgProc95 … … 883 884 TRACE("0x%04x 0x%04x\n", hwnd, uMsg); 884 885 #endif 885 886 886 887 switch(uMsg) 887 888 { … … 890 891 FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam; 891 892 892 /* Adds the FileOpenDlgInfos in the property list of the dialog 893 /* Adds the FileOpenDlgInfos in the property list of the dialog 893 894 so it will be easily accessible through a GetPropA(...) */ 894 895 SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos); 895 896 896 fodInfos->DlgInfos.hwndCustomDlg = 897 fodInfos->DlgInfos.hwndCustomDlg = 897 898 CreateTemplateDialog((FileOpenDlgInfos *)lParam, hwnd); 898 899 … … 917 918 } 918 919 return FALSE; 919 920 920 921 case WM_GETISHELLBROWSER: 921 922 return FILEDLG95_OnWMGetIShellBrowser(hwnd); … … 933 934 if(TTN_GETDISPINFOA == lpnmh->code ) 934 935 { 935 LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam; 936 LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam; 936 937 switch(lpnmh->idFrom ) 937 938 { … … 959 960 stringId = 0; 960 961 } 961 lpdi->hinst = COMMDLG_hInstance32; 962 lpdi->hinst = COMMDLG_hInstance32; 962 963 lpdi->lpszText = (LPSTR) stringId; 963 964 } … … 995 996 { COMDLG32_hInstance, 800 } // desktop icon 996 997 }; 997 998 998 999 RECT rectTB; 999 1000 1000 1001 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); 1001 1002 … … 1011 1012 MapWindowPoints( 0, hwnd,(LPPOINT)&rectTB,2); 1012 1013 1013 fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL, 1014 fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL, 1014 1015 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, 1018 1019 rectTB.left,rectTB.top, rectTB.right-rectTB.left, rectTB.bottom-rectTB.top, 1019 1020 SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER ); … … 1027 1028 1028 1029 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); 1030 1031 1031 1032 /* Set the window text with the text specified in the OPENFILENAME structure */ … … 1067 1068 are hidden and we are not using a custom template */ 1068 1069 if ( (fodInfos->ofnInfos->Flags & OFN_HIDEREADONLY) && 1069 (!(fodInfos->ofnInfos->Flags & 1070 (!(fodInfos->ofnInfos->Flags & 1070 1071 (OFN_SHOWHELP|OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE)))) 1071 1072 { … … 1076 1077 /* subtract the height of the help button plus the space between 1077 1078 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), 1080 1081 SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER); 1081 1082 } … … 1102 1103 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) lParam; 1103 1104 1104 TRACE("dir=%s file=%s\n", 1105 TRACE("dir=%s file=%s\n", 1105 1106 fodInfos->ofnInfos->lpstrInitialDir, fodInfos->ofnInfos->lpstrFile); 1106 1107 1107 1108 #ifdef __WIN32OS2__ 1108 /*@PF 1109 /*@PF 1109 1110 How can Wine miss this?? Very common situation for Windows apps! 1110 1111 If InitialDir is NULL and we have full blown path in lpstrFile we set … … 1112 1113 1113 1114 Q: What about Unicode? 1114 1115 1115 1116 */ 1116 1117 1117 if (fodInfos->ofnInfos->lpstrInitialDir == NULL && fodInfos->ofnInfos->lpstrFile && 1118 if (fodInfos->ofnInfos->lpstrInitialDir == NULL && fodInfos->ofnInfos->lpstrFile && 1118 1119 !PathIsRelativeA(fodInfos->ofnInfos->lpstrFile) && 1119 1120 PathGetDriveNumberA(fodInfos->ofnInfos->lpstrFile) != -1) 1120 1121 { 1121 dopstr = HEAP_strdupA(GetProcessHeap(), 0,fodInfos->ofnInfos->lpstrFile); 1122 dopstr = HEAP_strdupA(GetProcessHeap(), 0,fodInfos->ofnInfos->lpstrFile); 1122 1123 *strrchr(dopstr,'\\') = '\0'; 1123 1124 fodInfos->ofnInfos->lpstrInitialDir = dopstr; … … 1174 1175 fodInfos->ofnInfos->lpstrInitialDir = NULL; 1175 1176 HEAP_free(dopstr); 1176 } 1177 } 1177 1178 #endif 1178 1179 return TRUE; … … 1261 1262 /* Do not use the listview selection anymore */ 1262 1263 fodInfos->DlgInfos.dwDlgProp &= ~FODPROP_USEVIEW; 1263 return 0; 1264 return 0; 1264 1265 } 1265 1266 … … 1278 1279 SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser); 1279 1280 1280 return TRUE; 1281 return TRUE; 1281 1282 } 1282 1283 … … 1284 1285 /*********************************************************************** 1285 1286 * FILEDLG95_OnOpenMultipleFiles 1286 * 1287 * 1287 1288 * Handles the opening of multiple files. 1288 1289 * … … 1301 1302 lpstrFile = fodInfos->ofnInfos->lpstrFile; 1302 1303 lpstrFile[0] = '\0'; 1303 1304 1304 1305 SHGetPathFromIDListA( fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathSpec ); 1305 1306 … … 1307 1308 ( fodInfos->ofnInfos->Flags & OFN_FILEMUSTEXIST)) 1308 1309 { 1309 LPSTR lpstrTemp = lpstrFileList; 1310 LPSTR lpstrTemp = lpstrFileList; 1310 1311 1311 1312 for ( nCount = 0; nCount < nFileCount; nCount++ ) … … 1332 1333 return FALSE; 1333 1334 } 1334 1335 1335 1336 /* move to the next file in the list of files */ 1336 1337 lpstrTemp += strlen(lpstrTemp) + 1; … … 1355 1356 * 1356 1357 * Ok button WM_COMMAND message handler 1357 * 1358 * 1358 1359 * If the function succeeds, the return value is nonzero. 1359 1360 */ … … 1396 1397 return FALSE; 1397 1398 } 1398 1399 1399 1400 if(nFileCount > 1) 1400 1401 { … … 1455 1456 to a folder if the path points to a directory or the last 1456 1457 valid element is a directory. 1457 1458 1458 1459 valid variables: 1459 1460 lpstrPathAndFile: cleaned up path … … 1657 1658 { 1658 1659 LPSTR lpszTemp; 1659 1660 1660 1661 /* fill destination buffer */ 1661 1662 strcpy(fodInfos->ofnInfos->lpstrFile, lpstrPathAndFile); … … 1667 1668 lpszTemp = PathFindFileNameA(lpstrPathAndFile); 1668 1669 fodInfos->ofnInfos->nFileOffset = lpszTemp - lpstrPathAndFile; 1669 1670 1670 1671 /* set extension offset */ 1671 1672 lpszTemp = PathFindExtensionA(lpstrPathAndFile); 1672 1673 fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? lpszTemp - lpstrPathAndFile + 1 : 0; 1673 1674 1674 1675 /* set the lpstrFileTitle */ 1675 1676 if(fodInfos->ofnInfos->lpstrFileTitle) … … 1695 1696 } 1696 1697 } 1697 1698 1698 1699 TRACE("close\n"); 1699 1700 FILEDLG95_Clean(hwnd); … … 1728 1729 1729 1730 /* 1730 * Initialisation of the FileOpenDialogInfos structure 1731 * Initialisation of the FileOpenDialogInfos structure 1731 1732 */ 1732 1733 … … 1739 1740 if (!(fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT)) 1740 1741 { 1741 fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL; 1742 fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL; 1742 1743 } 1743 1744 fodInfos->ShellInfos.folderSettings.fFlags |= FWF_AUTOARRANGE | FWF_ALIGNLEFT; … … 1749 1750 1750 1751 /* Construct the IShellBrowser interface */ 1751 fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); 1752 1752 fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); 1753 1753 1754 return NOERROR; 1754 1755 } … … 1817 1818 LPITEMIDLIST pidl; 1818 1819 HRESULT hres; 1819 1820 1820 1821 TRACE("\n"); 1821 1822 … … 1850 1851 * FILEDLG95_FILETYPE_Init 1851 1852 * 1852 * Initialisation of the file type combo box 1853 * Initialisation of the file type combo box 1853 1854 */ 1854 1855 static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd) … … 1866 1867 for(;;) 1867 1868 { 1868 /* filter is a list... title\0ext\0......\0\0 1869 /* filter is a list... title\0ext\0......\0\0 1869 1870 * Set the combo item text to the title and the item data 1870 1871 * to the ext … … 1883 1884 strcpy(lpstrExt,lpstrPos); 1884 1885 lpstrPos += strlen(lpstrPos) + 1; 1885 1886 1886 1887 /* Add the item at the end of the combo */ 1887 1888 CBAddString(fodInfos->DlgInfos.hwndFileTypeCB, lpstrDisplay); … … 1894 1895 * FIXME: lpstrCustomFilter not handled at all 1895 1896 */ 1896 1897 1897 1898 /* set default filter index */ 1898 1899 if(fodInfos->ofnInfos->nFilterIndex == 0 && fodInfos->ofnInfos->lpstrCustomFilter == NULL) … … 1902 1903 if ( fodInfos->ofnInfos->nFilterIndex > nFilters ) 1903 1904 fodInfos->ofnInfos->nFilterIndex = nFilters; 1904 1905 1905 1906 /* Set the current index selection. */ 1906 1907 CBSetCurSel(fodInfos->DlgInfos.hwndFileTypeCB, fodInfos->ofnInfos->nFilterIndex-1); 1907 1908 1908 1909 /* Get the corresponding text string from the combo box. */ 1909 1910 lpstrFilter = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, … … 1911 1912 1912 1913 if ((INT)lpstrFilter == CB_ERR) /* control is empty */ 1913 lpstrFilter = NULL; 1914 lpstrFilter = NULL; 1914 1915 1915 1916 if(lpstrFilter) … … 2020 2021 2021 2022 } 2022 2023 2023 2024 /*********************************************************************** 2024 2025 * FILEDLG95_LOOKIN_Init 2025 2026 * 2026 * Initialisation of the look in combo box 2027 * Initialisation of the look in combo box 2027 2028 */ 2028 2029 static HRESULT FILEDLG95_LOOKIN_Init(HWND hwndCombo) … … 2127 2128 { 2128 2129 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 ); 2135 2136 } 2136 2137 else 2137 2138 { 2138 2139 ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 2139 0, 2140 &sfi, 2140 0, 2141 &sfi, 2141 2142 sizeof (SHFILEINFOA), 2142 SHGFI_PIDL | SHGFI_SMALLICON | 2143 SHGFI_SYSICONINDEX | 2143 SHGFI_PIDL | SHGFI_SMALLICON | 2144 SHGFI_SYSICONINDEX | 2144 2145 SHGFI_DISPLAYNAME); 2145 2146 } … … 2164 2165 iIndentation = 0; 2165 2166 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 2170 2171 | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME ); 2171 2172 … … 2191 2192 rectText.bottom = 2192 2193 (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom + tm.tmHeight) / 2; 2193 2194 2194 2195 /* Draw the icon from the image list */ 2195 2196 ImageList_Draw(ilItemImage, 2196 2197 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 ); 2201 2202 2202 2203 /* Draw the associated text */ … … 2225 2226 { 2226 2227 LPSFOLDER tmpFolder; 2227 int iItem; 2228 int iItem; 2228 2229 2229 2230 iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB); … … 2242 2243 break; 2243 2244 } 2244 2245 2245 2246 } 2246 2247 return FALSE; … … 2267 2268 if(!(liInfos = (LookInInfos *)GetPropA(hwnd,LookInInfosStr))) 2268 2269 return -1; 2269 2270 2270 2271 tmpFolder = MemAlloc(sizeof(SFOLDER)); 2271 2272 tmpFolder->m_iIndent = 0; … … 2282 2283 if(tmpFolder->m_iIndent > liInfos->iMaxIndentation) 2283 2284 liInfos->iMaxIndentation = tmpFolder->m_iIndent; 2284 2285 2285 2286 sfi.dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM; 2286 2287 SHGetFileInfoA((LPSTR)pidl, … … 2288 2289 &sfi, 2289 2290 sizeof(sfi), 2290 SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 2291 SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 2291 2292 | SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED); 2292 2293 … … 2296 2297 { 2297 2298 int iItemID; 2298 2299 2299 2300 TRACE("-- Add %s at %u\n", sfi.szDisplayName, tmpFolder->m_iIndent); 2300 2301 … … 2322 2323 * FILEDLG95_LOOKIN_InsertItemAfterParent 2323 2324 * 2324 * Insert an item below its parent 2325 * Insert an item below its parent 2325 2326 */ 2326 2327 static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl) 2327 2328 { 2328 2329 2329 2330 LPITEMIDLIST pidlParent = GetParentPidl(pidl); 2330 2331 int iParentPos; … … 2381 2382 } 2382 2383 } 2383 2384 2384 2385 CBSetCurSel(hwnd,iItemPos); 2385 2386 liInfos->uSelectedItem = iItemPos; … … 2503 2504 { 2504 2505 pidl = GetPidlFromDataObject( fodInfos->Shell.FOIDataObject, nFileToOpen+1 ); 2505 2506 2506 2507 if (pidl) 2507 2508 { … … 2576 2577 { 2577 2578 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); 2580 2581 break; 2581 2582 2582 2583 case STRRET_CSTR: 2583 lstrcpynA((LPSTR)dest, src-> u.cStr, len);2584 lstrcpynA((LPSTR)dest, src->DUMMYUNIONNAME_DOT cStr, len); 2584 2585 break; 2585 2586 2586 2587 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); 2588 2589 break; 2589 2590 … … 2621 2622 2622 2623 TRACE("nStrLen=%u str=%s\n", nStrLen, lpstrEdit); 2623 2624 2624 2625 /* we might get single filename without any '"', 2625 2626 * so we need nStrLen + terminating \0 + end-of-list \0 */ … … 2642 2643 (*sizeUsed)++; 2643 2644 nFileCount++; 2644 } 2645 } 2645 2646 nStrCharCount++; 2646 2647 } … … 2689 2690 else 2690 2691 { 2691 GlobalUnlock(medium. u.hGlobal);2692 GlobalFree(medium. u.hGlobal);2692 GlobalUnlock(medium.DUMMYUNIONNAME_DOT hGlobal); 2693 GlobalFree(medium.DUMMYUNIONNAME_DOT hGlobal); 2693 2694 } 2694 2695 } … … 2703 2704 LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) 2704 2705 { 2705 2706 2706 2707 STGMEDIUM medium; 2707 2708 FORMATETC formatetc; 2708 2709 LPITEMIDLIST pidl = NULL; 2709 2710 2710 2711 TRACE("sv=%p index=%u\n", doSelected, nPidlIndex); 2711 2712 2712 2713 /* Set the FORMATETC structure*/ 2713 2714 SETDefFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); … … 2716 2717 if(SUCCEEDED(IDataObject_GetData(doSelected,&formatetc,&medium))) 2717 2718 { 2718 LPIDA cida = GlobalLock(medium. u.hGlobal);2719 LPIDA cida = GlobalLock(medium.DUMMYUNIONNAME_DOT hGlobal); 2719 2720 if(nPidlIndex <= cida->cidl) 2720 2721 { … … 2748 2749 if(SUCCEEDED(IDataObject_GetData(doSelected,&formatetc,&medium))) 2749 2750 { 2750 LPIDA cida = GlobalLock(medium. u.hGlobal);2751 LPIDA cida = GlobalLock(medium.DUMMYUNIONNAME_DOT hGlobal); 2751 2752 retVal = cida->cidl; 2752 2753 COMCTL32_ReleaseStgMedium(medium); … … 2763 2764 * GetName 2764 2765 * 2765 * Get the pidl's display name (relative to folder) and 2766 * Get the pidl's display name (relative to folder) and 2766 2767 * put it in lpstrFileName. 2767 * 2768 * 2768 2769 * Return NOERROR on success, 2769 2770 * E_FAIL otherwise … … 2797 2798 * GetShellFolderFromPidl 2798 2799 * 2799 * pidlRel is the item pidl relative 2800 * pidlRel is the item pidl relative 2800 2801 * Return the IShellFolder of the absolute pidl 2801 2802 */ … … 2833 2834 2834 2835 TRACE("%p\n", pidl); 2835 2836 2836 2837 pidlParent = COMDLG32_PIDL_ILClone(pidl); 2837 2838 COMDLG32_PIDL_ILRemoveLastID(pidlParent); 2838 2839 2839 2840 return pidlParent; 2840 2841 } … … 2843 2844 * GetPidlFromName 2844 2845 * 2845 * returns the pidl of the file name relative to folder 2846 * returns the pidl of the file name relative to folder 2846 2847 * NULL if an error occurred 2847 2848 */ … … 2857 2858 if(!*lpcstrFileName) return NULL; 2858 2859 2859 MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH); 2860 MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH); 2860 2861 2861 2862 if(!lpsf) … … 2867 2868 else 2868 2869 { 2869 IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL); 2870 IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL); 2870 2871 } 2871 2872 return pidl; … … 2878 2879 ULONG uAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER; 2879 2880 HRESULT ret; 2880 2881 2881 2882 TRACE("%p, %p\n", psf, pidl); 2882 2883 … … 2919 2920 2920 2921 return bBrowseSelFolder; 2921 } 2922 } 2922 2923 2923 2924 /*  - 
      
trunk/src/comdlg32/filedlgbrowser.c
r21512 r21916 103 103 { 104 104 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); 107 107 break; 108 108 109 109 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 )) 111 111 ((LPWSTR)dest)[len-1] = 0; 112 112 break; … … 115 115 if (pidl) 116 116 { 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, 118 118 -1, (LPWSTR)dest, len )) 119 119 ((LPWSTR)dest)[len-1] = 0;  - 
      
trunk/src/comdlg32/fontdlg.c
r6709 r21916 5 5 * Copyright 1996 Albrecht Kleine 6 6 */ 7 8 #include <ctype.h> 9 #include <stdlib.h> 10 #include <stdio.h> 11 #include <string.h> 7 12 8 13 #ifdef __WIN32OS2__ … … 15 20 #endif 16 21 17 #include <ctype.h>18 #include <stdlib.h>19 #include <stdio.h>20 #include <string.h>21 22 #include "windef.h" 22 23 #include "winbase.h" … … 573 574 s.hWnd1=GetDlgItem(hDlg,cmb1); 574 575 s.lpcf32a=lpcf; 575 if (!EnumFontFamiliesA(hdc, NULL, FontFamilyEnumProc, (LPARAM)&s))576 if (!EnumFontFamiliesA(hdc, NULL, (FONTENUMPROCA)FontFamilyEnumProc, (LPARAM)&s)) 576 577 TRACE("EnumFontFamilies returns 0\n"); 577 578 if (lpcf->Flags & CF_INITTOLOGFONTSTRUCT) … … 806 807 s.hWnd2=GetDlgItem(hDlg, cmb3); 807 808 s.lpcf32a=lpcf; 808 EnumFontFamiliesA(hdc, str, FontStyleEnumProc, (LPARAM)&s);809 EnumFontFamiliesA(hdc, str, (FONTENUMPROCW)FontStyleEnumProc, (LPARAM)&s); 809 810 SetCursor(hcursor); 810 811 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  