Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

458 lines
17 KiB

  1. /* (C) Copyright Microsoft Corporation 1991. All Rights Reserved */
  2. /* SoundRec.rc
  3. */
  4. #include <windows.h>
  5. #include <winuser.h>
  6. #include "soundrec.h"
  7. #include "srecids.h"
  8. #include "helpids.h"
  9. #ifdef USE_MMCNTRLS
  10. #include <mmcntrls.h>
  11. #else
  12. #include <commctrl.h>
  13. #endif
  14. #include <commdlg.h>
  15. #include <dlgs.h>
  16. #include "convert.h"
  17. #include "soundrec.rcv"
  18. #include <o2base.hxx>
  19. #include "srs.hxx"
  20. IDI_APP ICON bmp\asound.ico // IDR_ICON
  21. IDI_DSOUND ICON bmp\dsound.ico
  22. IDI_CONVERT ICON bmp\convert.ico
  23. //
  24. // begin CLASSDESCRIPTOR data CG
  25. //
  26. IDR_MGW RCDATA
  27. BEGIN
  28. // LSW, MSW
  29. 0x0000, 0x0000, // File **not ours - must be 0**
  30. 0x0001, 0x0000, // Edit "Edit"
  31. 0x0000, 0x0000, // Container **not ours - must be 0**
  32. 0x0001, 0x0000, // Object "Options"
  33. 0x0000, 0x0000, // Window **not ours - must be 0**
  34. 0x0001, 0x0000, // Help "Help"
  35. END
  36. IDR_MISCSTATUS RCDATA
  37. BEGIN
  38. 0x0000, 0x0000 // OLEMISC_: 0x0010, 0x0000
  39. END
  40. //
  41. // end CLASSDESCRIPTOR data (but also see the string table) CG
  42. //
  43. IDR_PLAYBAR bitmap PRELOAD MOVEABLE DISCARDABLE BMP\sndrec32.bmp
  44. SOUNDREC ACCELERATORS PRELOAD
  45. BEGIN
  46. VK_INSERT, IDM_COPY, VIRTKEY, CONTROL
  47. VK_INSERT, IDM_PASTE_INSERT, VIRTKEY, SHIFT
  48. "^C", IDM_COPY
  49. "^V", IDM_PASTE_INSERT
  50. VK_ESCAPE, ID_STOPBTN, VIRTKEY
  51. #ifdef CHICAGO
  52. VK_F1, IDM_HELPTOPICS, VIRTKEY
  53. #endif
  54. END
  55. AppMenu MENU PRELOAD
  56. BEGIN
  57. POPUP "&File"
  58. BEGIN
  59. #ifdef CHICAGO
  60. MENUITEM "&New", IDM_NEW
  61. #else
  62. MENUITEM "&New...", IDM_NEW
  63. #endif
  64. MENUITEM "&Open...", IDM_OPEN
  65. MENUITEM "&Save", IDM_SAVE
  66. MENUITEM "Save &As...", IDM_SAVEAS
  67. MENUITEM "&Revert...", IDM_REVERT
  68. MENUITEM "&Properties", IDM_PROPERTIES
  69. MENUITEM SEPARATOR
  70. MENUITEM "E&xit", IDM_EXIT
  71. END
  72. POPUP "&Edit"
  73. BEGIN
  74. MENUITEM "&Copy\tCtrl+C" IDM_COPY
  75. MENUITEM "&Paste Insert\tCtrl+V" IDM_PASTE_INSERT
  76. MENUITEM "Paste Mi&x" IDM_PASTE_MIX
  77. MENUITEM SEPARATOR
  78. MENUITEM "&Insert File..." IDM_INSERTFILE
  79. MENUITEM "&Mix with File..." IDM_MIXWITHFILE
  80. MENUITEM SEPARATOR
  81. MENUITEM "Delete &Before Current Position" IDM_DELETEBEFORE
  82. MENUITEM "Delete &After Current Position" IDM_DELETEAFTER
  83. MENUITEM SEPARATOR
  84. MENUITEM "A&udio Properties", IDM_VOLUME
  85. #ifdef THRESHOLD
  86. MENUITEM SEPARATOR
  87. MENUITEM "Increase sound threshold" IDM_INCREASETHRESH
  88. MENUITEM "Decrease sound threshold" IDM_DECREASETHRESH
  89. #endif // THRESHOLD
  90. END
  91. POPUP "Effect&s"
  92. BEGIN
  93. MENUITEM "&Increase Volume (by 25%)" IDM_INCREASEVOLUME
  94. MENUITEM "&Decrease Volume" IDM_DECREASEVOLUME
  95. MENUITEM SEPARATOR
  96. MENUITEM "I&ncrease Speed (by 100%)" IDM_MAKEFASTER
  97. MENUITEM "D&ecrease Speed" IDM_MAKESLOWER
  98. MENUITEM SEPARATOR
  99. MENUITEM "&Add Echo" IDM_ADDECHO
  100. MENUITEM "&Reverse" IDM_REVERSE
  101. END
  102. POPUP "&Help"
  103. BEGIN
  104. #ifdef CHICAGO
  105. MENUITEM "&Help Topics" IDM_HELPTOPICS
  106. #else
  107. MENUITEM "&Contents\tF1" IDM_INDEX
  108. #endif
  109. MENUITEM SEPARATOR
  110. MENUITEM "&About Sound Recorder" IDM_ABOUT
  111. END
  112. END
  113. STRINGTABLE
  114. BEGIN
  115. //
  116. // begin CLASSDESCRIPTOR data CG
  117. //
  118. IDS_CLASSID "{00020C01-0000-0000-C000-000000000046}"
  119. #ifdef CHICAGO
  120. IDS_USERTYPEFULL "Wave Sound"
  121. IDS_USERTYPESHORT "Wave Sound"
  122. IDS_USERTYPEAPP "Sound Recorder"
  123. #else
  124. IDS_USERTYPEFULL "Sound Recorder Document"
  125. IDS_USERTYPESHORT "Sound"
  126. IDS_USERTYPEAPP "Microsoft Sound Recorder Server"
  127. #endif
  128. IDS_DOCFEXT ".wav"
  129. //
  130. // end CLASSDESCRIPTOR data CG
  131. //
  132. IDS_APPNAME "SoundRec"
  133. IDS_APPTITLE "Sound Recorder"
  134. IDS_HELPFILE "SOUNDREC.HLP"
  135. IDS_HTMLHELPFILE "SOUNDREC.CHM"
  136. IDS_SAVECHANGES "The file '%s' has been changed. Do you want to save these changes?"
  137. IDS_OPEN "Open"
  138. IDS_SAVE "Save As"
  139. IDS_ERROROPEN "Cannot open '%s'."
  140. IDS_ERROREMBED "Not enough memory available to complete this operation. Try opening a smaller sound file. Or quit one or more applications to increase available memory, and then try again."
  141. IDS_ERRORREAD "File '%s' has been corrupted and cannot be opened."
  142. IDS_ERRORWRITE "Not enough disk space to save the file '%s'.\n\nDelete one or more files to increase available disk space, or save the file to a different disk."
  143. IDS_OUTOFMEM "Not enough memory available to complete this operation. Quit one or more applications to increase available memory, and then try again."
  144. IDS_FILEEXISTS "The file '%s' already exists. Do you want to overwrite it?"
  145. // IDS_BADFORMAT "Sound Recorder can only play files in the WAVE (.WAV) format."
  146. IDS_CANTOPENWAVEOUT "Another application is playing audio. You can either interrupt the application or wait until it is done. Then try using Sound Recorder again. "
  147. IDS_CANTOPENWAVEIN "Another application is recording audio. Stop recording with this other application and then try to record with Sound Recorder again."
  148. IDS_STATUSSTOPPED "Stopped"
  149. IDS_STATUSPLAYING "Playing"
  150. IDS_STATUSRECORDING "Recording -- Maximum Length %d%c%02d Seconds"
  151. IDS_INSERTFILE "Insert File"
  152. IDS_MIXWITHFILE "Mix With File"
  153. IDS_CONFIRMREVERT "Do you want to lose all changes since you last saved the file?"
  154. IDS_INPUTNOTSUPPORT "Your audio hardware does not support recording."
  155. IDS_BADINPUTFORMAT "Your audio hardware cannot record into files like the current file. To record, create a new document."
  156. IDS_BADOUTPUTFORMAT "Your audio hardware cannot play files like the current file."
  157. IDS_UPDATEBEFORESAVE "Update embedded object before saving to another file?"
  158. IDS_SAVEEMBEDDED "The command you have chosen will close the connection of this embedded object.\nUpdate '%s' before proceeding?"
  159. // IDS_CANTSTARTOLE "Windows does not recognize Sound Recorder as a server application. Try reinstalling Windows."
  160. IDS_NONEMBEDDEDSAVE "&Save"
  161. IDS_EMBEDDEDSAVE "&Update"
  162. // IDS_NONEMBEDDEDEXIT "E&xit"
  163. // IDS_FILENOTFOUND "The file '%s' does not exist. Make sure that the path and filename are correct."
  164. IDS_NOTAWAVEFILE "The file '%s' is not a valid WAVE sound file."
  165. IDS_NOTASUPPORTEDFILE "You cannot mix or insert '%s' because this file is incompatible with the current file."
  166. IDS_CANTPASTE "Sound Recorder cannot paste the contents of the clipboard into this file because their formats are incompatible."
  167. IDS_FILETOOLARGE "There is not enough memory available to load '%s'. Quit one or more application to increase available memory, and then try again."
  168. IDS_DELBEFOREWARN "All data before the position %s seconds will be deleted. Do you want to continue?"
  169. IDS_DELAFTERWARN "All data after the position %s seconds will be deleted. Do you want to continue?"
  170. IDS_UNTITLED "Sound"
  171. IDS_FILTERNULL "# do not localize this string"
  172. IDS_FILTER "Sounds (*.wav)#*.wav#All Files (*.*)#*.*#"
  173. IDS_OBJECTLINK "ObjectLink"
  174. IDS_OWNERLINK "OwnerLink"
  175. IDS_NATIVE "Native"
  176. IDS_FAKEITEMNAME "Wave"
  177. // IDS_CLASSROOT "Sound"
  178. // IDS_EMBEDDING "Embedding"
  179. IDS_POSITIONFORMAT "%d%c%02d sec."
  180. IDS_NOZEROPOSITIONFORMAT "%c%02d sec."
  181. IDS_NOWAVEFORMS "Sound Recorder cannot record or play back because a sound device is not installed. To install a sound device, go to Control Panel, click Printers and Other Hardware, and then click Add Hardware."
  182. // IDS_SOUNDOBJECT "Sound in %s"
  183. IDS_CLIPBOARD "Clipboard"
  184. IDS_MONOFMT "Mono %d%c%03dkHz, %d-bit"
  185. IDS_NOZEROMONOFMT "Mono %c%03dkHz, %d-bit"
  186. IDS_STEREOFMT "Stereo %d%c%03dkHz, %d-bit"
  187. IDS_NOZEROSTEREOFMT "Stereo %c%03dkHz, %d-bit"
  188. // IDS_PLAYVERB "&Play"
  189. // IDS_EDITVERB "&Edit"
  190. IDS_DEFFILEEXT "WAV"
  191. IDS_NOACMNEW "&New"
  192. ID_REWINDBTN "Seek To Start"
  193. ID_FORWARDBTN "Seek To End"
  194. ID_PLAYBTN "Play"
  195. ID_STOPBTN "Stop"
  196. ID_RECORDBTN "Record"
  197. // IDS_LINKEDUPDATE "&Update Link"
  198. IDS_OBJECTTITLE "Sound Object in %s"
  199. IDS_EXITANDRETURN "E&xit && Return to %s"
  200. //
  201. // Registry fix-up stuff:
  202. //
  203. IDS_BADREG "Sound Recorder settings have been changed by another program. As a result, Sound Recorder may not work correctly.\n\nClick Yes if you would like to fix this problem now, otherwise click No."
  204. IDS_FIXREGERROR "There was an error updating the registry."
  205. IDS_ERR_CANTCONVERT "Sound Recorder was unable to complete the conversion."
  206. IDS_PROPERTIES "Properties for %s"
  207. IDS_SHOWPLAYABLE "Playback formats"
  208. IDS_SHOWRECORDABLE "Recording formats"
  209. IDS_SHOWALL "All formats"
  210. IDS_DATASIZE "%u bytes"
  211. IDS_NOCOPYRIGHT "No Copyright information"
  212. IDS_PLAYVERB "&Play"
  213. IDS_EDITVERB "&Edit"
  214. IDS_OPENVERB "&Open"
  215. #ifdef CHICAGO
  216. IDS_MMSYSPROPTITLE "Audio Properties"
  217. IDS_MMSYSPROPTAB "Audio" // same
  218. #endif
  219. //
  220. // No compile enable of BIDI support
  221. //
  222. IDS_RTLENABLED "0=rtl"
  223. END
  224. /*
  225. * This is the primary modal dialog box for the application
  226. */
  227. #ifndef USE_MMCNTRLS
  228. //
  229. // common controls requires more vertical real estate
  230. //
  231. #define DTB 4
  232. #else
  233. //
  234. // mmcntrls requires less vertical real estate
  235. //
  236. #define DTB 0
  237. #endif
  238. IDD_SOUNDRECBOX DIALOG PRELOAD MOVEABLE DISCARDABLE 32768, 0, 180, 66
  239. CAPTION "Sound Recorder"
  240. CLASS "SoundRec"
  241. MENU AppMenu
  242. FONT 8, "MS Shell Dlg"
  243. STYLE WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
  244. BEGIN
  245. CONTROL "", -1, "shadowframe", WS_CHILD | WS_GROUP, 6, 4, 40, 23
  246. CONTROL "Position:", 302, "noflickertext", WS_CHILD | SS_CENTER,
  247. 8, 7, 36, 10
  248. CONTROL "0.0", ID_CURPOSTXT, "noflickertext", WS_CHILD | SS_CENTER,
  249. 8, 17, 36, 8
  250. CONTROL "", ID_WAVEDISPLAY, "wavedisplay", WS_CHILD, 52, 4, 76, 23
  251. CONTROL "", 304, "shadowframe", WS_CHILD, 134, 4, 40, 23
  252. CONTROL "Length:", 305, "noflickertext", WS_CHILD | SS_CENTER, 136,
  253. 7, 36, 10
  254. CONTROL "0.0", ID_FILELENTXT, "noflickertext", WS_CHILD | SS_CENTER,
  255. 136, 17, 36, 8
  256. CONTROL "", ID_CURPOSSCRL, TRACKBAR_CLASS, TBS_HORZ | TBS_NOTICKS |
  257. WS_TABSTOP | WS_CHILD | TBS_BOTH, 6, 30, 168, 20 -4
  258. CONTROL "", ID_REWINDBTN, "button", BS_OWNERDRAW |
  259. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 6, 48, 32, 15
  260. CONTROL "", ID_FORWARDBTN, "button", BS_OWNERDRAW |
  261. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 40, 48, 32, 15
  262. CONTROL "", ID_PLAYBTN, "button", BS_OWNERDRAW |
  263. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 74, 48, 32, 15
  264. CONTROL "", ID_STOPBTN, "button", BS_OWNERDRAW | BS_PUSHBUTTON |
  265. WS_TABSTOP | WS_CHILD, 108, 48, 32, 15
  266. CONTROL "", ID_RECORDBTN, "button", BS_OWNERDRAW |
  267. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 142, 48, 32, 15
  268. END
  269. /*
  270. * Bring in the control definitions.
  271. */
  272. #ifndef CHICAGO
  273. #include <msacmdlg.h>
  274. #include <msacmdlg.dlg>
  275. #endif
  276. #ifdef CHICAGO
  277. /*
  278. * This is an extension template for the explorer view Save As common dialog.
  279. */
  280. IDD_SAVEAS DIALOG DISCARDABLE 0, 0, 331,20
  281. STYLE WS_CHILD | DS_CONTROL | DS_3DLOOK | WS_VISIBLE | WS_CLIPSIBLINGS
  282. FONT 8, "MS Shell Dlg"
  283. BEGIN
  284. LTEXT "Format:", IDC_TXT_FORMAT, 6, 2, 50, 9, SS_NOTIFY
  285. EDITTEXT IDC_CONVERT_TO, 55, 2, 105, 9, ES_AUTOHSCROLL |
  286. ES_READONLY | NOT WS_BORDER
  287. PUSHBUTTON "&Change...", IDC_CONVERTTO, 64+100, 0, 45, 14, WS_GROUP
  288. END
  289. #else
  290. /*
  291. * This is a custom Save As dialog.
  292. */
  293. #include <commdlg.h>
  294. #include <dlgs.h>
  295. #include "convert.h"
  296. #define LBS_DISABLENOSCROLL 0x1000L
  297. IDD_SAVEAS DIALOG LOADONCALL MOVEABLE DISCARDABLE
  298. 36, 24, 268, 150+14
  299. CAPTION "Open"
  300. STYLE WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_MODALFRAME
  301. FONT 8, "MS Shell Dlg"
  302. BEGIN
  303. LTEXT "File &name:", stc3, 6, 6, 76, 9
  304. CONTROL "", edt1, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER |
  305. WS_TABSTOP | WS_CHILD | ES_OEMCONVERT,
  306. 6, 16, 90, 12
  307. CONTROL "", lst1, "listbox",
  308. LBS_SORT | LBS_HASSTRINGS | LBS_NOTIFY | LBS_DISABLENOSCROLL
  309. | WS_VSCROLL | WS_CHILD | WS_BORDER | WS_TABSTOP
  310. | LBS_OWNERDRAWFIXED,
  311. 6, 32, 90, 68
  312. LTEXT "&Folders:", -1, 110, 6, 96, 9
  313. LTEXT "", stc1, 110, 18, 96, 9, SS_NOPREFIX
  314. CONTROL "", lst2, "listbox",
  315. LBS_SORT | LBS_HASSTRINGS | LBS_NOTIFY | LBS_DISABLENOSCROLL
  316. | WS_VSCROLL | WS_CHILD | WS_BORDER | WS_TABSTOP
  317. | LBS_OWNERDRAWFIXED,
  318. 110, 32, 96, 68
  319. LTEXT "List files of &type:", stc2, 6, 104, 90, 9
  320. CONTROL "", cmb1, "combobox", CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
  321. WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD,
  322. 6, 114, 90, 96
  323. LTEXT "Dri&ves:", stc4, 110, 104, 96, 9
  324. CONTROL "", cmb2, "combobox",
  325. CBS_SORT | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED | CBS_DROPDOWNLIST
  326. | WS_CHILD | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL
  327. | WS_TABSTOP,
  328. 110, 114, 96, 68
  329. DEFPUSHBUTTON "OK", IDOK, 212, 6, 50, 14, WS_GROUP
  330. PUSHBUTTON "Cancel", IDCANCEL, 212, 24, 50, 14, WS_GROUP
  331. PUSHBUTTON "&Help", pshHelp, 212, 46, 50, 14, WS_GROUP
  332. LTEXT "Format:", -1, 6, 132, 50, 9
  333. EDITTEXT IDC_CONVERT_TO, 6, 145, 190, 9, ES_AUTOHSCROLL |
  334. ES_READONLY | NOT WS_BORDER
  335. PUSHBUTTON "&Convert To...", IDC_CONVERTTO, 212, 143, 50, 14
  336. END
  337. #endif
  338. /*
  339. * This is a progress dialog to keep the user entertained during conversions
  340. */
  341. IDD_CONVERTING DIALOG DISCARDABLE 0, 0, 190, 80
  342. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_3DLOOK
  343. CAPTION "Converting"
  344. FONT 8, "MS Shell Dlg"
  345. BEGIN
  346. LTEXT "From:", -1, 10, 7, 130, 8
  347. EDITTEXT IDC_CONVERT_FROM, 10, 7+10, 180, 8, ES_AUTOHSCROLL |
  348. ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
  349. LTEXT "To:", -1, 10, 7+20, 130, 8
  350. EDITTEXT IDC_CONVERT_TO, 10, 7+30, 180, 8, ES_AUTOHSCROLL |
  351. ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
  352. CONTROL "", IDC_PROGRESSBAR, PROGRESS_CLASS, WS_CHILD,
  353. 10, 14+40, 170, 8
  354. DEFPUSHBUTTON "Cancel", IDCANCEL, 95-20, 24+40, 40, 14
  355. END
  356. /*
  357. * Properties of a Wave document
  358. */
  359. IDD_PROPERTIES DIALOG DISCARDABLE 0, 0, 230, 218
  360. STYLE DS_MODALFRAME | DS_NOIDLEMSG | WS_POPUP | WS_CAPTION
  361. CAPTION "Details"
  362. FONT 8, "MS Shell Dlg"
  363. BEGIN
  364. ICON IDI_DSOUND,IDC_DISPICON,7,7,18,20
  365. EDITTEXT IDC_FILENAME,69,11,151,12,ES_AUTOHSCROLL | ES_READONLY |
  366. NOT WS_BORDER | NOT WS_TABSTOP
  367. LTEXT "Copyright:",IDC_TXT_COPYRIGHT,7,42,49,9
  368. EDITTEXT IDC_COPYRIGHT,69,42,151,10, ES_AUTOHSCROLL | ES_READONLY |
  369. NOT WS_BORDER | NOT WS_TABSTOP
  370. LTEXT "Length:",IDC_TXT_FILELEN,7,56,49,9
  371. LTEXT "",IDC_FILELEN,69,56,151,9, NOT WS_TABSTOP
  372. LTEXT "Data Size:", IDC_TXT_DATASIZE,7, 56+14, 49, 9
  373. LTEXT "",IDC_DATASIZE,69,56+14,151,9, NOT WS_TABSTOP
  374. LTEXT "Audio Format:",IDC_TXT_AUDIOFORMAT,7,70+14,60,9
  375. EDITTEXT IDC_AUDIOFORMAT,69,70+14,151,10,ES_AUTOHSCROLL |
  376. ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
  377. GROUPBOX "Format Conversion", IDC_CONVGROUP, 7, 90+14, 212, 71,
  378. NOT WS_GROUP
  379. ICON IDI_CONVERT,-1, 14, 106+14, 18, 20
  380. LTEXT "To adjust the sound quality or use less space for this sound, click Convert Now.",
  381. IDC_STATIC, 40, 108+14, 160, 20
  382. LTEXT "C&hoose from:", -1, 40, 108+20+2+14, 60, 9
  383. COMBOBOX IDC_CONVERTCHOOSEFROM, 40, 108+20+10+2+14, 90, 40,
  384. CBS_DROPDOWNLIST | CBS_SORT
  385. | WS_VSCROLL | WS_TABSTOP
  386. PUSHBUTTON "&Convert Now...", IDC_CONVERTTO, 150, 125+14+14, 60, 14
  387. END