Changeset 5046 for trunk/src


Ignore:
Timestamp:
Feb 1, 2001, 7:02:49 PM (25 years ago)
Author:
sandervl
Message:

wine merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comdlg32/filedlg95.c

    r4610 r5046  
    291291  HINSTANCE hInstance;
    292292  LPCSTR lpstrInitialDir = (LPCSTR)-1;
     293  LPSTR lpstrSavDir = NULL;
    293294  DWORD dwFlags = 0;
    294295 
     
    304305  fodInfos->ofnInfos->hInstance = MapHModuleLS(ofn->hInstance);
    305306
     307  /* save current directory */
     308  if (ofn->Flags & OFN_NOCHANGEDIR)
     309  {
     310     lpstrSavDir = MemAlloc(MAX_PATH);
     311     GetCurrentDirectoryA(MAX_PATH, lpstrSavDir);
     312  }
     313
    306314  dwFlags = ofn->Flags;
    307315  ofn->Flags = ofn->Flags|OFN_WINE;
     
    324332  }
    325333
     334  if (lpstrSavDir)
     335  {
     336      SetCurrentDirectoryA(lpstrSavDir);
     337      MemFree(lpstrSavDir);
     338  }
     339
    326340  if (lpstrInitialDir != (LPCSTR)-1)
    327341  {
     
    383397  FileOpenDlgInfos *fodInfos;
    384398  HINSTANCE hInstance;
    385  
     399#ifdef __WIN32OS2__
     400  LPSTR lpstrSavDir = NULL;
     401#endif
    386402  /* out arguments */
    387403  LPWSTR lpstrFile = NULL;
     
    476492  hInstance = ofn->hInstance;
    477493
     494#ifdef __WIN32OS2__
     495  /* save current directory */
     496  if (ofn->Flags & OFN_NOCHANGEDIR)
     497  {
     498     lpstrSavDir = MemAlloc(MAX_PATH);
     499     GetCurrentDirectoryA(MAX_PATH, lpstrSavDir);
     500  }
     501#endif
     502
    478503  ofn->Flags = ofn->Flags|OFN_WINE|OFN_UNICODE;
    479504  ofn->hInstance = MapHModuleLS(ofn->hInstance);
     
    491516      ret = 0;
    492517  }
     518
     519#ifdef __WIN32OS2__
     520  if (lpstrSavDir)
     521  {
     522      SetCurrentDirectoryA(lpstrSavDir);
     523      MemFree(lpstrSavDir);
     524  }
     525#endif
    493526     
    494527  /* restore saved IN arguments and convert OUT arguments back */
     
    856889         SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE);
    857890         FILEDLG95_FillControls(hwnd, wParam, lParam);
     891         SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE);
    858892         return 0;
    859893       }
     
    15481582            /* first old style */
    15491583            TRACE("---\n");
    1550 #ifndef __WIN32OS2__
    1551 //-->> crashes Adobe Acrobat 4.0
    1552             CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook, hwnd,
    1553                          fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
     1584            CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,
     1585                            fodInfos->DlgInfos.hwndCustomDlg,
     1586                            fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
    15541587            if (GetWindowLongA(hwnd, DWL_MSGRESULT))
    15551588            {
     
    15581591              goto ret;
    15591592            }
    1560 #endif
    15611593          }
    15621594
Note: See TracChangeset for help on using the changeset viewer.