- Timestamp:
- Nov 28, 1999, 1:32:28 PM (26 years ago)
- Location:
- trunk/src/comdlg32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comdlg32/cdlg.h
r1556 r1864 1 /* $Id: cdlg.h,v 1. 2 1999-11-02 20:37:42sandervl Exp $ */1 /* $Id: cdlg.h,v 1.3 1999-11-28 12:32:27 sandervl Exp $ */ 2 2 /* 3 3 * Common Dialog Boxes interface (32 bit) … … 9 9 #define _WINE_DLL_CDLG_H 10 10 11 #include "dlgs.h" 12 11 13 extern HINSTANCE COMDLG32_hInstance; 14 #define COMMDLG_hInstance32 COMDLG32_hInstance 12 15 13 16 /*---------------- 32-bit ----------------*/ -
trunk/src/comdlg32/cdlg_En.rc
r1548 r1864 1 /* $Id: cdlg_En.rc,v 1.1 1999-11-02 19:09:41 sandervl Exp $ */ 2 /* (990815) */ 1 /* $Id: cdlg_En.rc,v 1.2 1999-11-28 12:32:27 sandervl Exp $ */ 3 2 LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT 4 3 … … 198 197 199 198 200 /* NOTE: Please, do not translate the PRINT32 dialog box yet! */201 199 PRINT32 DIALOG LOADONCALL MOVEABLE DISCARDABLE 32, 32, 288, 186 202 200 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | … … 239 237 } 240 238 241 242 IDD_OPENDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 159 239 PRINT32_SETUP DIALOG LOADONCALL MOVEABLE DISCARDABLE 32, 32, 288, 178 240 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | 241 DS_CONTEXTHELP | DS_3DLOOK 242 CAPTION "Print32 Setup" 243 FONT 8, "Helv" 244 BEGIN 245 DEFPUSHBUTTON "OK",IDOK,180,156,48,14,WS_GROUP 246 PUSHBUTTON "Cancel",IDCANCEL,232,156,48,14 247 /* PUSHBUTTON "Network...", psh5, 284,156,48,14 */ 248 249 GROUPBOX "Printer", grp4, 8, 4, 272,84, WS_GROUP 250 PUSHBUTTON "&Properties", psh2, 212, 17, 60,14, WS_GROUP 251 LTEXT "&Name:", stc6, 16, 20, 36,8 252 COMBOBOX cmb1, 52, 18, 152,152,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP 253 LTEXT "Status:", stc8, 16, 36, 36,10, SS_NOPREFIX 254 LTEXT "Dummy State", stc12, 52, 36, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP 255 LTEXT "Type:", stc7, 16, 48, 36,10, SS_NOPREFIX 256 LTEXT "Dummy Type", stc11, 52, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP 257 LTEXT "Where:", stc10, 16, 60, 36,10, SS_NOPREFIX 258 LTEXT "Dummy Location", stc14, 52, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP 259 LTEXT "Comment:", stc9, 16, 72, 36,10, SS_NOPREFIX 260 LTEXT "Dummy Remark", stc13, 52, 72, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP 261 262 GROUPBOX "Paper", grp2, 8, 92, 164,56, WS_GROUP 263 LTEXT "Si&ze:", stc2, 16,108, 36, 8 264 COMBOBOX cmb2, 52,106, 112,112,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP 265 LTEXT "&Source:", stc3, 16,128, 36, 8 266 COMBOBOX cmb3, 52,126, 112,112,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP 267 268 GROUPBOX "Orientation", grp1, 180, 92, 100,56, WS_GROUP 269 ICON "", ico1, 195,112, 18,20, WS_GROUP 270 CONTROL "P&ortrait", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP |WS_TABSTOP,224,106,52,12 271 CONTROL "L&andscape", rad2,"Button",BS_AUTORADIOBUTTON,224,126,52,12 272 END 273 274 275 NEWFILEOPENORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 164 243 276 STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU 244 277 CAPTION "Open" 245 278 FONT 8, "helv" 246 279 { 247 DEFPUSHBUTTON "&Open", IDOK,219,111,50,14 248 PUSHBUTTON "Cancel", IDCANCEL,219,128,50,14 249 250 CONTROL "Open as &read-only",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,109,9 251 COMBOBOX IDC_FILETYPE,54,128,157,102,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP 252 EDITTEXT IDC_FILENAME,54,110,158,15,ES_AUTOHSCROLL 253 LTEXT "File &name:",IDC_FILENAMESTATIC,3,111,36,10 254 LTEXT "Files of &type",IDC_FILETYPESTATIC,3,128,41,10 255 LTEXT "", IDC_SHELLSTATIC,3,21,273,84,SS_SUNKEN | NOT WS_VISIBLE | NOT WS_GROUP |WS_EX_TRANSPARENT 256 LTEXT "Look &in",IDC_LOOKINSTATIC,3,5,29,10 257 COMBOBOX IDC_LOOKIN,50,1,137,93,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP 258 PUSHBUTTON "Up",IDC_UPFOLDER,194,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER 259 PUSHBUTTON "New",IDC_NEWFOLDER,213,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER 260 CONTROL "I",IDC_LIST,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_CENTER | BS_VCENTER | BS_PUSHLIKE,233,1,15,15 261 CONTROL "L",IDC_DETAILS,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_CENTER | BS_VCENTER | BS_PUSHLIKE,249,1,15,15 262 263 } 264 265 IDD_SAVEDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 280, 159 266 STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU 267 CAPTION "Save As" 268 FONT 8, "helv" 269 { 270 DEFPUSHBUTTON "&Save", IDOK,219,111,50,14 271 PUSHBUTTON "Cancel", IDCANCEL,219,128,50,14 272 273 CONTROL "Open as &read-only",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,109,9 274 COMBOBOX IDC_FILETYPE,54,128,157,102,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP 275 EDITTEXT IDC_FILENAME,54,110,158,15,ES_AUTOHSCROLL 276 LTEXT "File &name:",IDC_FILENAMESTATIC,3,111,36,10 277 LTEXT "Save as &type",IDC_FILETYPESTATIC,3,128,41,10 278 LTEXT "", IDC_SHELLSTATIC,3,21,273,84,SS_SUNKEN | NOT WS_VISIBLE | NOT WS_GROUP |WS_EX_TRANSPARENT 279 LTEXT "Save &in",IDC_LOOKINSTATIC,3,5,29,10 280 COMBOBOX IDC_LOOKIN,50,1,137,93,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP 281 PUSHBUTTON "Up",IDC_UPFOLDER,194,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER 282 PUSHBUTTON "New",IDC_NEWFOLDER,213,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER 283 CONTROL "I",IDC_LIST,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_CENTER | BS_VCENTER | BS_PUSHLIKE,233,1,15,15 284 CONTROL "L",IDC_DETAILS,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_CENTER | BS_VCENTER | BS_PUSHLIKE,249,1,15,15 285 286 } 280 LTEXT "Look &in",IDC_LOOKINSTATIC,7,6,41,8, SS_NOTIFY 281 COMBOBOX IDC_LOOKIN,50,3,138,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP 282 283 LTEXT "" , IDC_TOOLBARSTATIC, 188, 2, 82, 17, NOT WS_GROUP | NOT WS_VISIBLE 284 LISTBOX IDC_SHELLSTATIC,4,20,272,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE 285 286 LTEXT "File &name:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY 287 EDITTEXT IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL 288 289 LTEXT "Files of &type",IDC_FILETYPESTATIC,5,128,42,8, SS_NOTIFY 290 COMBOBOX IDC_FILETYPE,54,126,155,53,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP 291 292 CONTROL "Open as &read-only",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,54,145,100,10 293 294 DEFPUSHBUTTON "&Open", IDOK,222,110,50,14 295 PUSHBUTTON "Cancel", IDCANCEL,222,128,50,14 296 PUSHBUTTON "&Help", pshHelp,222,145,50,14 297 } 298 287 299 STRINGTABLE DISCARDABLE 288 300 { … … 307 319 308 320 309 /******************310 * Bitmap311 */312 313 IDB_TOOLBAR BITMAP DISCARDABLE314 {'315 42 4d b6 02 00 00 00 00 00 00 76 00 00 00 28 00316 00 00 41 00 00 00 10 00 00 00 01 00 04 00 00 00317 00 00 40 02 00 00 00 00 00 00 00 00 00 00 00 00318 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80319 00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80320 00 00 c0 c0 c0 00 80 80 80 00 00 00 ff 00 00 ff321 00 00 00 ff ff 00 ff 00 00 00 ff 00 ff 00 ff ff322 00 00 ff ff ff 00 aa aa aa aa aa aa aa aa aa aa323 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa324 aa aa aa aa aa aa a3 00 b6 01 aa aa aa 88 88 8a325 aa aa 00 00 00 00 00 0a aa aa 44 4a aa aa aa aa326 aa aa 88 80 00 0f 00 0f 00 0f ab 00 db 02 aa aa327 a0 00 00 8a aa aa 0b bb bb bb bb 0a aa aa 4f 4a328 00 0a aa aa aa aa f7 8f ff ff ff ff ff ff a9 02329 2a 02 aa aa a0 77 70 8a aa aa 0b bb bb bb bb 9a330 aa aa 44 aa aa aa aa aa aa aa f7 80 00 0f 00 0f331 00 0f a2 00 02 00 aa aa a0 77 70 8a aa aa 0b bb332 bb bb bb 9a aa aa aa aa aa aa aa aa aa aa f7 8f333 ff ff ff ff ff ff a4 f8 15 00 aa aa a0 77 70 8a334 aa aa 0b bb bb b9 bb 9a a9 aa aa aa aa aa aa aa335 aa aa f7 80 00 0f 00 0f 00 0f a2 00 02 00 aa aa336 a0 77 70 8a aa aa 0b bb bb bb 9b 9a 9a aa 44 4a337 aa aa 44 4a aa aa f7 8f ff ff ff ff ff ff a0 00338 ad 00 aa aa a0 77 70 8a aa aa 0b bb bb bb b9 99339 aa aa 4f 4a 00 0a 4f 4a 00 0a f7 80 00 0f 00 0f340 00 0f a1 00 b5 00 aa aa a0 77 70 88 8a aa 00 00341 00 99 99 99 99 9a 44 aa aa aa 44 aa aa aa f7 8f342 ff ff ff ff ff ff ad 01 0b 02 aa 00 00 77 70 00343 0a aa a0 bb bb 0a a9 99 aa aa aa aa aa aa aa aa344 aa aa f7 80 00 0f 00 0f 00 0f a9 01 5d 01 aa a0345 f7 77 77 70 aa aa aa 00 00 aa 9a 9a 9a aa aa aa346 aa aa aa aa aa aa f7 8f ff ff ff ff ff ff a0 01347 63 01 aa aa 0f 77 77 0a aa aa aa aa aa a9 aa 9a348 a9 aa 44 4a aa aa 44 4a aa aa 88 88 88 88 88 88349 88 88 ab 01 0f 01 aa aa a0 f7 70 aa aa aa aa aa350 aa aa aa 9a aa aa 4f 4a 00 0a 4f 4a 00 0a f7 8f351 77 78 f7 78 f7 78 a8 01 7d 01 aa aa aa 0f 0a aa352 aa aa aa aa aa aa aa 9a aa aa 44 aa aa aa 44 aa353 aa aa f7 8f 77 78 f7 78 f7 78 ae 01 62 02 aa aa354 aa a0 aa aa aa aa aa aa aa aa aa 9a aa aa aa aa355 aa aa aa aa aa aa ff ff ff ff ff ff ff f7 a2 01356 b9 01 aa aa aa aa aa aa aa aa aa aa aa aa aa aa357 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa358 aa aa a2 00 43 02'}359 360 361 362 363 364 /* NOTE: Please, do not translate these texts yet! */365 321 STRINGTABLE DISCARDABLE 366 322 { 367 PD32_PRINT_ALL_X_PAGES "&All %d pages"368 323 PD32_PRINT_TITLE "Print" 324 325 PD32_VALUE_UREADABLE "Unreadable Entry" 369 326 PD32_INVALID_PAGE_RANGE "This value lies not within Page range\n\ 370 327 Please enter a value between %d and %d" 371 PRINTER_STATUS_PAUSED "Paused" 372 PRINTER_STATUS_ERROR "Error" 373 PRINTER_STATUS_PENDING_DELETION "Pending deletion" 374 PRINTER_STATUS_PAPER_JAM "Paper jam" 375 PRINTER_STATUS_PAPER_OUT "Out of paper" 376 PRINTER_STATUS_MANUAL_FEED "Feed paper manual" 377 PRINTER_STATUS_PAPER_PROBLEM "Paper problem" 378 PRINTER_STATUS_OFFLINE "Printer offline" 379 PRINTER_STATUS_IO_ACTIVE "I/O Active" 380 PRINTER_STATUS_BUSY "Busy" 381 PRINTER_STATUS_PRINTING "Printing" 382 PRINTER_STATUS_OUTPUT_BIN_FULL "Output tray is full" 383 PRINTER_STATUS_NOT_AVAILABLE "Not available" 384 PRINTER_STATUS_WAITING "Waiting" 385 PRINTER_STATUS_PROCESSING "Processing" 386 PRINTER_STATUS_INITIALIZING "Initialising" 387 PRINTER_STATUS_WARMING_UP "Warming up" 388 PRINTER_STATUS_TONER_LOW "Toner low" 389 PRINTER_STATUS_NO_TONER "No toner" 390 PRINTER_STATUS_PAGE_PUNT "Page punt" 391 PRINTER_STATUS_USER_INTERVENTION "User intervention required" 392 PRINTER_STATUS_OUT_OF_MEMORY "Out of memory" 393 PRINTER_STATUS_DOOR_OPEN "The printer door is open" 394 PRINTER_STATUS_SERVER_UNKNOWN "Print server unknown" 395 PRINTER_STATUS_POWER_SAVE "Power safe mode" 396 } 328 PD32_FROM_NOT_ABOVE_TO "The FROM entry cannot exceed TO:" 329 PD32_MARGINS_OVERLAP "Margins overlap or fall outside \ 330 Paper boundaries.\nPlease reenter margins" 331 PD32_NR_OF_COPIES_EMPTY "The NumberOfCopies entry cannot \ 332 be empty" 333 PD32_TOO_LARGE_COPIES "This large amount of prints is not \ 334 supported by your printer.\nPlease enter a value between 1 and %d" 335 PD32_PRINT_ERROR "A printer error occurred" 336 PD32_NO_DEFAULT_PRINTER "There is not default printer" 337 PD32_CANT_FIND_PRINTER "Cannot find the printer" 338 PD32_OUT_OF_MEMORY "Out of memory" 339 PD32_GENERIC_ERROR "Some error occurred" 340 PD32_DRIVER_UNKNOWN "Unknown printer driver" 341 342 PD32_DEFAULT_PRINTER "Default Printer; " 343 PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in queue" 344 PD32_PRINT_ALL_X_PAGES "&All %d pages" 345 PD32_MARGINS_IN_INCHES "Margins [inches]" 346 PD32_MARGINS_IN_MILIMETERS "Margins [mm]" 347 PD32_MILIMETERS "mm" 348 349 PD32_PRINTER_STATUS_READY "Ready" 350 PD32_PRINTER_STATUS_PAUSED "Paused; " 351 PD32_PRINTER_STATUS_ERROR "Error; " 352 PD32_PRINTER_STATUS_PENDING_DELETION "Pending deletion; " 353 PD32_PRINTER_STATUS_PAPER_JAM "Paper jam; " 354 PD32_PRINTER_STATUS_PAPER_OUT "Out of paper; " 355 PD32_PRINTER_STATUS_MANUAL_FEED "Feed paper manual; " 356 PD32_PRINTER_STATUS_PAPER_PROBLEM "Paper problem; " 357 PD32_PRINTER_STATUS_OFFLINE "Printer offline; " 358 PD32_PRINTER_STATUS_IO_ACTIVE "I/O Active; " 359 PD32_PRINTER_STATUS_BUSY "Busy; " 360 PD32_PRINTER_STATUS_PRINTING "Printing; " 361 PD32_PRINTER_STATUS_OUTPUT_BIN_FULL "Output tray is full; " 362 PD32_PRINTER_STATUS_NOT_AVAILABLE "Not available; " 363 PD32_PRINTER_STATUS_WAITING "Waiting; " 364 PD32_PRINTER_STATUS_PROCESSING "Processing; " 365 PD32_PRINTER_STATUS_INITIALIZING "Initialising; " 366 PD32_PRINTER_STATUS_WARMING_UP "Warming up; " 367 PD32_PRINTER_STATUS_TONER_LOW "Toner low; " 368 PD32_PRINTER_STATUS_NO_TONER "No toner; " 369 PD32_PRINTER_STATUS_PAGE_PUNT "Page punt; " 370 PD32_PRINTER_STATUS_USER_INTERVENTION "Interrupted by user; " 371 PD32_PRINTER_STATUS_OUT_OF_MEMORY "Out of memory; " 372 PD32_PRINTER_STATUS_DOOR_OPEN "The printer door is open; " 373 PD32_PRINTER_STATUS_SERVER_UNKNOWN "Print server unknown; " 374 PD32_PRINTER_STATUS_POWER_SAVE "Power safe mode; " 375 } -
trunk/src/comdlg32/cdlg_xx.rc
r1548 r1864 1 /* $Id: cdlg_xx.rc,v 1. 1 1999-11-02 19:09:41sandervl Exp $ */1 /* $Id: cdlg_xx.rc,v 1.2 1999-11-28 12:32:27 sandervl Exp $ */ 2 2 /* 3 3 * Language neutral resources for Common Dialogs 4 * (990815)5 4 */ 6 5 … … 40 39 } 41 40 41 /* BINRES pd32_collate.ico */ 42 42 PD32_COLLATE ICON DISCARDABLE LOADONCALL 43 43 { … … 178 178 } 179 179 180 181 182 /* BINRES pd32_nocollate.ico */ 180 183 PD32_NOCOLLATE ICON 181 184 { -
trunk/src/comdlg32/filedlg95.cpp
r1721 r1864 1 /* $Id: filedlg95.cpp,v 1. 4 1999-11-13 15:41:44sandervl Exp $ */1 /* $Id: filedlg95.cpp,v 1.5 1999-11-28 12:32:27 sandervl Exp $ */ 2 2 /* 3 3 * COMMDLG - File Open Dialogs Win95 look and feel 4 4 * 5 5 */ 6 #ifdef __WIN32OS2__ 7 #include <os2win.h> 8 #include <heapstring.h> 9 // ><DJR 17.05.99 Force to use C-interfaces for now to prevent CALLBACK definition compiler error 10 #define CINTERFACE 1 11 12 #define MapHModuleSL(a) a 13 #define MapHModuleLS(a) a 14 15 #endif 6 16 #include <ctype.h> 7 17 #include <stdlib.h> 8 18 #include <string.h> 9 #ifdef __WIN32OS2__10 // ><DJR 17.05.99 Force to use C-interfaces for now to prevent CALLBACK definition compiler error11 #define CINTERFACE 112 #include <os2win.h>13 #else14 19 #include "winbase.h" 15 #include "tweak.h"16 #endif17 20 #include "ldt.h" 18 21 #include "heap.h" … … 22 25 #include "debugtools.h" 23 26 #include "cderr.h" 27 #include "tweak.h" 24 28 #include "winnls.h" 25 29 #include "shellapi.h" … … 28 32 #include "wine/obj_contextmenu.h" 29 33 30 #ifdef __WIN32OS2__31 #include <heapstring.h>32 33 #define MapHModuleSL(a) a34 #define MapHModuleLS(a) a35 #endif36 37 34 DEFAULT_DEBUG_CHANNEL(commdlg) 38 39 35 40 36 /*********************************************************************** … … 46 42 HIMAGELIST hImgList; 47 43 int m_iIndent; /* Indentation index */ 48 LPITEMIDLIST pidlItem; /* absolute pidl of the item */ 44 LPITEMIDLIST pidlItem; /* absolute pidl of the item */ 49 45 50 46 } SFOLDER,*LPSFOLDER; … … 164 160 165 161 /* Shell memory allocation */ 166 char*MemAlloc(UINT size);162 void *MemAlloc(UINT size); 167 163 void MemFree(void *mem); 168 164 169 BOOL WINAPI GetOpenFileName95(FileOpenDlgInfos *fodInfos); 170 BOOL WINAPI GetSaveFileName95(FileOpenDlgInfos *fodInfos); 165 BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos); 171 166 HRESULT WINAPI FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 172 173 /*********************************************************************** 174 * GetOpenFileName95 175 * 176 * Creates an Open common dialog box that lets the user select 167 HRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode); 168 HRESULT FILEDLG95_HandleCustomDialogMessages(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 169 170 /*********************************************************************** 171 * GetFileName95 172 * 173 * Creates an Open common dialog box that lets the user select 177 174 * the drive, directory, and the name of a file or set of files to open. 178 175 * … … 181 178 * FALSE on cancel, error, close or filename-does-not-fit-in-buffer. 182 179 */ 183 BOOL WINAPI Get OpenFileName95(FileOpenDlgInfos *fodInfos)180 BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos) 184 181 { 185 182 186 183 LRESULT lRes; 187 LPCVOID templateDlg;184 LPCVOID lpTemplate; 188 185 HRSRC hRes; 189 186 HANDLE hDlgTmpl = 0; … … 191 188 /* Create the dialog from a template */ 192 189 193 if(!(hRes = FindResourceA(COM DLG32_hInstance,MAKEINTRESOURCEA(IDD_OPENDIALOG),RT_DIALOGA)))190 if(!(hRes = FindResourceA(COMMDLG_hInstance32,MAKEINTRESOURCEA(NEWFILEOPENORD),RT_DIALOGA))) 194 191 { 195 192 COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); 196 193 return FALSE; 197 194 } 198 if (!(hDlgTmpl = LoadResource(COM DLG32_hInstance, hRes )) ||199 !( templateDlg= LockResource( hDlgTmpl )))195 if (!(hDlgTmpl = LoadResource(COMMDLG_hInstance32, hRes )) || 196 !(lpTemplate = LockResource( hDlgTmpl ))) 200 197 { 201 198 COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE); 202 199 return FALSE; 203 200 } 204 lRes = DialogBoxIndirectParamA(COM DLG32_hInstance,205 (LPDLGTEMPLATEA) templateDlg,201 lRes = DialogBoxIndirectParamA(COMMDLG_hInstance32, 202 (LPDLGTEMPLATEA) lpTemplate, 206 203 fodInfos->ofnInfos.hwndOwner, 207 204 (DLGPROC) FileOpenDlgProc95, … … 211 208 if( lRes == -1) 212 209 return FALSE; 213 210 214 211 return lRes; 215 212 } 216 213 217 214 /*********************************************************************** 218 * GetSaveFileName95219 *220 * Creates an Save as common dialog box that lets the user select221 * the drive, directory, and the name of a file or set of files to open.222 *223 * IN : The FileOpenDlgInfos structure associated with the dialog224 * OUT : TRUE on success225 * FALSE on cancel, error, close or filename-does-not-fit-in-buffer.226 */227 BOOL WINAPI GetSaveFileName95(FileOpenDlgInfos *fodInfos)228 {229 230 LRESULT lRes;231 LPCVOID templateDlg;232 HRSRC hRes;233 HANDLE hDlgTmpl = 0;234 235 /* Create the dialog from a template */236 237 if(!(hRes = FindResourceA(COMDLG32_hInstance,MAKEINTRESOURCEA(IDD_SAVEDIALOG),RT_DIALOGA)))238 {239 COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);240 return FALSE;241 }242 if (!(hDlgTmpl = LoadResource(COMDLG32_hInstance, hRes )) ||243 !(templateDlg = LockResource( hDlgTmpl )))244 {245 COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);246 return FALSE;247 }248 lRes = DialogBoxIndirectParamA(COMDLG32_hInstance,249 (LPDLGTEMPLATEA) templateDlg,250 fodInfos->ofnInfos.hwndOwner,251 (DLGPROC) FileOpenDlgProc95,252 (LPARAM) fodInfos);253 /* Unable to create the dialog*/254 if( lRes == -1)255 return FALSE;256 257 return lRes;258 }259 260 /***********************************************************************261 215 * GetFileDialog95A 262 216 * 263 217 * Copy the OPENFILENAMEA structure in a FileOpenDlgInfos structure. 264 * Call Get OpenFileName95 with this structure and clean the memory.218 * Call GetFileName95 with this structure and clean the memory. 265 219 * 266 220 * IN : The OPENFILENAMEA initialisation structure passed to … … 272 226 BOOL ret; 273 227 FileOpenDlgInfos *fodInfos; 274 275 /* Initialise FileOpenDlgInfos structure*/ 228 229 /* Initialise FileOpenDlgInfos structure*/ 276 230 fodInfos = (FileOpenDlgInfos*)MemAlloc(sizeof(FileOpenDlgInfos)); 277 231 memset(&fodInfos->ofnInfos,'\0',sizeof(*ofn)); fodInfos->ofnInfos.lStructSize = sizeof(*ofn); … … 300 254 s = s+strlen(s)+1; 301 255 s++; 302 x = MemAlloc(s-ofn->lpstrCustomFilter);256 x = (LPSTR)MemAlloc(s-ofn->lpstrCustomFilter); 303 257 memcpy(x,ofn->lpstrCustomFilter,s-ofn->lpstrCustomFilter); 304 258 fodInfos->ofnInfos.lpstrCustomFilter = (LPSTR)x; … … 333 287 if (ofn->lpstrDefExt) 334 288 { 335 fodInfos->ofnInfos.lpstrDefExt = MemAlloc(strlen(ofn->lpstrDefExt)+1);289 fodInfos->ofnInfos.lpstrDefExt = (LPSTR)MemAlloc(strlen(ofn->lpstrDefExt)+1); 336 290 strcpy((LPSTR)fodInfos->ofnInfos.lpstrDefExt,ofn->lpstrDefExt); 337 291 } … … 339 293 fodInfos->ofnInfos.lpfnHook = (LPOFNHOOKPROC)ofn->lpfnHook; 340 294 341 //SvL: Bugfix; can be resource id342 295 if (HIWORD(ofn->lpTemplateName)) 343 296 { 297 fodInfos->ofnInfos.lpTemplateName = (LPSTR)MemAlloc(strlen(ofn->lpTemplateName)+1); 298 strcpy ((LPSTR)fodInfos->ofnInfos.lpTemplateName, ofn->lpTemplateName); 299 } 300 else 301 { 302 /* resource id */ 344 303 fodInfos->ofnInfos.lpTemplateName = ofn->lpTemplateName; 345 304 } … … 348 307 if(!ofn->lpstrInitialDir) 349 308 { 350 fodInfos->ofnInfos.lpstrInitialDir = MemAlloc(MAX_PATH);309 fodInfos->ofnInfos.lpstrInitialDir = (LPSTR)MemAlloc(MAX_PATH); 351 310 GetCurrentDirectoryA(MAX_PATH,(LPSTR)fodInfos->ofnInfos.lpstrInitialDir); 352 311 } … … 354 313 /* Initialise the dialog property */ 355 314 fodInfos->DlgInfos.dwDlgProp = 0; 356 315 fodInfos->DlgInfos.hwndCustomDlg = (HWND)NULL; 316 357 317 switch(iDlgType) 358 318 { 359 319 case OPEN_DIALOG : 360 ret = Get OpenFileName95(fodInfos);320 ret = GetFileName95(fodInfos); 361 321 break; 362 322 case SAVE_DIALOG : 363 323 fodInfos->DlgInfos.dwDlgProp |= FODPROP_SAVEDLG; 364 ret = Get SaveFileName95(fodInfos);324 ret = GetFileName95(fodInfos); 365 325 break; 366 326 default : … … 370 330 ofn->nFileOffset = fodInfos->ofnInfos.nFileOffset; 371 331 ofn->nFileExtension = fodInfos->ofnInfos.nFileExtension; 332 333 /* 334 Transfer the combo index in the OPENFILENAME structure; 335 No support for custom filters, so nFilterIndex must be one-based. 336 */ 337 ofn->nFilterIndex = fodInfos->ofnInfos.nFilterIndex + 1; 338 372 339 if (fodInfos->ofnInfos.lpstrFilter) 373 340 MemFree((LPVOID)(fodInfos->ofnInfos.lpstrFilter)); 374 if ( fodInfos->ofnInfos.lpTemplateName)341 if (HIWORD(fodInfos->ofnInfos.lpTemplateName)) 375 342 MemFree((LPVOID)(fodInfos->ofnInfos.lpTemplateName)); 376 343 if (fodInfos->ofnInfos.lpstrDefExt) … … 383 350 MemFree((LPVOID)(fodInfos->ofnInfos.lpstrCustomFilter)); 384 351 385 if (fodInfos->ofnInfos.lpstrFile) 352 if (fodInfos->ofnInfos.lpstrFile) 386 353 { 387 354 strcpy(ofn->lpstrFile,fodInfos->ofnInfos.lpstrFile); 388 355 MemFree((LPVOID)fodInfos->ofnInfos.lpstrFile); 389 356 } 390 if (fodInfos->ofnInfos.lpstrFileTitle) 357 if (fodInfos->ofnInfos.lpstrFileTitle) 391 358 { 392 359 if (ofn->lpstrFileTitle) … … 404 371 * 405 372 * Copy the OPENFILENAMEW structure in a FileOpenDlgInfos structure. 406 * Call Get OpenFileName95 with this structure and clean the memory.373 * Call GetFileName95 with this structure and clean the memory. 407 374 * 408 375 * IN : The OPENFILENAMEW initialisation structure passed to … … 428 395 /* filter is a list... title\0ext\0......\0\0 */ 429 396 s = (LPWSTR)ofn->lpstrFilter; 430 397 431 398 while (*s) 432 399 s = s+lstrlenW(s)+1; … … 492 459 fodInfos->ofnInfos.lCustData = ofn->lCustData; 493 460 fodInfos->ofnInfos.lpfnHook = (LPOFNHOOKPROC)ofn->lpfnHook; 494 //SvL: Bugfix 461 495 462 if (HIWORD(ofn->lpTemplateName)) 496 { 463 { 497 464 fodInfos->ofnInfos.lpTemplateName = (LPSTR)MemAlloc(lstrlenW(ofn->lpTemplateName)+1); 498 465 lstrcpyWtoA((LPSTR)fodInfos->ofnInfos.lpTemplateName,(LPWSTR)ofn->lpTemplateName); 499 466 } 467 else 468 { 469 /* resource id */ 470 fodInfos->ofnInfos.lpTemplateName = (LPSTR)ofn->lpTemplateName; 471 } 500 472 /* Initialise the dialog property */ 501 473 fodInfos->DlgInfos.dwDlgProp = 0; 502 474 503 475 switch(iDlgType) 504 476 { 505 477 case OPEN_DIALOG : 506 ret = Get OpenFileName95(fodInfos);478 ret = GetFileName95(fodInfos); 507 479 break; 508 480 case SAVE_DIALOG : 509 481 fodInfos->DlgInfos.dwDlgProp |= FODPROP_SAVEDLG; 510 ret = Get SaveFileName95(fodInfos);482 ret = GetFileName95(fodInfos); 511 483 break; 512 484 default : 513 485 ret = 0; 514 486 } 515 487 516 488 /* Cleaning */ 517 489 ofn->nFileOffset = fodInfos->ofnInfos.nFileOffset; 518 490 ofn->nFileExtension = fodInfos->ofnInfos.nFileExtension; 491 492 /* 493 Transfer the combo index in the OPENFILENAME structure; 494 No support for custom filters, so nFilterIndex must be one-based. 495 */ 496 ofn->nFilterIndex = fodInfos->ofnInfos.nFilterIndex + 1; 497 519 498 if (fodInfos->ofnInfos.lpstrFilter) 520 499 MemFree((LPVOID)(fodInfos->ofnInfos.lpstrFilter)); 521 if ( fodInfos->ofnInfos.lpTemplateName)500 if (HIWORD(fodInfos->ofnInfos.lpTemplateName)) 522 501 MemFree((LPVOID)(fodInfos->ofnInfos.lpTemplateName)); 523 502 if (fodInfos->ofnInfos.lpstrDefExt) … … 549 528 { 550 529 551 552 RECT rectParent,rectChild,rectCtrl,rectStc32;553 554 555 556 557 558 559 560 561 562 563 RECT rectTemp;564 GetWindowRect(hwndStc32,&rectStc32);565 MapWindowPoints(0, hwndChildDlg,(LPPOINT)&rectStc32,2);566 CopyRect(&rectTemp,&rectStc32); 567 568 SetRect(&rectStc32,rectStc32.left,rectStc32.top,rectStc32.left + (rectParent.right-rectParent.left),rectStc32.top+(rectParent.bottom-rectParent.top));569 SetWindowPos(hwndStc32,0,rectStc32.left,rectStc32.top,rectStc32.right-rectStc32.left,rectStc32.bottom-rectStc32.top,SWP_NOMOVE|SWP_NOZORDER | SWP_NOACTIVATE); 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 530 HWND hwndChild,hwndStc32; 531 RECT rectParent, rectChild, rectCtrl, rectStc32, rectTemp; 532 POINT ptMoveCtl; 533 HDWP handle; 534 POINT ptParentClient; 535 536 ptMoveCtl.x = ptMoveCtl.y = 0; 537 hwndStc32=GetDlgItem(hwndChildDlg,stc32); 538 GetClientRect(hwndParentDlg,&rectParent); 539 GetClientRect(hwndChildDlg,&rectChild); 540 if(hwndStc32) 541 { 542 GetWindowRect(hwndStc32,&rectStc32); 543 MapWindowPoints(0, hwndChildDlg,(LPPOINT)&rectStc32,2); 544 CopyRect(&rectTemp,&rectStc32); 545 546 SetRect(&rectStc32,rectStc32.left,rectStc32.top,rectStc32.left + (rectParent.right-rectParent.left),rectStc32.top+(rectParent.bottom-rectParent.top)); 547 SetWindowPos(hwndStc32,0,rectStc32.left,rectStc32.top,rectStc32.right-rectStc32.left,rectStc32.bottom-rectStc32.top,SWP_NOMOVE|SWP_NOZORDER | SWP_NOACTIVATE); 548 549 if(rectStc32.right < rectTemp.right) 550 { 551 ptParentClient.x = max((rectParent.right-rectParent.left),(rectChild.right-rectChild.left)); 552 ptMoveCtl.x = 0; 553 } 554 else 555 { 556 ptMoveCtl.x = (rectStc32.right - rectTemp.right); 557 ptParentClient.x = max((rectParent.right-rectParent.left),((rectChild.right-rectChild.left)+rectStc32.right-rectTemp.right)); 558 } 559 if(rectStc32.bottom < rectTemp.bottom) 560 { 561 ptParentClient.y = max((rectParent.bottom-rectParent.top),(rectChild.bottom-rectChild.top)); 562 ptMoveCtl.y = 0; 563 } 564 else 565 { 566 ptMoveCtl.y = (rectStc32.bottom - rectTemp.bottom); 567 ptParentClient.y = max((rectParent.bottom-rectParent.top),((rectChild.bottom-rectChild.top)+rectStc32.bottom-rectTemp.bottom)); 568 } 569 } 570 else 571 { 572 if( (GetWindow(hwndChildDlg,GW_CHILD)) == (HWND) NULL) 594 573 return; 595 ptParentClient.x = rectParent.right-rectParent.left; 596 ptParentClient.y = (rectParent.bottom-rectParent.top) + (rectChild.bottom-rectChild.top); 597 ptMoveCtl.y = rectParent.bottom-rectParent.top; 598 ptMoveCtl.x=0; 599 } 600 SetRect(&rectParent,rectParent.left,rectParent.top,rectParent.left+ptParentClient.x,rectParent.top+ptParentClient.y); 601 AdjustWindowRectEx( &rectParent,GetWindowLongA(hwndParentDlg,GWL_STYLE),FALSE,GetWindowLongA(hwndParentDlg,GWL_EXSTYLE)); 602 603 SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x,ptParentClient.y, 604 SWP_NOZORDER ); 605 SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left), 606 (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER); 607 608 hwndChild = GetWindow(hwndChildDlg,GW_CHILD); 609 handle = BeginDeferWindowPos( 1 ); 610 if(hwndStc32) 611 { 612 GetWindowRect(hwndStc32,&rectStc32); 613 MapWindowPoints( 0, hwndChildDlg,(LPPOINT)&rectStc32,2); 614 } 615 else 616 SetRect(&rectStc32,0,0,0,0); 617 if (hwndChild && handle) 618 { 619 do 620 { 621 if(hwndChild != hwndStc32) 622 { 623 if (GetWindowLongA( hwndChild, GWL_STYLE ) & WS_MAXIMIZE) 624 continue; 625 GetWindowRect(hwndChild,&rectCtrl); 626 MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2); 627 if(rectCtrl.top > rectStc32.top) 628 { 629 630 if(ptMoveCtl.x > 0) 631 rectCtrl.left += ptMoveCtl.x; 632 rectCtrl.top += ptMoveCtl.y; 633 handle = DeferWindowPos(handle, hwndChild, 0, rectCtrl.left, rectCtrl.top, 634 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 635 SWP_NOSIZE | SWP_NOZORDER ); 636 } 637 } 638 } 639 while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL && handle); 640 } 641 if(handle) 642 EndDeferWindowPos( handle ); 643 handle = BeginDeferWindowPos( 1 ); 644 hwndChild = GetWindow(hwndParentDlg,GW_CHILD); 645 if(hwndStc32) 646 { 647 GetWindowRect(hwndStc32,&rectStc32); 648 MapWindowPoints( 0, hwndChildDlg,(LPPOINT)&rectStc32,2); 649 ptMoveCtl.x = rectStc32.left - 0; 650 ptMoveCtl.y = rectStc32.top - 0; 651 if (hwndChild && handle) 652 { 653 do 654 { 655 if(hwndChild != hwndChildDlg) 656 { 657 658 if (GetWindowLongA( hwndChild, GWL_STYLE ) & WS_MAXIMIZE) 659 continue; 660 GetWindowRect(hwndChild,&rectCtrl); 661 MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2); 662 663 rectCtrl.left += ptMoveCtl.x; 664 rectCtrl.top += ptMoveCtl.y; 665 666 handle = DeferWindowPos( handle, hwndChild, 0, rectCtrl.left, rectCtrl.top, 667 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 668 SWP_NOSIZE |SWP_NOZORDER ); 669 } 670 } 671 while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL); 672 } 673 if(handle) 674 EndDeferWindowPos( handle ); 675 } 574 ptParentClient.x = rectParent.right-rectParent.left; 575 ptParentClient.y = (rectParent.bottom-rectParent.top) + (rectChild.bottom-rectChild.top); 576 ptMoveCtl.y = rectParent.bottom-rectParent.top; 577 ptMoveCtl.x=0; 578 } 579 SetRect(&rectParent,rectParent.left,rectParent.top,rectParent.left+ptParentClient.x,rectParent.top+ptParentClient.y); 580 AdjustWindowRectEx( &rectParent,GetWindowLongA(hwndParentDlg,GWL_STYLE),FALSE,GetWindowLongA(hwndParentDlg,GWL_EXSTYLE)); 581 582 SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x,ptParentClient.y, 583 SWP_NOZORDER ); 584 SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left), 585 (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER); 586 587 hwndChild = GetWindow(hwndChildDlg,GW_CHILD); 588 handle = BeginDeferWindowPos( 1 ); 589 if(hwndStc32) 590 { 591 GetWindowRect(hwndStc32,&rectStc32); 592 MapWindowPoints( 0, hwndChildDlg,(LPPOINT)&rectStc32,2); 593 } 594 else 595 SetRect(&rectStc32,0,0,0,0); 596 597 if (hwndChild && handle) 598 { 599 do 600 { 601 if(hwndChild != hwndStc32) 602 { 603 if (GetWindowLongA( hwndChild, GWL_STYLE ) & WS_MAXIMIZE) 604 continue; 605 GetWindowRect(hwndChild,&rectCtrl); 606 MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2); 607 608 /* 609 Check the initial position of the controls relative to the initial 610 position and size of stc32 (before it is expanded). 611 */ 612 if (rectCtrl.left > rectTemp.right && rectCtrl.top > rectTemp.bottom) 613 { 614 rectCtrl.left += ptMoveCtl.x; 615 rectCtrl.top += ptMoveCtl.y; 616 } 617 else if (rectCtrl.left > rectTemp.right) 618 rectCtrl.left += ptMoveCtl.x; 619 else if (rectCtrl.top > rectTemp.bottom) 620 rectCtrl.top += ptMoveCtl.y; 621 622 handle = DeferWindowPos(handle, hwndChild, 0, rectCtrl.left, rectCtrl.top, 623 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 624 SWP_NOSIZE | SWP_NOZORDER ); 625 } 626 } 627 while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL && handle); 628 } 629 if(handle) 630 EndDeferWindowPos( handle ); 631 handle = BeginDeferWindowPos( 1 ); 632 hwndChild = GetWindow(hwndParentDlg,GW_CHILD); 633 634 if(hwndStc32) 635 { 636 GetWindowRect(hwndStc32,&rectStc32); 637 MapWindowPoints( 0, hwndChildDlg,(LPPOINT)&rectStc32,2); 638 ptMoveCtl.x = rectStc32.left - 0; 639 ptMoveCtl.y = rectStc32.top - 0; 640 if (hwndChild && handle) 641 { 642 do 643 { 644 if(hwndChild != hwndChildDlg) 645 { 646 647 if (GetWindowLongA( hwndChild, GWL_STYLE ) & WS_MAXIMIZE) 648 continue; 649 GetWindowRect(hwndChild,&rectCtrl); 650 MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2); 651 652 rectCtrl.left += ptMoveCtl.x; 653 rectCtrl.top += ptMoveCtl.y; 654 655 handle = DeferWindowPos( handle, hwndChild, 0, rectCtrl.left, rectCtrl.top, 656 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 657 SWP_NOSIZE |SWP_NOZORDER ); 658 } 659 } 660 while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL); 661 } 662 if(handle) 663 EndDeferWindowPos( handle ); 664 } 676 665 677 666 } … … 683 672 switch(uMsg) 684 673 { 685 686 { 687 688 674 case WM_INITDIALOG: 675 { 676 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *)lParam; 677 procUserHook=NULL; 689 678 lParam = (LPARAM) &fodInfos->ofnInfos; 690 679 ArrangeCtrlPositions(hwnd,GetParent(hwnd)); 691 680 if(fodInfos->ofnInfos.Flags & OFN_ENABLEHOOK) 692 693 694 695 return 0; 696 681 procUserHook = (WNDPROC) fodInfos->ofnInfos.lpfnHook; 682 if(procUserHook) 683 return CallWindowProcA(procUserHook,hwnd,uMsg,wParam,lParam); 684 return 0; 685 } } 697 686 if(procUserHook) 698 return CallWindowProcA(procUserHook,hwnd,uMsg,wParam,lParam); 699 return DefWindowProcA(hwnd,uMsg,wParam,lParam); 687 return CallWindowProcA(procUserHook,hwnd,uMsg,wParam,lParam); 688 return DefWindowProcA(hwnd,uMsg,wParam,lParam); 700 689 } 701 690 702 691 HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos,HWND hwnd) 703 692 { 704 LPCVOID templateDlg;693 LPCVOID lpTemplate; 705 694 HRSRC hRes; 706 695 HANDLE hDlgTmpl = 0; … … 708 697 if (fodInfos->ofnInfos.Flags & OFN_ENABLETEMPLATE || fodInfos->ofnInfos.Flags & OFN_ENABLETEMPLATEHANDLE) 709 698 { 710 711 712 if( !( templateDlg= LockResource( fodInfos->ofnInfos.hInstance)))713 714 715 716 717 718 719 720 721 699 if (fodInfos->ofnInfos.Flags & OFN_ENABLETEMPLATEHANDLE) 700 { 701 if( !(lpTemplate = LockResource( fodInfos->ofnInfos.hInstance))) 702 { 703 COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE); 704 return (HWND)NULL; 705 } 706 707 } 708 else 709 { 710 if (!(hRes = FindResourceA(MapHModuleSL(fodInfos->ofnInfos.hInstance), 722 711 (fodInfos->ofnInfos.lpTemplateName), RT_DIALOGA))) 723 724 725 726 727 712 { 713 COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); 714 return (HWND)NULL; 715 } 716 if (!(hDlgTmpl = LoadResource( MapHModuleSL(fodInfos->ofnInfos.hInstance), 728 717 hRes )) || 729 !( templateDlg= LockResource( hDlgTmpl )))730 731 732 733 734 735 736 hChildDlg= CreateDialogIndirectParamA(fodInfos->ofnInfos.hInstance,(LPCDLGTEMPLATEA)templateDlg,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos);737 738 739 ShowWindow(hChildDlg,SW_SHOW);740 741 718 !(lpTemplate = LockResource( hDlgTmpl ))) 719 { 720 COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE); 721 return (HWND)NULL; 722 } 723 } 724 725 hChildDlg= CreateDialogIndirectParamA(fodInfos->ofnInfos.hInstance,(LPCDLGTEMPLATEA)lpTemplate,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos); 726 if(hChildDlg) 727 { 728 ShowWindow(hChildDlg,SW_SHOW); 729 return hChildDlg; 730 } 742 731 } 743 732 else if(fodInfos->ofnInfos.Flags & OFN_ENABLEHOOK && fodInfos->ofnInfos.lpfnHook) 744 733 { 745 746 747 748 749 750 751 752 753 754 755 756 734 RECT rectHwnd; 735 DLGTEMPLATE tmplate; 736 GetClientRect(hwnd,&rectHwnd); 737 tmplate.style = WS_CHILD | WS_CLIPSIBLINGS; 738 tmplate.dwExtendedStyle = 0; 739 tmplate.cdit = 0; 740 tmplate.x = 0; 741 tmplate.y = 0; 742 tmplate.cx = rectHwnd.right-rectHwnd.left; 743 tmplate.cy = rectHwnd.bottom-rectHwnd.top; 744 745 return CreateDialogIndirectParamA(fodInfos->ofnInfos.hInstance,&tmplate,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos); 757 746 } 758 747 return (HWND)NULL; … … 760 749 761 750 /*********************************************************************** 751 * SendCustomDlgNotificationMessage 752 * 753 * Send CustomDialogNotification (CDN_FIRST -- CDN_LAST) message to the custom template dialog 754 */ 755 756 HRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) 757 { 758 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwndParentDlg,FileOpenDlgInfosStr); 759 if(!fodInfos) 760 return 0; 761 if(fodInfos->DlgInfos.hwndCustomDlg) 762 { 763 OFNOTIFYA ofnNotify; 764 ofnNotify.hdr.hwndFrom=hwndParentDlg; 765 ofnNotify.hdr.idFrom=0; 766 ofnNotify.hdr.code = uCode; 767 ofnNotify.lpOFN = &fodInfos->ofnInfos; 768 return SendMessageA(fodInfos->DlgInfos.hwndCustomDlg,WM_NOTIFY,0,(LPARAM)&ofnNotify); 769 } 770 return TRUE; 771 } 772 773 /*********************************************************************** 774 * FILEDLG95_HandleCustomDialogMessages 775 * 776 * Handle Custom Dialog Messages (CDM_FIRST -- CDM_LAST) messages 777 */ 778 HRESULT FILEDLG95_HandleCustomDialogMessages(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 779 { 780 LPSTR lpstrFileSpec; 781 char lpstrCurrentDir[MAX_PATH]=""; 782 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); 783 if(!fodInfos) 784 return TRUE; 785 switch(uMsg) 786 { 787 case CDM_GETFILEPATH: 788 { 789 char lpstrPathSpec[MAX_PATH]=""; 790 GetDlgItemTextA(hwnd,IDC_FILENAME,(LPSTR)lParam, (int)wParam); 791 lpstrFileSpec = (LPSTR)COMDLG32_PathFindFilenameA((LPSTR)lParam); 792 strcpy(lpstrPathSpec,(LPSTR)lParam); 793 COMDLG32_PathRemoveFileSpecA(lpstrPathSpec); 794 if(!lpstrPathSpec[0]) 795 COMDLG32_SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent, 796 lpstrPathSpec); 797 strcat(lpstrPathSpec,"\\"); 798 strcat(lpstrPathSpec,(LPSTR)lParam); 799 strcpy((LPSTR)lParam,(LPSTR)lpstrPathSpec); 800 } 801 return TRUE; 802 case CDM_GETFOLDERPATH: 803 if(lParam) 804 { 805 if(fodInfos) 806 { 807 COMDLG32_SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent, 808 lpstrCurrentDir); 809 strncpy((LPSTR)lParam,lpstrCurrentDir,(int)wParam); 810 } 811 else 812 *((LPSTR)lParam)=0; 813 } 814 return TRUE; 815 case CDM_GETSPEC: 816 if(lParam) 817 { 818 GetDlgItemTextA(hwnd,IDC_FILENAME,(LPSTR)lParam, (int)wParam); 819 lpstrFileSpec = (LPSTR)COMDLG32_PathFindFilenameA((LPSTR)lParam); 820 if(lpstrFileSpec) 821 strcpy((LPSTR)lParam, lpstrFileSpec); 822 else 823 *((LPSTR)lParam)=0; 824 } 825 return TRUE; 826 case CDM_HIDECONTROL: 827 case CDM_SETCONTROLTEXT: 828 case CDM_SETDEFEXT: 829 FIXME("CDM_HIDECONTROL,CDM_SETCONTROLTEXT,CDM_SETDEFEXT not implemented\n"); 830 return TRUE; 831 } 832 return TRUE; 833 } 834 835 /*********************************************************************** 762 836 * FileOpenDlgProc95 763 837 * … … 766 840 HRESULT WINAPI FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 767 841 { 768 769 842 switch(uMsg) 770 843 { 771 844 case WM_INITDIALOG : 772 CreateTemplateDialog((FileOpenDlgInfos *)lParam,hwnd); 773 return FILEDLG95_OnWMInitDialog(hwnd, wParam, lParam); 845 846 /* Adds the FileOpenDlgInfos in the property list of the dialog 847 so it will be easily accessible through a GetPropA(...) */ 848 SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) lParam); 849 850 ((FileOpenDlgInfos *)lParam)->DlgInfos.hwndCustomDlg = 851 CreateTemplateDialog((FileOpenDlgInfos *)lParam,hwnd); 852 FILEDLG95_OnWMInitDialog(hwnd, wParam, lParam); 853 SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE); 854 return 0; 774 855 case WM_COMMAND: 775 856 return FILEDLG95_OnWMCommand(hwnd, wParam, lParam); … … 784 865 } 785 866 return FALSE; 786 867 787 868 case WM_GETISHELLBROWSER: 788 869 return FILEDLG95_OnWMGetIShellBrowser(hwnd); … … 792 873 793 874 default : 875 if(uMsg >= CDM_FIRST && uMsg <= CDM_LAST) 876 return FILEDLG95_HandleCustomDialogMessages(hwnd, uMsg, wParam, lParam); 794 877 return FALSE; 795 878 } … … 808 891 TRACE("\n"); 809 892 810 /* Adds the FileOpenDlgInfos in the property list of the dialog 811 so it will be easily accessible through a GetPropA(...) */ 812 SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos); 813 893 /* Make sure the common control DLL is loaded */ 814 894 #ifndef __WIN32OS2__ 815 /* Make sure the common control DLL is loaded */816 895 InitCommonControls(); 817 896 #endif … … 875 954 /* OK button */ 876 955 case IDOK: 877 FILEDLG95_OnOpen(hwnd); 956 if(FILEDLG95_OnOpen(hwnd)) 957 SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK); 878 958 break; 879 959 /* Cancel button */ … … 885 965 case IDC_FILETYPE: 886 966 FILEDLG95_FILETYPE_OnCommand(hwnd,wNotifyCode); 967 SendCustomDlgNotificationMessage(hwnd,CDN_TYPECHANGE); 887 968 break; 888 969 /* LookIn combo box */ … … 890 971 FILEDLG95_LOOKIN_OnCommand(hwnd,wNotifyCode); 891 972 break; 973 974 /* --- toolbar --- */ 892 975 /* Up folder button */ 893 case IDC_UPFOLDER:976 case FCIDM_TB_UPFOLDER: 894 977 FILEDLG95_SHELL_UpFolder(hwnd); 895 978 break; 979 /* New folder button */ 980 case FCIDM_TB_NEWFOLDER: 981 FILEDLG95_SHELL_NewFolder(hwnd); 982 break; 896 983 /* List option button */ 897 case IDC_LIST:984 case FCIDM_TB_SMALLICON: 898 985 FILEDLG95_SHELL_ExecuteCommand(hwnd,CMDSTR_VIEWLIST); 899 986 break; 900 987 /* Details option button */ 901 case IDC_DETAILS:988 case FCIDM_TB_REPORTVIEW: 902 989 FILEDLG95_SHELL_ExecuteCommand(hwnd,CMDSTR_VIEWDETAILS); 903 990 break; 904 /* New folder button */905 case IDC_NEWFOLDER:906 FILEDLG95_SHELL_NewFolder(hwnd);907 break;908 991 909 992 case IDC_FILENAME: … … 913 996 /* Do not use the listview selection anymore */ 914 997 fodInfos->DlgInfos.dwDlgProp &= ~FODPROP_USEVIEW; 915 return 0; 998 return 0; 916 999 } 917 1000 … … 930 1013 SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser); 931 1014 932 return TRUE; 1015 return TRUE; 933 1016 } 934 1017 … … 940 1023 static LRESULT FILEDLG95_InitUI(HWND hwnd) 941 1024 { 942 HIMAGELIST himlToolbar; 943 HICON hicon; 1025 TBBUTTON tbb[] = 1026 {{VIEW_PARENTFOLDER, FCIDM_TB_UPFOLDER, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, 1027 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0, 0}, 0, 0 }, 1028 {VIEW_NEWFOLDER, FCIDM_TB_NEWFOLDER, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, 1029 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0, 0}, 0, 0 }, 1030 {VIEW_LIST, FCIDM_TB_SMALLICON, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, 1031 {VIEW_DETAILS, FCIDM_TB_REPORTVIEW, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0, 0}, 0, 0 }, 1032 }; 1033 TBADDBITMAP tba = { HINST_COMMCTRL, IDB_VIEW_SMALL_COLOR }; 1034 RECT rectTB; 1035 944 1036 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); 945 1037 … … 951 1043 fodInfos->DlgInfos.hwndLookInCB = GetDlgItem(hwnd,IDC_LOOKIN); 952 1044 953 ShowWindow(GetDlgItem(hwnd,IDC_SHELLSTATIC),SW_HIDE); 954 /* Load the icons bitmaps */ 955 956 if((himlToolbar = COMDLG32_ImageList_LoadImageA(COMDLG32_hInstance, 957 MAKEINTRESOURCEA(IDB_TOOLBAR), 958 0, 959 1, 960 CLR_DEFAULT, 961 IMAGE_BITMAP, 962 0))) 963 { 964 /* Up folder icon */ 965 if((hicon = COMDLG32_ImageList_GetIcon(himlToolbar,0,ILD_NORMAL))) 966 SendDlgItemMessageA(hwnd,IDC_UPFOLDER,BM_SETIMAGE,(WPARAM)IMAGE_ICON,(LPARAM)hicon); 967 /* New folder icon */ 968 if((hicon = COMDLG32_ImageList_GetIcon(himlToolbar,1,ILD_NORMAL))) 969 SendDlgItemMessageA(hwnd,IDC_NEWFOLDER,BM_SETIMAGE,(WPARAM)IMAGE_ICON,(LPARAM)hicon); 970 /* List view icon */ 971 if((hicon = COMDLG32_ImageList_GetIcon(himlToolbar,2,ILD_NORMAL))) 972 SendDlgItemMessageA(hwnd,IDC_LIST,BM_SETIMAGE,(WPARAM)IMAGE_ICON,(LPARAM)hicon); 973 /* Detail view icon */ 974 if((hicon = COMDLG32_ImageList_GetIcon(himlToolbar,3,ILD_NORMAL))) 975 SendDlgItemMessageA(hwnd,IDC_DETAILS,BM_SETIMAGE,(WPARAM)IMAGE_ICON,(LPARAM)hicon); 976 /* Cleanup */ 977 COMDLG32_ImageList_Destroy(himlToolbar); 978 } 979 980 1045 /* construct the toolbar */ 1046 GetWindowRect(GetDlgItem(hwnd,IDC_TOOLBARSTATIC),&rectTB); 1047 MapWindowPoints( 0, hwnd,(LPPOINT)&rectTB,2); 1048 1049 fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL, 1050 WS_CHILD | WS_GROUP | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE, 1051 0, 0, 150, 26, 1052 hwnd, (HMENU) IDC_TOOLBAR, COMMDLG_hInstance32, NULL); 1053 1054 SetWindowPos(fodInfos->DlgInfos.hwndTB, 0, 1055 rectTB.left,rectTB.top, rectTB.right-rectTB.left, rectTB.bottom-rectTB.top, 1056 SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER ); 1057 1058 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0); 1059 1060 /* fixme: use TB_LOADIMAGES when implemented */ 1061 /* SendMessageA(fodInfos->DlgInfos.hwndTB, TB_LOADIMAGES, (WPARAM) IDB_VIEW_SMALL_COLOR, HINST_COMMCTRL);*/ 1062 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, (WPARAM) 12, (LPARAM) &tba); 1063 1064 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_ADDBUTTONSA, (WPARAM) 6,(LPARAM) &tbb); 1065 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0); 981 1066 982 1067 /* Set the window text with the text specified in the OPENFILENAME structure */ 983 1068 if(fodInfos->ofnInfos.lpstrTitle) 984 SetWindowTextA(hwnd,fodInfos->ofnInfos.lpstrTitle); 1069 { 1070 SetWindowTextA(hwnd,fodInfos->ofnInfos.lpstrTitle); 1071 } 1072 else if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) 1073 { 1074 SetWindowTextA(hwnd,"Save"); 1075 } 985 1076 986 1077 /* Initialise the file name edit control */ … … 1000 1091 ShowWindow(GetDlgItem(hwnd,IDC_OPENREADONLY),SW_HIDE); 1001 1092 } 1002 1003 /* List View is selected by default */ 1004 SendDlgItemMessageA(hwnd, IDC_LIST, BM_SETCHECK,(WPARAM) BST_CHECKED,0); 1005 1093 /* change Open to Save */ 1094 if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) 1095 { 1096 SetDlgItemTextA(hwnd,IDOK,"Save"); 1097 } 1006 1098 return 0; 1007 1099 } … … 1011 1103 * 1012 1104 * Ok button WM_COMMAND message handler 1013 * 1105 * 1014 1106 * If the function succeeds, the return value is nonzero. 1015 1107 */ … … 1043 1135 char lpstrPathAndFile[MAX_PATH] = ""; 1044 1136 1045 /* Separate the file spec from the path spec 1046 e.g.: 1047 1048 1049 */ 1137 /* Separate the file spec from the path spec 1138 e.g.: 1139 lpstrSpecifiedByUser lpstrPathSpec lpstrFileSpec 1140 C:\TEXT1\TEXT2 C:\TEXT1 TEXT2 1141 */ 1050 1142 lpstrFileSpec = (LPSTR)COMDLG32_PathFindFilenameA(lpstrSpecifiedByUser); 1051 1143 strcpy(lpstrPathSpec,lpstrSpecifiedByUser); 1052 1144 COMDLG32_PathRemoveFileSpecA(lpstrPathSpec); 1053 1145 1146 /* Get the index of the selected item in the filetype combo box */ 1147 fodInfos->ofnInfos.nFilterIndex = (DWORD) CBGetCurSel(fodInfos->DlgInfos.hwndFileTypeCB); 1148 1054 1149 /* Get the current directory name */ 1055 1150 COMDLG32_SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent, 1056 1057 1058 /* Create an absolute path name */ 1151 lpstrCurrentDir); 1152 1153 /* Create an absolute path name */ 1059 1154 if(lpstrSpecifiedByUser[1] != ':') 1060 1155 { 1061 1156 switch(lpstrSpecifiedByUser[0]) 1062 1157 { 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 break;1075 /* Go to parent ..\TEXT */ 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 { 1092 1093 1094 1095 1096 1097 1098 1099 1158 /* Add drive spec \TEXT => C:\TEXT */ 1159 case '\\': 1160 { 1161 INT iCopy = 2; 1162 char lpstrTmp[MAX_PATH] = ""; 1163 if(!strlen(lpstrPathSpec)) 1164 iCopy = 3; 1165 strncpy(lpstrTmp,lpstrCurrentDir,iCopy); 1166 strcat(lpstrTmp,lpstrPathSpec); 1167 strcpy(lpstrPathSpec,lpstrTmp); 1168 } 1169 break; 1170 /* Go to parent ..\TEXT */ 1171 case '.': 1172 { 1173 INT iSize; 1174 char lpstrTmp2[MAX_PATH] = ""; 1175 LPSTR lpstrTmp = strrchr(lpstrCurrentDir,'\\'); 1176 iSize = lpstrTmp - lpstrCurrentDir; 1177 strncpy(lpstrTmp2,lpstrCurrentDir,iSize + 1); 1178 if(strlen(lpstrSpecifiedByUser) <= 3) 1179 strcpy(lpstrFileSpec,""); 1180 if(strcmp(lpstrPathSpec,"..")) 1181 strcat(lpstrTmp2,&lpstrPathSpec[3]); 1182 strcpy(lpstrPathSpec,lpstrTmp2); 1183 } 1184 break; 1185 default: 1186 { 1187 char lpstrTmp[MAX_PATH] = ""; 1188 if(strcmp(&lpstrCurrentDir[strlen(lpstrCurrentDir)-1],"\\")) 1189 strcat(lpstrCurrentDir,"\\"); 1190 strcpy(lpstrTmp,lpstrCurrentDir); 1191 strcat(lpstrTmp,lpstrPathSpec); 1192 strcpy(lpstrPathSpec,lpstrTmp); 1193 } 1194 1100 1195 } /* end switch */ 1101 1196 } … … 1103 1198 if(strlen(lpstrPathSpec)) 1104 1199 { 1105 /* Browse to the right directory */ 1106 COMDLG32_SHGetDesktopFolder(&psfDesktop); 1107 if((browsePidl = GetPidlFromName(psfDesktop,lpstrPathSpec))) 1108 { 1109 /* Browse to directory */ 1110 IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser, 1111 browsePidl, 1112 SBSP_ABSOLUTE); 1113 COMDLG32_SHFree(browsePidl); 1114 } 1115 else 1116 { 1117 /* Path does not exist */ 1118 if(fodInfos->ofnInfos.Flags & OFN_PATHMUSTEXIST) 1119 { 1120 MessageBoxA(hwnd, 1121 "Path does not exist", 1122 fodInfos->ofnInfos.lpstrTitle, 1123 MB_OK | MB_ICONEXCLAMATION); 1124 return FALSE; 1125 } 1126 } 1127 1128 strcat(lpstrPathAndFile,lpstrPathSpec); 1129 IShellFolder_Release(psfDesktop); 1200 /* Browse to the right directory */ 1201 COMDLG32_SHGetDesktopFolder(&psfDesktop); 1202 if((browsePidl = GetPidlFromName(psfDesktop,lpstrPathSpec))) 1203 { 1204 /* Browse to directory */ 1205 IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser, 1206 browsePidl, 1207 SBSP_ABSOLUTE); 1208 COMDLG32_SHFree(browsePidl); 1130 1209 } 1131 1210 else 1132 1211 { 1133 strcat(lpstrPathAndFile,lpstrCurrentDir); 1212 /* Path does not exist */ 1213 if(fodInfos->ofnInfos.Flags & OFN_PATHMUSTEXIST) 1214 { 1215 MessageBoxA(hwnd, 1216 "Path does not exist", 1217 fodInfos->ofnInfos.lpstrTitle, 1218 MB_OK | MB_ICONEXCLAMATION); 1219 return FALSE; 1220 } 1221 } 1222 1223 strcat(lpstrPathAndFile,lpstrPathSpec); 1224 IShellFolder_Release(psfDesktop); 1225 } 1226 else 1227 { 1228 strcat(lpstrPathAndFile,lpstrCurrentDir); 1134 1229 } 1135 1230 … … 1137 1232 COMDLG32_PathAddBackslashA(lpstrPathAndFile); 1138 1233 strcat(lpstrPathAndFile,lpstrFileSpec); 1139 1234 1140 1235 /* Update the edit field */ 1141 1236 SetDlgItemTextA(hwnd,IDC_FILENAME,lpstrFileSpec); 1142 1237 SendDlgItemMessageA(hwnd,IDC_FILENAME,EM_SETSEL,0,-1); 1143 1238 1144 1239 /* Don't go further if we dont have a file spec */ 1145 1240 if(!strlen(lpstrFileSpec) || !strcmp(lpstrFileSpec,lpstrPathSpec)) 1146 1147 1148 /* Time to check lpstrFileSpec */ 1241 return FALSE; 1242 1243 /* Time to check lpstrFileSpec */ 1149 1244 /* search => contains * or ? */ 1150 1245 /* browse => contains a directory name */ … … 1160 1255 MemFree((LPVOID)fodInfos->ShellInfos.lpstrCurrentFilter); 1161 1256 1162 1163 1164 1165 1257 fodInfos->ShellInfos.lpstrCurrentFilter = (LPWSTR)MemAlloc((strlen(lpstrFileSpec)+1)*2); 1258 lstrcpyAtoW(fodInfos->ShellInfos.lpstrCurrentFilter, 1259 (LPSTR)strlwr((LPSTR)lpstrFileSpec)); 1260 1166 1261 IShellView_Refresh(fodInfos->Shell.FOIShellView); 1167 1262 1168 1169 1263 if(-1 < (iPos = FILEDLG95_FILETYPE_SearchExt(fodInfos->DlgInfos.hwndFileTypeCB, 1264 lpstrFileSpec))) 1170 1265 CBSetCurSel(fodInfos->DlgInfos.hwndFileTypeCB,iPos); 1171 1266 … … 1175 1270 /* browse if the user specified a directory */ 1176 1271 if((browsePidl = GetPidlFromName(fodInfos->Shell.FOIShellFolder, 1177 1272 lpstrFileSpec))) 1178 1273 { 1179 1274 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER; 1180 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1181 1, 1182 &browsePidl, 1183 &ulAttr); 1184 1185 /* Browse to directory */ 1186 if(ulAttr) 1275 int nMsgBoxRet; 1276 char lpstrFileExist[MAX_PATH + 50]; 1277 1278 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1279 1, 1280 &browsePidl, 1281 &ulAttr); 1282 1283 /* The file does exist, so ask the user if we should overwrite it */ 1284 if(fodInfos->ofnInfos.Flags & OFN_OVERWRITEPROMPT) 1285 { 1286 strcpy(lpstrFileExist, lpstrFileSpec); 1287 strcat(lpstrFileExist, " already exists.\nDo you want to replace it?"); 1288 1289 nMsgBoxRet = MessageBoxA(hwnd, 1290 lpstrFileExist, 1291 fodInfos->ofnInfos.lpstrTitle, 1292 MB_YESNO | MB_ICONEXCLAMATION); 1293 if(nMsgBoxRet == IDNO) return FALSE; 1294 } 1295 1296 /* Browse to directory */ 1297 if(ulAttr) 1187 1298 { 1188 1189 1190 1299 if(FAILED(IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser, 1300 browsePidl, 1301 SBSP_RELATIVE))) 1191 1302 { 1192 1303 if(fodInfos->ofnInfos.Flags & OFN_PATHMUSTEXIST) 1193 1304 { 1194 1195 1196 1197 1198 1199 1305 MessageBoxA(hwnd, 1306 "Path does not exist", 1307 fodInfos->ofnInfos.lpstrTitle, 1308 MB_OK | MB_ICONEXCLAMATION); 1309 COMDLG32_SHFree(browsePidl); 1310 return FALSE; 1200 1311 } 1201 1312 } 1202 1203 1204 } 1205 1313 COMDLG32_SHFree(browsePidl); 1314 return FALSE; 1315 } 1316 COMDLG32_SHFree(browsePidl); 1206 1317 } 1207 1318 else 1208 1319 { 1209 1210 1211 1320 /* File does not exist in current directory */ 1321 1322 /* The selected file does not exist */ 1212 1323 /* Tell the user the selected does not exist */ 1213 1324 if(fodInfos->ofnInfos.Flags & OFN_FILEMUSTEXIST) … … 1217 1328 char tmp[400]; 1218 1329 1219 LoadStringA(COMDLG32_hInstance,1220 1221 1222 1223 LoadStringA(COMDLG32_hInstance,1224 1225 1226 1330 LoadStringA(COMMDLG_hInstance32, 1331 IDS_FILENOTFOUND, 1332 lpstrNotFound, 1333 100); 1334 LoadStringA(COMMDLG_hInstance32, 1335 IDS_VERIFYFILE, 1336 lpstrMsg, 1337 100); 1227 1338 1228 1339 strcpy(tmp,fodInfos->ofnInfos.lpstrFile); … … 1232 1343 strcat(tmp,lpstrMsg); 1233 1344 1234 1235 1236 1237 1238 1345 MessageBoxA(hwnd, 1346 tmp, 1347 fodInfos->ofnInfos.lpstrTitle, 1348 MB_OK | MB_ICONEXCLAMATION); 1349 return FALSE; 1239 1350 } 1240 1351 /* Ask the user if he wants to create the file*/ … … 1243 1354 char tmp[100]; 1244 1355 1245 LoadStringA(COM DLG32_hInstance,IDS_CREATEFILE,tmp,100);1246 1247 1248 1356 LoadStringA(COMMDLG_hInstance32,IDS_CREATEFILE,tmp,100); 1357 1358 if(IDYES == MessageBoxA(hwnd,tmp,fodInfos->ofnInfos.lpstrTitle, 1359 MB_YESNO | MB_ICONQUESTION)) 1249 1360 { 1250 1361 /* Create the file, clean and exit */ … … 1252 1363 return EndDialog(hwnd,TRUE); 1253 1364 } 1254 return FALSE; 1365 return FALSE; 1255 1366 } 1256 1367 } … … 1261 1372 if(!strrchr(lpstrPathAndFile,'.')) 1262 1373 { 1263 1264 1265 int iExt;1266 1267 1268 1374 /* if the file has no extension, append the selected 1375 extension of the filetype combo box */ 1376 int iExt; 1377 LPSTR lpstrExt; 1378 iExt = CBGetCurSel(fodInfos->DlgInfos.hwndFileTypeCB); 1379 lpstrTemp = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB,iExt); 1269 1380 1270 1381 //SvL: Check pointer first 1271 1382 if(lpstrTemp != (LPSTR)-1) { 1272 1273 1274 1275 lpstrExt =MemAlloc(i);1276 1277 1278 1279 1280 lpstrExt =MemAlloc(strlen(lpstrTemp));1281 1282 1283 1284 1285 1286 lpstrExt =MemAlloc(strlen(fodInfos->ofnInfos.lpstrDefExt)+2);1287 1288 1289 1290 1291 1383 if((lpstrExt = strchr(lpstrTemp,';'))) 1384 { 1385 int i = lpstrExt - lpstrTemp; 1386 lpstrExt = (LPSTR)MemAlloc(i); 1387 strncpy(lpstrExt,&lpstrTemp[1],i-1); 1388 } 1389 else 1390 { 1391 lpstrExt = (LPSTR)MemAlloc(strlen(lpstrTemp)); 1392 strcpy(lpstrExt,&lpstrTemp[1]); 1393 } 1394 1395 if(!strcmp(&lpstrExt[1],"*") && fodInfos->ofnInfos.lpstrDefExt) 1396 { 1397 lpstrExt = (LPSTR)MemAlloc(strlen(fodInfos->ofnInfos.lpstrDefExt)+2); 1398 strcat(lpstrExt,"."); 1399 strcat(lpstrExt,(LPSTR) fodInfos->ofnInfos.lpstrDefExt); 1400 } 1401 strcat(lpstrPathAndFile,lpstrExt); 1402 } 1292 1403 } 1293 1404 /* Check that size size of the file does not exceed buffer size */ 1294 1405 if(strlen(lpstrPathAndFile) > fodInfos->ofnInfos.nMaxFile) 1295 1406 { 1296 1297 1298 1407 /* set error FNERR_BUFFERTOSMALL */ 1408 FILEDLG95_Clean(hwnd); 1409 return EndDialog(hwnd,FALSE); 1299 1410 } 1300 1411 strcpy(fodInfos->ofnInfos.lpstrFile,lpstrPathAndFile); … … 1302 1413 /* Set the lpstrFileTitle of the OPENFILENAME structure */ 1303 1414 if(fodInfos->ofnInfos.lpstrFileTitle) 1304 1305 1306 1307 1308 /* Check if the file is to be opened as read only */ 1415 strncpy(fodInfos->ofnInfos.lpstrFileTitle, 1416 lpstrFileSpec, 1417 fodInfos->ofnInfos.nMaxFileTitle); 1418 1419 /* Check if the file is to be opened as read only */ 1309 1420 if(BST_CHECKED == SendDlgItemMessageA(hwnd, 1310 1311 1312 1313 1421 IDC_OPENREADONLY, 1422 BM_GETSTATE,0,0)) 1423 SetFileAttributesA(fodInfos->ofnInfos.lpstrFile, 1424 FILE_ATTRIBUTE_READONLY); 1314 1425 1315 1426 /* nFileExtension and nFileOffset of OPENFILENAME structure */ … … 1319 1430 fodInfos->ofnInfos.nFileExtension = lpstrTemp - fodInfos->ofnInfos.lpstrFile + 1; 1320 1431 1321 1432 1322 1433 /* clean and exit */ 1323 1434 FILEDLG95_Clean(hwnd); … … 1340 1451 1341 1452 /* 1342 * Initialisation of the FileOpenDialogInfos structure 1453 * Initialisation of the FileOpenDialogInfos structure 1343 1454 */ 1344 1455 … … 1360 1471 1361 1472 /* Construct the IShellBrowser interface */ 1362 fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); 1363 1473 fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); 1474 1364 1475 return NOERROR; 1365 1476 } … … 1380 1491 1381 1492 if(SUCCEEDED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, 1382 1383 1384 1493 SVGIO_BACKGROUND, 1494 &IID_IContextMenu, 1495 (LPVOID*)&pcm))) 1385 1496 { 1386 1497 ci.cbSize = sizeof(CMINVOKECOMMANDINFO); … … 1419 1530 * FILEDLG95_SHELL_NewFolder 1420 1531 * 1421 * Creates a new directory with New folder as name 1532 * Creates a new directory with New folder as name 1422 1533 * If the function succeeds, the return value is nonzero. 1423 1534 * FIXME: let the contextmenu (CMDSTR_NEWFOLDER) do this thing … … 1467 1578 * FILEDLG95_FILETYPE_Init 1468 1579 * 1469 * Initialisation of the file type combo box 1580 * Initialisation of the file type combo box 1470 1581 */ 1471 1582 static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd) … … 1502 1613 if(!lpstrExt) 1503 1614 break; 1504 1615 1505 1616 strcpy(lpstrExt,lpstrExtTmp); 1506 1617 1507 1618 iStrIndex += strlen(lpstrExt) +1; 1508 1619 1509 1620 /* Add the item at the end of the combo */ 1510 1621 CBAddString(fodInfos->DlgInfos.hwndFileTypeCB,lpstrTmp); … … 1552 1663 lpstrFilter = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, 1553 1664 iItem); 1554 if( (INT)lpstrFilter != CB_ERR)1665 if(lpstrFilter) 1555 1666 { 1556 1667 fodInfos->ShellInfos.lpstrCurrentFilter = (LPWSTR)MemAlloc((strlen(lpstrFilter)+1)*2); … … 1614 1725 1615 1726 } 1616 1727 1617 1728 /*********************************************************************** 1618 1729 * FILEDLG95_LOOKIN_Init 1619 1730 * 1620 * Initialisation of the look in combo box 1731 * Initialisation of the look in combo box 1621 1732 */ 1622 1733 static HRESULT FILEDLG95_LOOKIN_Init(HWND hwndCombo) 1623 1734 { 1624 IShellFolder 1625 IEnumIDList 1626 LPITEMIDLIST 1627 1628 LookInInfos *liInfos = (LookInInfos *)MemAlloc(sizeof(LookInInfos));1735 IShellFolder *psfRoot, *psfDrives; 1736 IEnumIDList *lpeRoot, *lpeDrives; 1737 LPITEMIDLIST pidlDrives, pidlTmp, pidlTmp1, pidlAbsTmp; 1738 1739 LookInInfos *liInfos = (LookInInfos *)MemAlloc(sizeof(LookInInfos)); 1629 1740 1630 1741 TRACE("\n"); … … 1651 1762 while (S_OK == IEnumIDList_Next(lpeRoot, 1, &pidlTmp, NULL)) 1652 1763 { 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1764 FILEDLG95_LOOKIN_AddItem(hwndCombo, pidlTmp,LISTEND); 1765 1766 /* special handling for CSIDL_DRIVES */ 1767 if (COMDLG32_PIDL_ILIsEqual(pidlTmp, pidlDrives)) 1768 { 1769 if(SUCCEEDED(IShellFolder_BindToObject(psfRoot, pidlTmp, NULL, &IID_IShellFolder, (LPVOID*)&psfDrives))) 1770 { 1771 /* enumerate the drives */ 1772 if(SUCCEEDED(IShellFolder_EnumObjects(psfDrives, hwndCombo,SHCONTF_FOLDERS, &lpeDrives))) 1773 { 1774 while (S_OK == IEnumIDList_Next(lpeDrives, 1, &pidlTmp1, NULL)) 1775 { 1776 pidlAbsTmp = COMDLG32_PIDL_ILCombine(pidlTmp, pidlTmp1); 1777 FILEDLG95_LOOKIN_AddItem(hwndCombo, pidlAbsTmp,LISTEND); 1778 COMDLG32_SHFree(pidlAbsTmp); 1779 COMDLG32_SHFree(pidlTmp1); 1780 } 1781 IEnumIDList_Release(lpeDrives); 1782 } 1783 IShellFolder_Release(psfDrives); 1784 } 1785 } 1675 1786 COMDLG32_SHFree(pidlTmp); 1676 1787 } … … 1718 1829 { 1719 1830 ilItemImage = (HIMAGELIST) COMDLG32_SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 1720 0, 1721 &sfi, 1722 sizeof (SHFILEINFOA), 1723 SHGFI_PIDL | SHGFI_SMALLICON | 1724 SHGFI_OPENICON | SHGFI_SYSICONINDEX | 1725 SHGFI_DISPLAYNAME ); 1831 0, 1832 &sfi, 1833 sizeof (SHFILEINFOA), 1834 SHGFI_PIDL | SHGFI_SMALLICON | 1835 SHGFI_OPENICON | SHGFI_SYSICONINDEX | 1836 SHGFI_DISPLAYNAME ); 1726 1837 } 1727 1838 else 1728 1839 { 1729 1840 ilItemImage = (HIMAGELIST) COMDLG32_SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 1730 0, 1731 &sfi, 1841 0, 1842 &sfi, 1732 1843 sizeof (SHFILEINFOA), 1733 SHGFI_PIDL | SHGFI_SMALLICON | 1734 SHGFI_SYSICONINDEX | 1844 SHGFI_PIDL | SHGFI_SMALLICON | 1845 SHGFI_SYSICONINDEX | 1735 1846 SHGFI_DISPLAYNAME); 1736 1847 } … … 1755 1866 iIndentation = 0; 1756 1867 ilItemImage = (HIMAGELIST) COMDLG32_SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 1757 0, 1758 &sfi, 1759 sizeof (SHFILEINFOA), 1760 SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON 1868 0, 1869 &sfi, 1870 sizeof (SHFILEINFOA), 1871 SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON 1761 1872 | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME ); 1762 1873 … … 1780 1891 rectText.bottom = pDIStruct->rcItem.bottom; 1781 1892 1782 1893 1783 1894 /* Draw the icon from the image list */ 1784 1895 COMDLG32_ImageList_Draw(ilItemImage, 1785 1896 sfi.iIcon, 1786 pDIStruct->hDC, 1787 rectIcon.left, 1788 rectIcon.top, 1789 ILD_TRANSPARENT ); 1897 pDIStruct->hDC, 1898 rectIcon.left, 1899 rectIcon.top, 1900 ILD_TRANSPARENT ); 1790 1901 1791 1902 /* Draw the associated text */ … … 1814 1925 { 1815 1926 LPSFOLDER tmpFolder; 1816 int iItem; 1927 int iItem; 1817 1928 1818 1929 iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB); … … 1820 1931 if(!(tmpFolder = (LPSFOLDER) CBGetItemDataPtr(fodInfos->DlgInfos.hwndLookInCB, 1821 1932 iItem))) 1822 1933 return FALSE; 1823 1934 1824 1935 … … 1831 1942 break; 1832 1943 } 1833 1944 1834 1945 } 1835 1946 return FALSE; … … 1846 1957 LPITEMIDLIST pidlNext; 1847 1958 SHFILEINFOA sfi; 1848 SFOLDER *tmpFolder = (SFOLDER *)MemAlloc(sizeof(SFOLDER));1959 SFOLDER *tmpFolder = (SFOLDER *)MemAlloc(sizeof(SFOLDER)); 1849 1960 LookInInfos *liInfos; 1850 1961 … … 1853 1964 if(!(liInfos = (LookInInfos *)GetPropA(hwnd,LookInInfosStr))) 1854 1965 return -1; 1855 1966 1856 1967 tmpFolder->m_iIndent = 0; 1857 1968 … … 1870 1981 if(tmpFolder->m_iIndent > liInfos->iMaxIndentation) 1871 1982 liInfos->iMaxIndentation = tmpFolder->m_iIndent; 1872 1983 1873 1984 COMDLG32_SHGetFileInfoA((LPSTR)pidl, 1874 1985 0, 1875 1986 &sfi, 1876 1987 sizeof(sfi), 1877 SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 1988 SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 1878 1989 | SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_ATTRIBUTES); 1879 1990 … … 1904 2015 * FILEDLG95_LOOKIN_InsertItemAfterParent 1905 2016 * 1906 * Insert an item below its parent 2017 * Insert an item below its parent 1907 2018 */ 1908 2019 static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl) 1909 2020 { 1910 2021 1911 2022 LPITEMIDLIST pidlParent = GetParentPidl(pidl); 1912 2023 int iParentPos; … … 1963 2074 } 1964 2075 } 1965 2076 1966 2077 CBSetCurSel(hwnd,iItemPos); 1967 2078 liInfos->uSelectedItem = iItemPos; … … 2057 2168 * GetName 2058 2169 * 2059 * Get the pidl's display name (relative to folder) and 2170 * Get the pidl's display name (relative to folder) and 2060 2171 * put it in lpstrFileName. 2061 * 2172 * 2062 2173 * Return NOERROR on success, 2063 2174 * E_FAIL otherwise … … 2082 2193 /* Get the display name of the pidl relative to the folder */ 2083 2194 if (SUCCEEDED(hRes = IShellFolder_GetDisplayNameOf(lpsf, 2084 pidl, 2085 dwFlags, 2195 pidl, 2196 dwFlags, 2086 2197 &str))) 2087 2198 { … … 2094 2205 * GetShellFolderFromPidl 2095 2206 * 2096 * pidlRel is the item pidl relative 2207 * pidlRel is the item pidl relative 2097 2208 * Return the IShellFolder of the absolute pidl 2098 2209 */ … … 2110 2221 if(SUCCEEDED(IShellFolder_BindToObject(psfParent, pidlAbs, NULL, &IID_IShellFolder, (LPVOID*)&psf))) 2111 2222 { 2112 2223 IShellFolder_Release(psfParent); 2113 2224 return psf; 2114 2225 } … … 2133 2244 pidlParent = COMDLG32_PIDL_ILClone(pidl); 2134 2245 COMDLG32_PIDL_ILRemoveLastID(pidlParent); 2135 2246 2136 2247 return pidlParent; 2137 2248 } … … 2140 2251 * GetPidlFromName 2141 2252 * 2142 * returns the pidl of the file name relative to folder 2253 * returns the pidl of the file name relative to folder 2143 2254 * NULL if an error occured 2144 2255 */ … … 2154 2265 if(!lpcstrFileName) 2155 2266 return NULL; 2156 2267 2157 2268 MultiByteToWideChar(CP_ACP, 2158 MB_PRECOMPOSED, 2159 lpcstrFileName, 2160 -1, 2161 (LPWSTR)lpwstrDirName, 2162 MAX_PATH); 2269 MB_PRECOMPOSED, 2270 lpcstrFileName, 2271 -1, 2272 (LPWSTR)lpwstrDirName, 2273 MAX_PATH); 2163 2274 2164 2275 IShellFolder_ParseDisplayName(psf, 0, … … 2167 2278 &ulEaten, 2168 2279 &pidl, 2169 NULL); 2280 NULL); 2170 2281 2171 2282 return pidl; … … 2197 2308 /* 2198 2309 * Memory allocation methods */ 2199 char*MemAlloc(UINT size)2200 { 2201 return (char *)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,size);2310 void *MemAlloc(UINT size) 2311 { 2312 return HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,size); 2202 2313 } 2203 2314 -
trunk/src/comdlg32/filedlgbrowser.cpp
r1557 r1864 1 /* $Id: filedlgbrowser.cpp,v 1. 3 1999-11-02 20:38:15sandervl Exp $ */1 /* $Id: filedlgbrowser.cpp,v 1.4 1999-11-28 12:32:28 sandervl Exp $ */ 2 2 /* 3 3 * Implementation of IShellBrowser for the File Open common dialog … … 103 103 extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl); 104 104 extern BOOL FILEDLG95_OnOpen(HWND hwnd); 105 extern HRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode); 105 106 106 107 … … 512 513 { 513 514 ICOM_THIS(IShellBrowserImpl, iface); 514 515 TRACE("(%p)\n", This); 516 517 /* Feature not implemented */ 518 return E_NOTIMPL; 515 LRESULT lres; 516 517 // TRACE("(%p)->(0x%08x 0x%08x 0x%08x 0x%08lx %p)\n", This, id, uMsg, wParam, lParam, pret); 518 519 switch (id) 520 { 521 case FCW_TOOLBAR: 522 lres = SendDlgItemMessageA( This->hwndOwner, IDC_TOOLBAR, uMsg, wParam, lParam); 523 break; 524 default: 525 FIXME("ctrl id: %x\n", id); 526 return E_NOTIMPL; 527 } 528 if (pret) *pret = lres; 529 return S_OK; 519 530 } 520 531 /************************************************************************** … … 769 780 770 781 COMDLG32_SHFree((LPVOID)pidl); 782 SendCustomDlgNotificationMessage(This->hwndOwner, CDN_SELCHANGE); 771 783 return hRes; 772 784 } -
trunk/src/comdlg32/filedlgbrowser.h
r1557 r1864 1 /* $Id: filedlgbrowser.h,v 1. 2 1999-11-02 20:37:43sandervl Exp $ */1 /* $Id: filedlgbrowser.h,v 1.3 1999-11-28 12:32:28 sandervl Exp $ */ 2 2 /* 3 3 * Implementation of IShellBrowser for the File Open common dialog … … 63 63 HWND hwndLookInCB; 64 64 HWND hwndFileName; 65 HWND hwndTB; 66 HWND hwndCustomDlg; 65 67 DWORD dwDlgProp; 66 68 } DlgInfos; 67 69 68 70 } FileOpenDlgInfos; 71 72 /*********************************************************************** 73 * Control ID's 74 */ 75 #define IDS_ABOUTBOX 101 76 #define IDS_DOCUMENTFOLDERS 102 77 #define IDS_PERSONAL 103 78 #define IDS_FAVORITES 104 79 #define IDS_PATH 105 80 #define IDS_DESKTOP 106 81 82 #define IDS_FONTS 108 83 #define IDS_MYCOMPUTER 110 84 #define IDS_SYSTEMFOLDERS 112 85 #define IDS_LOCALHARDRIVES 113 86 #define IDS_FILENOTFOUND 114 87 #define IDS_VERIFYFILE 115 88 #define IDS_CREATEFILE 116 89 90 #define IDC_OPENREADONLY chx1 91 92 #define IDC_TOOLBARSTATIC stc1 93 #define IDC_FILETYPESTATIC stc2 94 #define IDC_FILENAMESTATIC stc3 95 #define IDC_LOOKINSTATIC stc4 96 97 #define IDC_SHELLSTATIC lst1 98 99 #define IDC_FILETYPE cmb1 100 #define IDC_LOOKIN cmb2 101 102 #define IDC_FILENAME edt1 103 104 #define IDC_TOOLBAR ctl1 69 105 70 106 /*********************************************************************** -
trunk/src/comdlg32/rsrc.rc
r1548 r1864 1 /* $Id: rsrc.rc,v 1. 1 1999-11-02 19:09:43sandervl Exp $ */1 /* $Id: rsrc.rc,v 1.2 1999-11-28 12:32:28 sandervl Exp $ */ 2 2 /* 3 * Top level resource file for Common Dialogs (990815)3 * Top level resource file for Common Dialogs 4 4 * 5 5 */ … … 7 7 #include "winuser.h" 8 8 #include "winnls.h" 9 #include "dlgs.h"10 9 #include "cdlg.h" 11 10 #include "winspool.h" 11 #include "filedlgbrowser.h" 12 12 13 13 /* … … 26 26 * get localized bitmaps for example. 27 27 */ 28 //#include "cdlg_Ca.rc" 29 //#include "cdlg_Cs.rc" 30 //#include "cdlg_Da.rc" 31 //#include "cdlg_De.rc" 28 32 #include "cdlg_En.rc" 33 //#include "cdlg_Eo.rc" 34 //#include "cdlg_Es.rc" 35 //#include "cdlg_Fi.rc" 36 //#include "cdlg_Fr.rc" 37 //#include "cdlg_Hu.rc" 38 //#include "cdlg_It.rc" 39 //#include "cdlg_Ko.rc" 40 //#include "cdlg_Nl.rc" 41 //#include "cdlg_No.rc" 42 //#include "cdlg_Pl.rc" 43 //#include "cdlg_Pt.rc" 44 //#include "cdlg_Ru.rc" 45 //#include "cdlg_Sv.rc" 46 //#include "cdlg_Wa.rc"
Note:
See TracChangeset
for help on using the changeset viewer.