- Timestamp:
- Sep 15, 2001, 11:19:26 AM (24 years ago)
- Location:
- trunk/src/comdlg32
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comdlg32/cdlg_De.orc
r5876 r6708 18 18 DEFPUSHBUTTON "Öffnen", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 19 19 PUSHBUTTON "Abbrechen", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP 20 PUSHBUTTON "&Hilfe", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP20 PUSHBUTTON "&Hilfe", pshHelp, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP 21 21 CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 22 22 } … … 40 40 DEFPUSHBUTTON "Speichern als", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 41 41 PUSHBUTTON "Abbrechen", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP 42 PUSHBUTTON "&Hilfe", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP42 PUSHBUTTON "&Hilfe", pshHelp, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP 43 43 CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 44 44 } … … 53 53 LTEXT "", 1089, 60, 6, 150, 9 54 54 GROUPBOX "Druckbereicht", 1072, 6, 30, 160, 65, BS_GROUPBOX 55 RADIOBUTTON "&Alles", 1056, 16, 45, 60, 1256 RADIOBUTTON "A&uswahl", 1057, 16, 60, 60, 1257 RADIOBUTTON "&Seiten", 1058, 16, 75, 60, 1255 RADIOBUTTON "&Alles", rad1, 16, 45, 60, 12 56 RADIOBUTTON "A&uswahl", rad2, 16, 60, 60, 12 57 RADIOBUTTON "&Seiten", rad3, 16, 75, 60, 12 58 58 DEFPUSHBUTTON "Drucken", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 59 59 PUSHBUTTON "Abbrechen", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP 60 PUSHBUTTON "&Einrichten", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP60 PUSHBUTTON "&Einrichten", psh1, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP 61 61 LTEXT "&Von:", 1090, 60, 80, 30, 9 62 62 LTEXT "&Bis:", 1091, 120, 80, 30, 9 … … 74 74 { 75 75 GROUPBOX "Drucker", 1072, 6, 10, 180, 65, BS_GROUPBOX 76 RADIOBUTTON "&Standarddrucker", 1056, 16, 20, 80, 1276 RADIOBUTTON "&Standarddrucker", rad1, 16, 20, 80, 12 77 77 LTEXT "[keiner]", 1088, 35, 35, 120, 9 78 RADIOBUTTON "Bestimmter &Drucker", 1057, 16, 50, 80, 1278 RADIOBUTTON "Bestimmter &Drucker", rad2, 16, 50, 80, 12 79 79 COMBOBOX 1136, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP 80 80 DEFPUSHBUTTON "Ok", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 81 81 PUSHBUTTON "Abbrechen", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP 82 PUSHBUTTON "&Einrichten", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP82 PUSHBUTTON "&Einrichten", psh1, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP 83 83 GROUPBOX "Orientierung", 1073, 6, 85, 100, 50, BS_GROUPBOX 84 RADIOBUTTON "&Hochformat", 1058, 50, 100, 40, 1285 RADIOBUTTON "&Querformat", 1059, 50, 115, 40, 1284 RADIOBUTTON "&Hochformat", rad3, 50, 100, 40, 12 85 RADIOBUTTON "&Querformat", rad4, 50, 115, 40, 12 86 86 ICON "LANDSCAP", 1097, 10, 95, 32, 32 87 87 ICON "PORTRAIT", 1098, 10, 95, 32, 32 … … 140 140 DEFPUSHBUTTON "OK",IDOK,218,6,40,14,WS_GROUP 141 141 PUSHBUTTON "Abbrechen",IDCANCEL,218,23,40,14,WS_GROUP 142 PUSHBUTTON "&Zuweisen", 1026,218,40,40,14,WS_GROUP143 PUSHBUTTON "&Hilfe" , 1038,218,57,40,14,WS_GROUP142 PUSHBUTTON "&Zuweisen", psh3,218,40,40,14,WS_GROUP 143 PUSHBUTTON "&Hilfe" , pshHelp,218,57,40,14,WS_GROUP 144 144 GROUPBOX "Darstellung",1072,6,72,84,34,WS_GROUP 145 145 CHECKBOX "&Durchgestrichen", 1040, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP … … 180 180 DEFPUSHBUTTON "Ok", IDOK, 4, 166, 44, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 181 181 PUSHBUTTON "Abbrechen", IDCANCEL, 52, 166, 44, 14, WS_GROUP | WS_TABSTOP 182 PUSHBUTTON "&Hilfe", 1038,100,166, 44, 14182 PUSHBUTTON "&Hilfe", pshHelp,100,166, 44, 14 183 183 PUSHBUTTON "Farbe hin&zufügen", 712/*1024*/, 152, 166, 142, 14, WS_GROUP | WS_TABSTOP 184 184 PUSHBUTTON "Farben &definieren >>", 719/*1025*/, 4, 150, 142, 14, WS_GROUP | WS_TABSTOP … … 197 197 CHECKBOX "Beachte Groß/Kleinschreibung", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP 198 198 GROUPBOX "Richtung", 1072, 107, 26, 68, 28 199 CONTROL "H&och", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12200 CONTROL "&Runter", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12199 CONTROL "H&och", rad1, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12 200 CONTROL "&Runter", rad2, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12 201 201 DEFPUSHBUTTON "&Nächsten finden", IDOK, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP 202 202 PUSHBUTTON "Abbrechen", IDCANCEL, 182, 23, 50, 14, WS_GROUP | WS_TABSTOP 203 PUSHBUTTON "&Hilfe", 1038, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP203 PUSHBUTTON "&Hilfe", pshHelp, 182, 45, 50, 14, WS_GROUP | WS_TABSTOP 204 204 } 205 205 … … 217 217 CHECKBOX "Beachte Groß/Kleinschreibung", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP 218 218 DEFPUSHBUTTON "&Nächsten finden", IDOK, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 219 PUSHBUTTON "&Ersetzen", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP220 PUSHBUTTON "&Alle ersetzen", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP219 PUSHBUTTON "&Ersetzen", psh1, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP 220 PUSHBUTTON "&Alle ersetzen", psh2, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP 221 221 PUSHBUTTON "Abbrechen", IDCANCEL, 174, 55, 50, 14, WS_GROUP | WS_TABSTOP 222 PUSHBUTTON "&Hilfe", 1038, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP222 PUSHBUTTON "&Hilfe", pshHelp, 174, 75, 50, 14, WS_GROUP | WS_TABSTOP 223 223 } 224 224 -
trunk/src/comdlg32/cdlg_En.orc
r5876 r6708 7 7 { 8 8 LTEXT "File &Name:", 1090, 6, 6, 76, 9 9 EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP9 EDITTEXT edt1, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP 10 10 LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP 11 11 LTEXT "&Directories:", -1, 110, 6, 92, 9 … … 13 13 LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP 14 14 LTEXT "List Files of &Type:", 1089, 6, 104, 90, 9 15 COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP15 COMBOBOX cmb1, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP 16 16 LTEXT "Dri&ves:", 1091, 110, 104, 92, 9 17 COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP17 COMBOBOX cmb2, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP 18 18 DEFPUSHBUTTON "Open", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 19 19 PUSHBUTTON "Cancel", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP 20 PUSHBUTTON "&Help", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP21 CHECKBOX "&Read Only", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP20 PUSHBUTTON "&Help", pshHelp, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP 21 CHECKBOX "&Read Only", chx1, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 22 22 } 23 23 … … 29 29 { 30 30 LTEXT "File &Name:", 1090, 6, 6, 76, 9 31 EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP31 EDITTEXT edt1, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP 32 32 LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP 33 33 LTEXT "&Directories:", -1, 110, 6, 92, 9 … … 35 35 LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP 36 36 LTEXT "List Files of &Type:", 1089, 6, 104, 90, 9 37 COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP37 COMBOBOX cmb1, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP 38 38 LTEXT "Dri&ves:", 1091, 110, 104, 92, 9 39 COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP39 COMBOBOX cmb2, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP 40 40 DEFPUSHBUTTON "Save As", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 41 41 PUSHBUTTON "Cancel", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP 42 PUSHBUTTON "&Help", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP43 CHECKBOX "&Read Only", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP42 PUSHBUTTON "&Help", pshHelp, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP 43 CHECKBOX "&Read Only", chx1, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 44 44 } 45 45 … … 52 52 LTEXT "Printer:", 1088, 6, 6, 40, 9 53 53 LTEXT "", 1089, 60, 6, 150, 9 54 GROUPBOX "Print Range", 1072, 6, 30, 160, 65, BS_GROUPBOX55 RADIOBUTTON "&All", 1056, 16, 45, 60, 1256 RADIOBUTTON "S&election", 1057, 16, 60, 60, 1257 RADIOBUTTON "&Pages", 1058, 16, 75, 60, 1254 GROUPBOX "Print Range", grp1, 6, 30, 160, 65, BS_GROUPBOX 55 RADIOBUTTON "&All", rad1, 16, 45, 60, 12 56 RADIOBUTTON "S&election", rad2, 16, 60, 60, 12 57 RADIOBUTTON "&Pages", rad3, 16, 75, 60, 12 58 58 DEFPUSHBUTTON "Print", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 59 59 PUSHBUTTON "Cancel", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP 60 PUSHBUTTON "&Setup", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP60 PUSHBUTTON "&Setup", psh1, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP 61 61 LTEXT "&From:", 1090, 60, 80, 30, 9 62 62 LTEXT "&To:", 1091, 120, 80, 30, 9 63 63 LTEXT "Print &Quality:", 1092, 6, 100, 76, 9 64 COMBOBOX 1136, 80, 100, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP65 CHECKBOX "Print to Fi&le", 1040, 20, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP66 CHECKBOX "Condensed", 1041, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP64 COMBOBOX cmb1, 80, 100, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP 65 CHECKBOX "Print to Fi&le", chx1, 20, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 66 CHECKBOX "Condensed", chx2, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 67 67 } 68 68 … … 73 73 FONT 8, "Helv" 74 74 { 75 GROUPBOX "Printer", 1072, 6, 10, 180, 65, BS_GROUPBOX76 RADIOBUTTON "&Default Printer", 1056, 16, 20, 80, 1275 GROUPBOX "Printer", grp1, 6, 10, 180, 65, BS_GROUPBOX 76 RADIOBUTTON "&Default Printer", rad1, 16, 20, 80, 12 77 77 LTEXT "[none]", 1088, 35, 35, 120, 9 78 RADIOBUTTON "Specific &Printer", 1057, 16, 50, 80, 1279 COMBOBOX 1136, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP80 DEFPUSHBUTTON "OK", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP81 PUSHBUTTON "Cancel", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP82 PUSHBUTTON "&Setup", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP83 GROUPBOX "Orientation", 1073, 6, 85, 100, 50, BS_GROUPBOX84 RADIOBUTTON "Po&rtrait", 1058, 50, 100, 40, 1285 RADIOBUTTON "&Landscape", 1059, 50, 115, 40, 1286 ICON "LANDSCAP", 1097, 10, 95, 32, 3287 ICON "PORTRAIT", 1098, 10, 95, 32, 3288 GROUPBOX "Paper", 1074, 120, 85, 180, 50, BS_GROUPBOX78 RADIOBUTTON "Specific &Printer", rad2, 16, 50, 80, 12 79 COMBOBOX cmb1, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP 80 DEFPUSHBUTTON "OK", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 81 PUSHBUTTON "Cancel", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP 82 PUSHBUTTON "&Setup", psh1, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP 83 GROUPBOX "Orientation", grp2, 6, 85, 100, 50, BS_GROUPBOX 84 RADIOBUTTON "Po&rtrait", rad3, 50, 100, 40, 12 85 RADIOBUTTON "&Landscape", rad4, 50, 115, 40, 12 86 ICON "LANDSCAP", stc10, 10, 95, 32, 32 87 ICON "PORTRAIT", stc11, 10, 95, 32, 32 88 GROUPBOX "Paper", grp3, 120, 85, 180, 50, BS_GROUPBOX 89 89 LTEXT "Si&ze", 1089, 130, 95, 30, 9 90 90 LTEXT "&Source", 1090, 130, 110, 30, 9 91 COMBOBOX 1137, 155, 95, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP92 COMBOBOX 1138, 155, 110, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP91 COMBOBOX cmb2, 155, 95, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP 92 COMBOBOX cmb3, 155, 110, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP 93 93 } 94 94 … … 100 100 { 101 101 LTEXT "&Font:",1088 ,6,3,40,9 102 COMBOBOX 1136 ,6,13,94,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |102 COMBOBOX cmb1, 6,13,94,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | 103 103 CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE 104 104 LTEXT "Font St&yle:",1089 ,108,3,44,9 105 COMBOBOX 1137,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |105 COMBOBOX cmb2,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | 106 106 WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE 107 107 LTEXT "&Size:",1090,179,3,30,9 108 COMBOBOX 1138,179,13,32,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |108 COMBOBOX cmb3,179,13,32,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | 109 109 WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT 110 110 DEFPUSHBUTTON "OK",IDOK,218,6,40,14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON 111 111 PUSHBUTTON "Cancel",IDCANCEL,218,23,40,14,WS_GROUP | WS_TABSTOP 112 PUSHBUTTON "&Apply", 1026,218,40,40,14,WS_GROUP | WS_TABSTOP113 PUSHBUTTON "&Help" , 1038,218,57,40,14,WS_GROUP | WS_TABSTOP112 PUSHBUTTON "&Apply", psh3,218,40,40,14,WS_GROUP | WS_TABSTOP 113 PUSHBUTTON "&Help" , pshHelp,218,57,40,14,WS_GROUP | WS_TABSTOP 114 114 GROUPBOX "Effects",1072,6,72,84,34,WS_GROUP 115 CHECKBOX "Stri&keout", 1040, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP116 CHECKBOX "&Underline", 1041, 10,94,50,10, BS_AUTOCHECKBOX115 CHECKBOX "Stri&keout", chx1, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP 116 CHECKBOX "&Underline", chx2, 10,94,50,10, BS_AUTOCHECKBOX 117 117 LTEXT "&Color:", 1091 ,6,110,30,9 118 COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |118 COMBOBOX cmb4,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | 119 119 CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP 120 120 GROUPBOX "Sample",1073,98,72,160,49,WS_GROUP … … 150 150 DEFPUSHBUTTON "OK", 1, 4, 166, 44, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 151 151 PUSHBUTTON "Cancel", 2, 52, 166, 44, 14, WS_GROUP | WS_TABSTOP 152 PUSHBUTTON "Help", 1038,100,166, 44, 14152 PUSHBUTTON "Help", pshHelp,100,166, 44, 14 153 153 PUSHBUTTON "&Add to Custom Colors", 712/*1024*/, 152, 166, 142, 14, WS_GROUP | WS_TABSTOP 154 154 PUSHBUTTON "&Define Custom Colors >>", 719/*1025*/, 4, 150, 142, 14, WS_GROUP | WS_TABSTOP … … 163 163 { 164 164 LTEXT "Fi&nd What:", -1, 4, 8, 42, 8 165 EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP166 CHECKBOX "Match &Whole Word Only", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP167 CHECKBOX "Match &Case", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP168 GROUPBOX "Direction", 1072, 107, 26, 68, 28169 CONTROL "&Up", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12170 CONTROL "&Down", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12165 EDITTEXT edt1, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP 166 CHECKBOX "Match &Whole Word Only", chx1, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 167 CHECKBOX "Match &Case", chx2, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP 168 GROUPBOX "Direction", grp1, 107, 26, 68, 28 169 CONTROL "&Up", rad1, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12 170 CONTROL "&Down", rad2, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12 171 171 172 172 DEFPUSHBUTTON "&Find Next", IDOK, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON … … 182 182 { 183 183 LTEXT "Fi&nd What:", -1, 4, 9, 48, 8 184 EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP184 EDITTEXT edt1, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP 185 185 LTEXT "Re&place With:", -1, 4, 26, 48, 8 186 EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP187 CHECKBOX "Match &Whole Word Only", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP188 CHECKBOX "Match &Case", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP186 EDITTEXT edt2, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP 187 CHECKBOX "Match &Whole Word Only", chx1, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 188 CHECKBOX "Match &Case", chx2, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP 189 189 190 190 DEFPUSHBUTTON "&Find Next", IDOK, 174, 4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON -
trunk/src/comdlg32/colordlg.c
r6645 r6708 1 /* $Id: colordlg.c,v 1.4 2001-09-05 12:11:59 bird Exp $ */2 1 /* 3 2 * COMMDLG - Color Dialog -
trunk/src/comdlg32/filedlg.c
r6645 r6708 1 /* $Id: filedlg.c,v 1.6 2001-09-05 12:12:00 bird Exp $ */2 1 /* 3 2 * COMMDLG - File Dialogs -
trunk/src/comdlg32/filedlg95.c
r6645 r6708 1 /* $Id: filedlg95.c,v 1.24 2001-09-05 12:12:00 bird Exp $ */2 1 /* 3 2 * COMMDLG - File Open Dialogs Win95 look and feel 4 3 * 5 4 * FIXME: The whole concept of handling unicode is badly broken. 6 * 7 * 8 * 9 * 10 * 11 * 5 * many hook-messages expecting a pointer to a 6 * OPENFILENAMEA or W structure. With the current architecture 7 * we would have to convert the beast at every call to a hook. 8 * we have to find a better solution but if would likely cause 9 * a complete rewrite with after we shouldhandle the 10 * OPENFILENAME structure without any converting (jsch). 12 11 * 13 12 * FIXME: any hook gets a OPENFILENAMEA structure … … 78 77 79 78 #define IsHooked(fodInfos) \ 80 79 ((fodInfos->ofnInfos->Flags & OFN_ENABLEHOOK) && fodInfos->ofnInfos->lpfnHook) 81 80 /*********************************************************************** 82 81 * Data structure and global variables … … 87 86 HIMAGELIST hImgList; 88 87 int m_iIndent; /* Indentation index */ 89 LPITEMIDLIST pidlItem; /* absolute pidl of the item */ 88 LPITEMIDLIST pidlItem; /* absolute pidl of the item */ 90 89 91 90 } SFOLDER,*LPSFOLDER; … … 217 216 * GetFileName95 218 217 * 219 * Creates an Open common dialog box that lets the user select 218 * Creates an Open common dialog box that lets the user select 220 219 * the drive, directory, and the name of a file or set of files to open. 221 220 * … … 252 251 return FALSE; 253 252 } 254 253 255 254 /* old style hook messages */ 256 255 if (IsHooked(fodInfos)) … … 261 260 fodInfos->HookMsg.sharevistring = RegisterWindowMessageA(SHAREVISTRINGA); 262 261 } 263 262 264 263 lRes = DialogBoxIndirectParamA(COMMDLG_hInstance32, 265 264 (LPDLGTEMPLATEA) template, … … 271 270 if( lRes == -1) 272 271 return FALSE; 273 272 274 273 return lRes; 275 274 } … … 292 291 LPSTR lpstrSavDir = NULL; 293 292 DWORD dwFlags = 0; 294 295 /* Initialise FileOpenDlgInfos structure*/ 293 294 /* Initialise FileOpenDlgInfos structure*/ 296 295 fodInfos = (FileOpenDlgInfos*)MemAlloc(sizeof(FileOpenDlgInfos)); 297 296 ZeroMemory(fodInfos, sizeof(FileOpenDlgInfos)); 298 297 299 298 /* Pass in the original ofn */ 300 299 fodInfos->ofnInfos = ofn; 301 300 302 301 /* Save original hInstance value */ 303 302 hInstance = ofn->hInstance; … … 317 316 fodInfos->DlgInfos.dwDlgProp = 0; 318 317 fodInfos->DlgInfos.hwndCustomDlg = (HWND)NULL; 319 318 320 319 switch(iDlgType) 321 320 { … … 401 400 FileOpenDlgInfos *fodInfos; 402 401 HINSTANCE hInstance; 403 402 404 403 /* out arguments */ 405 404 LPWSTR lpstrFile = NULL; … … 438 437 /* filter is a list... title\0ext\0......\0\0 */ 439 438 s = ofn->lpstrFilter; 440 439 441 440 while (*s) s = s+strlenW(s)+1; 442 441 s++; … … 521 520 } 522 521 #endif 523 522 524 523 /* restore saved IN arguments and convert OUT arguments back */ 525 524 ofn->Flags = dwFlags; … … 599 598 SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left), 600 599 (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER); 601 600 602 601 hwndChild = GetWindow(hwndChildDlg,GW_CHILD); 603 602 if(hwndStc32) … … 616 615 { 617 616 if (GetWindowLongA( hwndChild, GWL_STYLE ) & WS_MAXIMIZE) 618 617 continue; 619 618 GetWindowRect(hwndChild,&rectCtrl); 620 619 MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2); 621 620 622 621 /* 623 622 Check the initial position of the controls relative to the initial … … 630 629 } 631 630 else if (rectCtrl.left >= rectTemp.right) 632 631 { 633 632 rectCtrl.left += ptMoveCtl.x; 634 633 } 635 634 else if (rectCtrl.top >= rectTemp.bottom) 636 635 { 637 638 639 640 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 641 642 636 rectCtrl.top += ptMoveCtl.y; 637 } 638 639 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 640 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 641 SWP_NOSIZE | SWP_NOZORDER ); 643 642 } 644 643 } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL); 645 644 } 646 645 hwndChild = GetWindow(hwndParentDlg,GW_CHILD); 647 646 648 647 if(hwndStc32) 649 648 { … … 666 665 rectCtrl.top += ptMoveCtl.y; 667 666 668 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 667 SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, 669 668 rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, 670 669 SWP_NOSIZE |SWP_NOZORDER ); 671 670 } 672 671 } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL); 673 } 672 } 674 673 } 675 674 } … … 687 686 { 688 687 case WM_INITDIALOG: 689 { 688 { 690 689 fodInfos = (FileOpenDlgInfos *)lParam; 691 690 lParam = (LPARAM) fodInfos->ofnInfos; … … 694 693 if(fodInfos && IsHooked(fodInfos)) 695 694 return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam); 696 return 0; 697 } 695 return 0; 696 } 698 697 } 699 698 700 699 if(fodInfos && IsHooked(fodInfos)) 701 return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam); 702 703 return DefWindowProcA(hwnd,uMsg,wParam,lParam); 700 return CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,hwnd,uMsg,wParam,lParam); 701 702 return DefWindowProcA(hwnd,uMsg,wParam,lParam); 704 703 } 705 704 … … 737 736 COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE); 738 737 return (HWND)NULL; 739 738 } 740 739 } 741 740 … … 743 742 if(hChildDlg) 744 743 { 745 ShowWindow(hChildDlg,SW_SHOW); 744 ShowWindow(hChildDlg,SW_SHOW); 746 745 return hChildDlg; 747 746 } … … 759 758 tmplate.cx = rectHwnd.right-rectHwnd.left; 760 759 tmplate.cy = rectHwnd.bottom-rectHwnd.top; 761 760 762 761 return CreateDialogIndirectParamA(fodInfos->ofnInfos->hInstance,&tmplate,hwnd,(DLGPROC)FileOpenDlgProcUserTemplate,(LPARAM)fodInfos); 763 762 } 764 763 return (HWND)NULL; 765 764 } 766 765 767 766 /*********************************************************************** 768 767 * SendCustomDlgNotificationMessage … … 785 784 { 786 785 OFNOTIFYA ofnNotify; 787 786 HRESULT ret; 788 787 ofnNotify.hdr.hwndFrom=hwndParentDlg; 789 788 ofnNotify.hdr.idFrom=0; 790 789 ofnNotify.hdr.code = uCode; 791 790 ofnNotify.lpOFN = fodInfos->ofnInfos; 792 793 794 795 791 TRACE("CALL NOTIFY for %x\n", uCode); 792 ret = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg,WM_NOTIFY,0,(LPARAM)&ofnNotify); 793 TRACE("RET NOTIFY\n"); 794 return ret; 796 795 } 797 796 return TRUE; … … 816 815 GetDlgItemTextA(hwnd,IDC_FILENAME,lpstrPath, sizeof(lpstrPath)); 817 816 lpstrFileSpec = (LPSTR)PathFindFileNameA(lpstrPath); 818 if (lpstrFileSpec==lpstrPath) 819 817 if (lpstrFileSpec==lpstrPath) 818 { 820 819 char lpstrCurrentDir[MAX_PATH]; 821 820 /* Prepend the current path */ … … 824 823 snprintf((LPSTR)lParam,(int)wParam,"%s\\%s",lpstrCurrentDir,lpstrPath); 825 824 reqSize=strlen(lpstrCurrentDir)+1+strlen(lpstrPath)+1; 826 } 827 else 828 825 } 826 else 827 { 829 828 lstrcpynA((LPSTR)lParam,(LPSTR)lpstrPath,(int)wParam); 830 829 reqSize=strlen(lpstrPath); … … 834 833 835 834 case CDM_GETFOLDERPATH: 836 835 SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrPath); 837 836 if ((LPSTR)lParam!=NULL) 838 837 lstrcpynA((LPSTR)lParam,lpstrPath,(int)wParam); … … 840 839 841 840 case CDM_GETSPEC: 842 841 reqSize=GetDlgItemTextA(hwnd,IDC_FILENAME,lpstrPath, sizeof(lpstrPath)); 843 842 lpstrFileSpec = (LPSTR)PathFindFileNameA(lpstrPath); 844 843 if ((LPSTR)lParam!=NULL) … … 847 846 848 847 case CDM_SETCONTROLTEXT: 849 850 851 848 if ( 0 != lParam ) 849 SetDlgItemTextA( hwnd, (UINT) wParam, (LPSTR) lParam ); 850 return TRUE; 852 851 853 852 case CDM_HIDECONTROL: … … 858 857 return TRUE; 859 858 } 860 859 861 860 /*********************************************************************** 862 861 * FileOpenDlgProc95 … … 869 868 TRACE("0x%04x 0x%04x\n", hwnd, uMsg); 870 869 #endif 871 870 872 871 switch(uMsg) 873 872 { … … 876 875 FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam; 877 876 878 /* Adds the FileOpenDlgInfos in the property list of the dialog 877 /* Adds the FileOpenDlgInfos in the property list of the dialog 879 878 so it will be easily accessible through a GetPropA(...) */ 880 881 882 fodInfos->DlgInfos.hwndCustomDlg =883 879 SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos); 880 881 fodInfos->DlgInfos.hwndCustomDlg = 882 CreateTemplateDialog((FileOpenDlgInfos *)lParam, hwnd); 884 883 885 884 FILEDLG95_InitControls(hwnd); 886 885 SendCustomDlgNotificationMessage(hwnd,CDN_INITDONE); 887 886 FILEDLG95_FillControls(hwnd, wParam, lParam); 888 887 SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE); 889 888 SetWindowPos(fodInfos->DlgInfos.hwndCustomDlg, HWND_BOTTOM, … … 903 902 } 904 903 return FALSE; 905 904 906 905 case WM_GETISHELLBROWSER: 907 906 return FILEDLG95_OnWMGetIShellBrowser(hwnd); … … 913 912 case WM_NOTIFY: 914 913 { 915 916 917 918 919 920 921 LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam; 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 lpdi->hinst = COMMDLG_hInstance32; 948 949 914 LPNMHDR lpnmh = (LPNMHDR)lParam; 915 UINT stringId = -1; 916 917 /* set up the button tooltips strings */ 918 if(TTN_GETDISPINFOA == lpnmh->code ) 919 { 920 LPNMTTDISPINFOA lpdi = (LPNMTTDISPINFOA)lParam; 921 switch(lpnmh->idFrom ) 922 { 923 /* Up folder button */ 924 case FCIDM_TB_UPFOLDER: 925 stringId = IDS_UPFOLDER; 926 break; 927 /* New folder button */ 928 case FCIDM_TB_NEWFOLDER: 929 stringId = IDS_NEWFOLDER; 930 break; 931 /* List option button */ 932 case FCIDM_TB_SMALLICON: 933 stringId = IDS_LISTVIEW; 934 break; 935 /* Details option button */ 936 case FCIDM_TB_REPORTVIEW: 937 stringId = IDS_REPORTVIEW; 938 break; 939 /* Desktop button */ 940 case FCIDM_TB_DESKTOP: 941 stringId = IDS_TODESKTOP; 942 break; 943 default: 944 stringId = 0; 945 } 946 lpdi->hinst = COMMDLG_hInstance32; 947 lpdi->lpszText = (LPSTR) stringId; 948 } 950 949 return FALSE; 951 950 } … … 979 978 { 980 979 { HINST_COMMCTRL, IDB_VIEW_SMALL_COLOR }, 981 { COMDLG32_hInstance, 800 } 980 { COMDLG32_hInstance, 800 } // desktop icon 982 981 }; 983 982 984 983 RECT rectTB; 985 984 986 985 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); 987 986 … … 997 996 MapWindowPoints( 0, hwnd,(LPPOINT)&rectTB,2); 998 997 999 fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL, 998 fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, (LPSTR) NULL, 1000 999 WS_CHILD | WS_GROUP | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE, 1001 0, 0, 150, 26, hwnd, (HMENU) IDC_TOOLBAR, COMMDLG_hInstance32, NULL); 1002 1003 SetWindowPos(fodInfos->DlgInfos.hwndTB, 0, 1004 1005 1000 0, 0, 150, 26, hwnd, (HMENU) IDC_TOOLBAR, COMMDLG_hInstance32, NULL); 1001 1002 SetWindowPos(fodInfos->DlgInfos.hwndTB, 0, 1003 rectTB.left,rectTB.top, rectTB.right-rectTB.left, rectTB.bottom-rectTB.top, 1004 SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER ); 1006 1005 1007 1006 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0); … … 1013 1012 1014 1013 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_ADDBUTTONSA, (WPARAM) 9,(LPARAM) &tbb); 1015 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0); 1014 SendMessageA(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0); 1016 1015 1017 1016 /* Set the window text with the text specified in the OPENFILENAME structure */ … … 1053 1052 are hidden and we are not using a custom template */ 1054 1053 if ( (fodInfos->ofnInfos->Flags & OFN_HIDEREADONLY) && 1055 (!(fodInfos->ofnInfos->Flags & 1054 (!(fodInfos->ofnInfos->Flags & 1056 1055 (OFN_SHOWHELP|OFN_ENABLETEMPLATE|OFN_ENABLETEMPLATEHANDLE)))) 1057 1056 { … … 1062 1061 /* subtract the height of the help button plus the space between 1063 1062 the help button and the cancel button to the height of the dialog */ 1064 SetWindowPos(hwnd, 0, 0, 0, rectDlg.right-rectDlg.left, 1065 (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom), 1063 SetWindowPos(hwnd, 0, 0, 0, rectDlg.right-rectDlg.left, 1064 (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom), 1066 1065 SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER); 1067 1066 } … … 1084 1083 { 1085 1084 LPITEMIDLIST pidlItemId = NULL; 1086 1085 1087 1086 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) lParam; 1088 1087 1089 TRACE("dir=%s file=%s\n", 1088 TRACE("dir=%s file=%s\n", 1090 1089 fodInfos->ofnInfos->lpstrInitialDir, fodInfos->ofnInfos->lpstrFile); 1091 1090 … … 1188 1187 /* Do not use the listview selection anymore */ 1189 1188 fodInfos->DlgInfos.dwDlgProp &= ~FODPROP_USEVIEW; 1190 return 0; 1189 return 0; 1191 1190 } 1192 1191 … … 1205 1204 SetWindowLongA(hwnd,DWL_MSGRESULT,(LONG)fodInfos->Shell.FOIShellBrowser); 1206 1205 1207 return TRUE; 1206 return TRUE; 1208 1207 } 1209 1208 … … 1211 1210 /*********************************************************************** 1212 1211 * FILEDLG95_OnOpenMultipleFiles 1213 * 1212 * 1214 1213 * Handles the opening of multiple files. 1215 1214 * … … 1228 1227 lpstrFile = fodInfos->ofnInfos->lpstrFile; 1229 1228 lpstrFile[0] = '\0'; 1230 1229 1231 1230 SHGetPathFromIDListA( fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathSpec ); 1232 1231 … … 1234 1233 ( fodInfos->ofnInfos->Flags & OFN_FILEMUSTEXIST)) 1235 1234 { 1236 LPSTR lpstrTemp = lpstrFileList; 1235 LPSTR lpstrTemp = lpstrFileList; 1237 1236 1238 1237 for ( nCount = 0; nCount < nFileCount; nCount++ ) … … 1259 1258 return FALSE; 1260 1259 } 1261 1260 1262 1261 /* move to the next file in the list of files */ 1263 1262 lpstrTemp += strlen(lpstrTemp) + 1; … … 1282 1281 * 1283 1282 * Ok button WM_COMMAND message handler 1284 * 1283 * 1285 1284 * If the function succeeds, the return value is nonzero. 1286 1285 */ … … 1323 1322 return FALSE; 1324 1323 } 1325 1324 1326 1325 if(nFileCount > 1) 1327 1326 { … … 1382 1381 to a folder if the path points to a directory or the last 1383 1382 valid element is a directory. 1384 1383 1385 1384 valid variables: 1386 1385 lpstrPathAndFile: cleaned up path … … 1432 1431 lpwstrTemp, sizeof(lpwstrTemp)/sizeof(WCHAR) ); 1433 1432 1434 1433 /* if the last element is a wildcard do a search */ 1435 1434 if(strpbrk(lpszTemp1, "*?") != NULL) 1436 1435 { 1437 1438 1439 1436 nOpenAction = ONOPEN_SEARCH; 1437 break; 1438 } 1440 1439 } 1441 1440 lpszTemp1 = lpszTemp; … … 1465 1464 TRACE("value\n"); 1466 1465 1467 1466 /* end dialog, return value */ 1468 1467 nOpenAction = ONOPEN_OPEN; 1469 1468 break; 1470 1469 } 1471 1472 1470 COMDLG32_SHFree(pidl); 1471 pidl = NULL; 1473 1472 } 1474 1473 else 1475 1474 { 1476 if(*lpszTemp)/* points to trailing null for last path element */1475 if(*lpszTemp) /* points to trailing null for last path element */ 1477 1476 { 1478 1479 1477 if(fodInfos->ofnInfos->Flags & OFN_PATHMUSTEXIST) 1478 { 1480 1479 FILEDLG95_OnOpenMessage(hwnd, 0, IDS_PATHNOTEXISTING); 1481 1482 1483 1480 break; 1481 } 1482 } 1484 1483 else 1485 1484 { 1486 1485 if(fodInfos->ofnInfos->Flags & OFN_FILEMUSTEXIST) 1487 1486 { 1488 1487 FILEDLG95_OnOpenMessage(hwnd, 0, IDS_FILENOTEXISTING); 1489 1490 1491 1492 1488 break; 1489 } 1490 } 1491 /* change to the current folder */ 1493 1492 nOpenAction = ONOPEN_OPEN; 1494 1493 break; 1495 1494 } 1496 1495 } … … 1528 1527 /* replace the current filter */ 1529 1528 if(fodInfos->ShellInfos.lpstrCurrentFilter) 1530 1529 MemFree((LPVOID)fodInfos->ShellInfos.lpstrCurrentFilter); 1531 1530 len = MultiByteToWideChar( CP_ACP, 0, lpszTemp, -1, NULL, 0 ); 1532 1531 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc(len * sizeof(WCHAR)); … … 1542 1541 TRACE("ONOPEN_BROWSE\n"); 1543 1542 { 1544 1543 IPersistFolder2 * ppf2; 1545 1544 if(SUCCEEDED(IShellFolder_QueryInterface( lpsf, &IID_IPersistFolder2, (LPVOID*)&ppf2))) 1546 1545 { … … 1548 1547 IPersistFolder2_GetCurFolder(ppf2, &pidlCurrent); 1549 1548 IPersistFolder2_Release(ppf2); 1550 1551 1552 1553 1554 1555 1549 if( ! COMDLG32_PIDL_ILIsEqual(pidlCurrent, fodInfos->ShellInfos.pidlAbsCurrent)) 1550 { 1551 IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser, pidlCurrent, SBSP_ABSOLUTE); 1552 } 1553 else if( nOpenAction == ONOPEN_SEARCH ) 1554 { 1556 1555 IShellView_Refresh(fodInfos->Shell.FOIShellView); 1557 1556 } 1558 1557 COMDLG32_SHFree(pidlCurrent); 1559 1558 } … … 1564 1563 TRACE("ONOPEN_OPEN %s\n", lpstrPathAndFile); 1565 1564 { 1566 /* add default extension */ 1567 if (fodInfos->ofnInfos->lpstrDefExt) 1568 { 1569 if (! *PathFindExtensionA(lpstrPathAndFile)) 1570 { 1571 strcat(lpstrPathAndFile, "."); 1572 strcat(lpstrPathAndFile, fodInfos->ofnInfos->lpstrDefExt); 1573 } 1574 } 1565 /* add default extension */ 1566 if (fodInfos->ofnInfos->lpstrDefExt) 1567 { 1568 if (! *PathFindExtensionA(lpstrPathAndFile)) 1569 { 1570 /* only add "." in case a default extension does exist */ 1571 if (*fodInfos->ofnInfos->lpstrDefExt != '\0') 1572 { 1573 strcat(lpstrPathAndFile, "."); 1574 strcat(lpstrPathAndFile, fodInfos->ofnInfos->lpstrDefExt); 1575 } 1576 } 1577 } 1575 1578 1576 1579 /* Check that the size of the file does not exceed buffer size. … … 1580 1583 { 1581 1584 LPSTR lpszTemp; 1582 1585 1583 1586 /* fill destination buffer */ 1584 1587 strcpy(fodInfos->ofnInfos->lpstrFile, lpstrPathAndFile); … … 1590 1593 lpszTemp = PathFindFileNameA(lpstrPathAndFile); 1591 1594 fodInfos->ofnInfos->nFileOffset = lpszTemp - lpstrPathAndFile; 1592 1595 1593 1596 /* set extension offset */ 1594 1597 lpszTemp = PathFindExtensionA(lpstrPathAndFile); 1595 1598 fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? lpszTemp - lpstrPathAndFile + 1 : 0; 1596 1599 1597 1600 /* set the lpstrFileTitle */ 1598 1601 if(fodInfos->ofnInfos->lpstrFileTitle) 1599 1602 { 1600 1603 LPSTR lpstrFileTitle = PathFindFileNameA(lpstrPathAndFile); 1601 1602 1604 strncpy(fodInfos->ofnInfos->lpstrFileTitle, lpstrFileTitle, fodInfos->ofnInfos->nMaxFileTitle); 1605 } 1603 1606 1604 1607 /* ask the hook if we can close */ 1605 1608 if(IsHooked(fodInfos)) 1606 1607 1608 1609 1609 { 1610 /* FIXME we are sending ASCII-structures. Does not work with NT */ 1611 /* first old style */ 1612 TRACE("---\n"); 1610 1613 CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook, 1611 1614 fodInfos->DlgInfos.hwndCustomDlg, 1612 1615 fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos); 1613 1614 1615 1616 1617 1618 1619 1616 if (GetWindowLongA(hwnd, DWL_MSGRESULT)) 1617 { 1618 TRACE("cancled\n"); 1619 ret = FALSE; 1620 goto ret; 1621 } 1622 } 1620 1623 1621 1624 TRACE("close\n"); 1622 1625 FILEDLG95_Clean(hwnd); 1623 1626 ret = EndDialog(hwnd, TRUE); 1624 1625 1627 } 1628 else 1626 1629 { 1627 1630 /* FIXME set error FNERR_BUFFERTOSMALL */ … … 1651 1654 1652 1655 /* 1653 * Initialisation of the FileOpenDialogInfos structure 1656 * Initialisation of the FileOpenDialogInfos structure 1654 1657 */ 1655 1658 … … 1662 1665 if (!(fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT)) 1663 1666 { 1664 fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL; 1667 fodInfos->ShellInfos.folderSettings.fFlags |= FWF_SINGLESEL; 1665 1668 } 1666 1669 fodInfos->ShellInfos.folderSettings.fFlags |= FWF_AUTOARRANGE | FWF_ALIGNLEFT; … … 1672 1675 1673 1676 /* Construct the IShellBrowser interface */ 1674 fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); 1675 1677 fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); 1678 1676 1679 return NOERROR; 1677 1680 } … … 1691 1694 1692 1695 if(SUCCEEDED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, 1693 1694 1695 1696 SVGIO_BACKGROUND, 1697 &IID_IContextMenu, 1698 (LPVOID*)&pcm))) 1696 1699 { 1697 1700 CMINVOKECOMMANDINFO ci; … … 1740 1743 LPITEMIDLIST pidl; 1741 1744 HRESULT hres; 1742 1745 1743 1746 TRACE("\n"); 1744 1747 … … 1773 1776 * FILEDLG95_FILETYPE_Init 1774 1777 * 1775 * Initialisation of the file type combo box 1778 * Initialisation of the file type combo box 1776 1779 */ 1777 1780 static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd) … … 1783 1786 if(fodInfos->ofnInfos->lpstrFilter) 1784 1787 { 1785 int nFilters = 0; 1788 int nFilters = 0; /* number of filters */ 1786 1789 LPSTR lpstrFilter; 1787 1790 LPCSTR lpstrPos = fodInfos->ofnInfos->lpstrFilter; … … 1789 1792 for(;;) 1790 1793 { 1791 /* filter is a list... title\0ext\0......\0\0 1794 /* filter is a list... title\0ext\0......\0\0 1792 1795 * Set the combo item text to the title and the item data 1793 1796 * to the ext … … 1797 1800 1798 1801 /* Get the title */ 1799 if(! *lpstrPos) break; 1802 if(! *lpstrPos) break; /* end */ 1800 1803 lpstrDisplay = lpstrPos; 1801 1804 lpstrPos += strlen(lpstrPos) + 1; 1802 1805 1803 1806 /* Copy the extensions */ 1804 if (! *lpstrPos) return E_FAIL; 1807 if (! *lpstrPos) return E_FAIL; /* malformed filter */ 1805 1808 if (!(lpstrExt = (LPSTR) MemAlloc(strlen(lpstrPos)+1))) return E_FAIL; 1806 1809 strcpy(lpstrExt,lpstrPos); 1807 1810 lpstrPos += strlen(lpstrPos) + 1; 1808 1811 1809 1812 /* Add the item at the end of the combo */ 1810 1813 CBAddString(fodInfos->DlgInfos.hwndFileTypeCB, lpstrDisplay); … … 1817 1820 * FIXME: lpstrCustomFilter not handled at all 1818 1821 */ 1819 1822 1820 1823 /* set default filter index */ 1821 1824 if(fodInfos->ofnInfos->nFilterIndex == 0 && fodInfos->ofnInfos->lpstrCustomFilter == NULL) … … 1825 1828 if ( fodInfos->ofnInfos->nFilterIndex > nFilters ) 1826 1829 fodInfos->ofnInfos->nFilterIndex = nFilters; 1827 1830 1828 1831 /* Set the current index selection. */ 1829 1832 CBSetCurSel(fodInfos->DlgInfos.hwndFileTypeCB, fodInfos->ofnInfos->nFilterIndex-1); 1830 1833 1831 1834 /* Get the corresponding text string from the combo box. */ 1832 1835 lpstrFilter = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, … … 1834 1837 1835 1838 if ((INT)lpstrFilter == CB_ERR) /* control is empty */ 1836 lpstrFilter = NULL; 1839 lpstrFilter = NULL; 1837 1840 1838 1841 if(lpstrFilter) 1839 1842 { 1840 1843 DWORD len; 1841 _strlwr(lpstrFilter); 1844 _strlwr(lpstrFilter); /* lowercase */ 1842 1845 len = MultiByteToWideChar( CP_ACP, 0, lpstrFilter, -1, NULL, 0 ); 1843 1846 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc( len * sizeof(WCHAR) ); … … 1943 1946 1944 1947 } 1945 1948 1946 1949 /*********************************************************************** 1947 1950 * FILEDLG95_LOOKIN_Init 1948 1951 * 1949 * Initialisation of the look in combo box 1952 * Initialisation of the look in combo box 1950 1953 */ 1951 1954 static HRESULT FILEDLG95_LOOKIN_Init(HWND hwndCombo) 1952 1955 { 1953 IShellFolder 1954 IEnumIDList 1955 LPITEMIDLIST 1956 IShellFolder *psfRoot, *psfDrives; 1957 IEnumIDList *lpeRoot, *lpeDrives; 1958 LPITEMIDLIST pidlDrives, pidlTmp, pidlTmp1, pidlAbsTmp; 1956 1959 1957 1960 LookInInfos *liInfos = MemAlloc(sizeof(LookInInfos)); … … 1983 1986 while (S_OK == IEnumIDList_Next(lpeRoot, 1, &pidlTmp, NULL)) 1984 1987 { 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 1988 FILEDLG95_LOOKIN_AddItem(hwndCombo, pidlTmp,LISTEND); 1989 1990 /* special handling for CSIDL_DRIVES */ 1991 if (COMDLG32_PIDL_ILIsEqual(pidlTmp, pidlDrives)) 1992 { 1993 if(SUCCEEDED(IShellFolder_BindToObject(psfRoot, pidlTmp, NULL, &IID_IShellFolder, (LPVOID*)&psfDrives))) 1994 { 1995 /* enumerate the drives */ 1996 if(SUCCEEDED(IShellFolder_EnumObjects(psfDrives, hwndCombo,SHCONTF_FOLDERS, &lpeDrives))) 1997 { 1998 while (S_OK == IEnumIDList_Next(lpeDrives, 1, &pidlTmp1, NULL)) 1999 { 2000 pidlAbsTmp = COMDLG32_PIDL_ILCombine(pidlTmp, pidlTmp1); 2001 FILEDLG95_LOOKIN_AddItem(hwndCombo, pidlAbsTmp,LISTEND); 2002 COMDLG32_SHFree(pidlAbsTmp); 2003 COMDLG32_SHFree(pidlTmp1); 2004 } 2005 IEnumIDList_Release(lpeDrives); 2006 } 2007 IShellFolder_Release(psfDrives); 2008 } 2009 } 2007 2010 COMDLG32_SHFree(pidlTmp); 2008 2011 } … … 2050 2053 { 2051 2054 ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 2052 0, 2053 &sfi, 2054 sizeof (SHFILEINFOA), 2055 SHGFI_PIDL | SHGFI_SMALLICON | 2056 SHGFI_OPENICON | SHGFI_SYSICONINDEX | 2057 SHGFI_DISPLAYNAME ); 2055 0, 2056 &sfi, 2057 sizeof (SHFILEINFOA), 2058 SHGFI_PIDL | SHGFI_SMALLICON | 2059 SHGFI_OPENICON | SHGFI_SYSICONINDEX | 2060 SHGFI_DISPLAYNAME ); 2058 2061 } 2059 2062 else 2060 2063 { 2061 2064 ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 2062 0, 2063 &sfi, 2065 0, 2066 &sfi, 2064 2067 sizeof (SHFILEINFOA), 2065 SHGFI_PIDL | SHGFI_SMALLICON | 2066 SHGFI_SYSICONINDEX | 2068 SHGFI_PIDL | SHGFI_SMALLICON | 2069 SHGFI_SYSICONINDEX | 2067 2070 SHGFI_DISPLAYNAME); 2068 2071 } … … 2087 2090 iIndentation = 0; 2088 2091 ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 2089 0, 2090 &sfi, 2091 sizeof (SHFILEINFOA), 2092 SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON 2092 0, 2093 &sfi, 2094 sizeof (SHFILEINFOA), 2095 SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON 2093 2096 | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME ); 2094 2097 … … 2110 2113 rectText.left = rectIcon.right; 2111 2114 rectText.top = 2112 2115 (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom - tm.tmHeight) / 2; 2113 2116 rectText.right = pDIStruct->rcItem.right + XTEXTOFFSET; 2114 2117 rectText.bottom = 2115 2116 2118 (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom + tm.tmHeight) / 2; 2119 2117 2120 /* Draw the icon from the image list */ 2118 2121 ImageList_Draw(ilItemImage, 2119 2122 sfi.iIcon, 2120 pDIStruct->hDC, 2121 rectIcon.left, 2122 rectIcon.top, 2123 ILD_TRANSPARENT ); 2123 pDIStruct->hDC, 2124 rectIcon.left, 2125 rectIcon.top, 2126 ILD_TRANSPARENT ); 2124 2127 2125 2128 /* Draw the associated text */ … … 2148 2151 { 2149 2152 LPSFOLDER tmpFolder; 2150 int iItem; 2153 int iItem; 2151 2154 2152 2155 iItem = CBGetCurSel(fodInfos->DlgInfos.hwndLookInCB); … … 2154 2157 if(!(tmpFolder = (LPSFOLDER) CBGetItemDataPtr(fodInfos->DlgInfos.hwndLookInCB, 2155 2158 iItem))) 2156 2159 return FALSE; 2157 2160 2158 2161 … … 2165 2168 break; 2166 2169 } 2167 2170 2168 2171 } 2169 2172 return FALSE; … … 2190 2193 if(!(liInfos = (LookInInfos *)GetPropA(hwnd,LookInInfosStr))) 2191 2194 return -1; 2192 2195 2193 2196 tmpFolder = MemAlloc(sizeof(SFOLDER)); 2194 2197 tmpFolder->m_iIndent = 0; … … 2205 2208 if(tmpFolder->m_iIndent > liInfos->iMaxIndentation) 2206 2209 liInfos->iMaxIndentation = tmpFolder->m_iIndent; 2207 2210 2208 2211 sfi.dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM; 2209 2212 SHGetFileInfoA((LPSTR)pidl, … … 2211 2214 &sfi, 2212 2215 sizeof(sfi), 2213 SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 2216 SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX 2214 2217 | SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED); 2215 2218 … … 2219 2222 { 2220 2223 int iItemID; 2221 2224 2222 2225 TRACE("-- Add %s at %u\n", sfi.szDisplayName, tmpFolder->m_iIndent); 2223 2226 … … 2245 2248 * FILEDLG95_LOOKIN_InsertItemAfterParent 2246 2249 * 2247 * Insert an item below its parent 2250 * Insert an item below its parent 2248 2251 */ 2249 2252 static int FILEDLG95_LOOKIN_InsertItemAfterParent(HWND hwnd,LPITEMIDLIST pidl) 2250 2253 { 2251 2254 2252 2255 LPITEMIDLIST pidlParent = GetParentPidl(pidl); 2253 2256 int iParentPos; … … 2304 2307 } 2305 2308 } 2306 2309 2307 2310 CBSetCurSel(hwnd,iItemPos); 2308 2311 liInfos->uSelectedItem = iItemPos; … … 2422 2425 if (nFileSelected >= 1) 2423 2426 { 2424 nLength += 3; 2427 nLength += 3; /* first and last quotes, trailing \0 */ 2425 2428 for ( nFileToOpen = 0; nFileToOpen < nFileSelected; nFileToOpen++ ) 2426 2429 { 2427 2430 pidl = GetPidlFromDataObject( fodInfos->Shell.FOIDataObject, nFileToOpen+1 ); 2428 2431 2429 2432 if (pidl) 2430 2433 { 2431 2434 /* get the total length of the selected file names*/ 2432 2435 lpstrTemp[0] = '\0'; … … 2434 2437 2435 2438 if ( ! IsPidlFolder(fodInfos->Shell.FOIShellFolder, pidl) ) /* Ignore folders */ 2436 2439 { 2437 2440 nLength += strlen( lpstrTemp ) + 3; 2438 2441 nFiles++; 2439 2442 } 2440 2443 COMDLG32_SHFree( pidl ); 2441 2444 } 2442 2445 } 2443 2446 } … … 2457 2460 2458 2461 if (pidl) 2459 2460 2462 { 2463 /* get the file name */ 2461 2464 lpstrTemp[0] = '\0'; 2462 2465 GetName( fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER, lpstrTemp ); 2463 2466 2464 2467 if (! IsPidlFolder(fodInfos->Shell.FOIShellFolder, pidl)) /* Ignore folders */ 2465 2468 { 2466 2469 if ( nFiles > 1) 2467 2470 { 2468 2471 *lpstrCurrFile++ = '\"'; 2469 2472 strcpy( lpstrCurrFile, lpstrTemp ); … … 2471 2474 strcpy( lpstrCurrFile, "\" " ); 2472 2475 lpstrCurrFile += 2; 2473 2474 2475 2476 } 2477 else 2478 { 2476 2479 strcpy( lpstrAllFile, lpstrTemp ); 2477 2478 2480 } 2481 } 2479 2482 COMDLG32_SHFree( (LPVOID) pidl ); 2480 2483 } 2481 2484 } 2482 2485 } … … 2496 2499 static HRESULT COMDLG32_StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl) 2497 2500 { 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2501 switch (src->uType) 2502 { 2503 case STRRET_WSTR: 2504 WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL); 2505 COMDLG32_SHFree(src->u.pOleStr); 2506 break; 2507 2508 case STRRET_CSTRA: 2509 lstrcpynA((LPSTR)dest, src->u.cStr, len); 2510 break; 2511 2512 case STRRET_OFFSETA: 2513 lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); 2514 break; 2515 2516 default: 2517 FIXME("unknown type!\n"); 2518 if (len) 2519 { 2520 *(LPSTR)dest = '\0'; 2521 } 2522 return(FALSE); 2523 } 2524 return S_OK; 2522 2525 } 2523 2526 … … 2529 2532 int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPSTR * lpstrFileList, UINT * sizeUsed) 2530 2533 { 2531 2532 UINT nStrCharCount = 0;/* index in src buffer */2533 UINT nFileIndex = 0;/* index in dest buffer */2534 UINT nFileCount = 0;/* number of files */2535 UINT nStrLen = 0;/* length of string in edit control */2536 LPSTR lpstrEdit;/* buffer for string from edit control */2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 } 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2534 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); 2535 UINT nStrCharCount = 0; /* index in src buffer */ 2536 UINT nFileIndex = 0; /* index in dest buffer */ 2537 UINT nFileCount = 0; /* number of files */ 2538 UINT nStrLen = 0; /* length of string in edit control */ 2539 LPSTR lpstrEdit; /* buffer for string from edit control */ 2540 2541 TRACE("\n"); 2542 2543 /* get the filenames from the edit control */ 2544 nStrLen = SendMessageA(fodInfos->DlgInfos.hwndFileName, WM_GETTEXTLENGTH, 0, 0); 2545 lpstrEdit = MemAlloc(nStrLen+1); 2546 GetDlgItemTextA(hwnd, IDC_FILENAME, lpstrEdit, nStrLen+1); 2547 2548 TRACE("nStrLen=%u str=%s\n", nStrLen, lpstrEdit); 2549 2550 /* we might get single filename without any '"', 2551 * so we need nStrLen + terminating \0 + end-of-list \0 */ 2552 *lpstrFileList = MemAlloc(nStrLen+2); 2553 *sizeUsed = 0; 2554 2555 /* build 0-delimited file list from filenames */ 2556 while ( nStrCharCount <= nStrLen ) 2557 { 2558 if ( lpstrEdit[nStrCharCount]=='"' ) 2559 { 2560 nStrCharCount++; 2561 while ((lpstrEdit[nStrCharCount]!='"') && (nStrCharCount <= nStrLen)) 2562 { 2563 (*lpstrFileList)[nFileIndex++] = lpstrEdit[nStrCharCount]; 2564 (*sizeUsed)++; 2565 nStrCharCount++; 2566 } 2567 (*lpstrFileList)[nFileIndex++] = '\0'; 2568 (*sizeUsed)++; 2569 nFileCount++; 2570 } 2571 nStrCharCount++; 2572 } 2573 2574 /* single, unquoted string */ 2575 if ((nStrLen > 0) && (*sizeUsed == 0) ) 2576 { 2577 strcpy(*lpstrFileList, lpstrEdit); 2578 nFileIndex = strlen(lpstrEdit) + 1; 2579 (*sizeUsed) = nFileIndex; 2580 nFileCount = 1; 2581 } 2582 2583 /* trailing \0 */ 2584 (*lpstrFileList)[nFileIndex] = '\0'; 2585 (*sizeUsed)++; 2586 2587 MemFree(lpstrEdit); 2588 return nFileCount; 2586 2589 } 2587 2590 … … 2626 2629 LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) 2627 2630 { 2628 2631 2629 2632 STGMEDIUM medium; 2630 2633 FORMATETC formatetc; 2631 2634 LPITEMIDLIST pidl = NULL; 2632 2635 2633 2636 TRACE("sv=%p index=%u\n", doSelected, nPidlIndex); 2634 2637 2635 2638 /* Set the FORMATETC structure*/ 2636 2639 SETDefFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); … … 2686 2689 * GetName 2687 2690 * 2688 * Get the pidl's display name (relative to folder) and 2691 * Get the pidl's display name (relative to folder) and 2689 2692 * put it in lpstrFileName. 2690 * 2693 * 2691 2694 * Return NOERROR on success, 2692 2695 * E_FAIL otherwise … … 2720 2723 * GetShellFolderFromPidl 2721 2724 * 2722 * pidlRel is the item pidl relative 2725 * pidlRel is the item pidl relative 2723 2726 * Return the IShellFolder of the absolute pidl 2724 2727 */ … … 2736 2739 if(SUCCEEDED(IShellFolder_BindToObject(psfParent, pidlAbs, NULL, &IID_IShellFolder, (LPVOID*)&psf))) 2737 2740 { 2738 2741 IShellFolder_Release(psfParent); 2739 2742 return psf; 2740 2743 } … … 2756 2759 2757 2760 TRACE("%p\n", pidl); 2758 2761 2759 2762 pidlParent = COMDLG32_PIDL_ILClone(pidl); 2760 2763 COMDLG32_PIDL_ILRemoveLastID(pidlParent); 2761 2764 2762 2765 return pidlParent; 2763 2766 } … … 2766 2769 * GetPidlFromName 2767 2770 * 2768 * returns the pidl of the file name relative to folder 2771 * returns the pidl of the file name relative to folder 2769 2772 * NULL if an error occurred 2770 2773 */ … … 2780 2783 if(!*lpcstrFileName) return NULL; 2781 2784 2782 MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH); 2785 MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH); 2783 2786 2784 2787 if(!lpsf) … … 2790 2793 else 2791 2794 { 2792 IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL); 2795 IShellFolder_ParseDisplayName(lpsf, 0, NULL, (LPWSTR)lpwstrDirName, &ulEaten, &pidl, NULL); 2793 2796 } 2794 2797 return pidl; … … 2799 2802 BOOL IsPidlFolder (LPSHELLFOLDER psf, LPITEMIDLIST pidl) 2800 2803 { 2801 2802 2803 2804 2805 2806 2807 2808 2809 2804 ULONG uAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER; 2805 HRESULT ret; 2806 2807 TRACE("%p, %p\n", psf, pidl); 2808 2809 ret = IShellFolder_GetAttributesOf( psf, 1, &pidl, &uAttr ); 2810 2811 TRACE("-- 0x%08lx 0x%08lx\n", uAttr, ret); 2812 /* see documentation shell 4.1*/ 2810 2813 return uAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER); 2811 2814 } … … 2842 2845 2843 2846 return bBrowseSelFolder; 2844 } 2847 } 2845 2848 2846 2849 /* -
trunk/src/comdlg32/filedlgbrowser.c
r6645 r6708 1 /* $Id: filedlgbrowser.c,v 1.9 2001-09-05 12:12:01 bird Exp $ */2 1 /* 3 2 * Implementation of IShellBrowser for the File Open common dialog -
trunk/src/comdlg32/filetitle.c
r6645 r6708 1 /* $Id: filetitle.c,v 1.5 2001-09-05 12:12:01 bird Exp $ */2 1 /* 3 2 * COMMDLG - File Dialogs -
trunk/src/comdlg32/finddlg32.c
r6645 r6708 1 /* $Id: finddlg32.c,v 1.4 2001-09-05 12:12:01 bird Exp $ */2 1 /* 3 2 * Common Dialog Boxes interface (32 bit) -
trunk/src/comdlg32/fontdlg.c
r6645 r6708 1 /* $Id: fontdlg.c,v 1.4 2001-09-05 12:12:02 bird Exp $ */2 1 /* 3 2 * COMMDLG - Font Dialog -
trunk/src/comdlg32/printdlg.c
r6645 r6708 1 /* $Id: printdlg.c,v 1.2 2001-09-05 12:12:02 bird Exp $ */2 1 /* 3 2 * COMMDLG - Print Dialog
Note:
See TracChangeset
for help on using the changeset viewer.