- Timestamp:
- Feb 1, 2001, 7:02:49 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comdlg32/filedlg95.c
r4610 r5046 291 291 HINSTANCE hInstance; 292 292 LPCSTR lpstrInitialDir = (LPCSTR)-1; 293 LPSTR lpstrSavDir = NULL; 293 294 DWORD dwFlags = 0; 294 295 … … 304 305 fodInfos->ofnInfos->hInstance = MapHModuleLS(ofn->hInstance); 305 306 307 /* save current directory */ 308 if (ofn->Flags & OFN_NOCHANGEDIR) 309 { 310 lpstrSavDir = MemAlloc(MAX_PATH); 311 GetCurrentDirectoryA(MAX_PATH, lpstrSavDir); 312 } 313 306 314 dwFlags = ofn->Flags; 307 315 ofn->Flags = ofn->Flags|OFN_WINE; … … 324 332 } 325 333 334 if (lpstrSavDir) 335 { 336 SetCurrentDirectoryA(lpstrSavDir); 337 MemFree(lpstrSavDir); 338 } 339 326 340 if (lpstrInitialDir != (LPCSTR)-1) 327 341 { … … 383 397 FileOpenDlgInfos *fodInfos; 384 398 HINSTANCE hInstance; 385 399 #ifdef __WIN32OS2__ 400 LPSTR lpstrSavDir = NULL; 401 #endif 386 402 /* out arguments */ 387 403 LPWSTR lpstrFile = NULL; … … 476 492 hInstance = ofn->hInstance; 477 493 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 478 503 ofn->Flags = ofn->Flags|OFN_WINE|OFN_UNICODE; 479 504 ofn->hInstance = MapHModuleLS(ofn->hInstance); … … 491 516 ret = 0; 492 517 } 518 519 #ifdef __WIN32OS2__ 520 if (lpstrSavDir) 521 { 522 SetCurrentDirectoryA(lpstrSavDir); 523 MemFree(lpstrSavDir); 524 } 525 #endif 493 526 494 527 /* restore saved IN arguments and convert OUT arguments back */ … … 856 889 SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE); 857 890 FILEDLG95_FillControls(hwnd, wParam, lParam); 891 SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE); 858 892 return 0; 859 893 } … … 1548 1582 /* first old style */ 1549 1583 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); 1554 1587 if (GetWindowLongA(hwnd, DWL_MSGRESULT)) 1555 1588 { … … 1558 1591 goto ret; 1559 1592 } 1560 #endif1561 1593 } 1562 1594
Note:
See TracChangeset
for help on using the changeset viewer.