Leaked source code of windows server 2003
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.

459 lines
18 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_ERRORFILENAME "%s\nThe above filename is invalid."
  144. IDS_OUTOFMEM "Not enough memory available to complete this operation. Quit one or more applications to increase available memory, and then try again."
  145. IDS_FILEEXISTS "The file '%s' already exists. Do you want to overwrite it?"
  146. // IDS_BADFORMAT "Sound Recorder can only play files in the WAVE (.WAV) format."
  147. 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. "
  148. IDS_CANTOPENWAVEIN "Another application is recording audio. Stop recording with this other application and then try to record with Sound Recorder again."
  149. IDS_STATUSSTOPPED "Stopped"
  150. IDS_STATUSPLAYING "Playing"
  151. IDS_STATUSRECORDING "Recording -- Maximum Length %d%c%02d Seconds"
  152. IDS_INSERTFILE "Insert File"
  153. IDS_MIXWITHFILE "Mix With File"
  154. IDS_CONFIRMREVERT "Do you want to lose all changes since you last saved the file?"
  155. IDS_INPUTNOTSUPPORT "Your audio hardware does not support recording."
  156. IDS_BADINPUTFORMAT "Your audio hardware cannot record into files like the current file. To record, create a new document."
  157. IDS_BADOUTPUTFORMAT "Your audio hardware cannot play files like the current file."
  158. IDS_UPDATEBEFORESAVE "Update embedded object before saving to another file?"
  159. IDS_SAVEEMBEDDED "The command you have chosen will close the connection of this embedded object.\nUpdate '%s' before proceeding?"
  160. // IDS_CANTSTARTOLE "Windows does not recognize Sound Recorder as a server application. Try reinstalling Windows."
  161. IDS_NONEMBEDDEDSAVE "&Save"
  162. IDS_EMBEDDEDSAVE "&Update"
  163. // IDS_NONEMBEDDEDEXIT "E&xit"
  164. // IDS_FILENOTFOUND "The file '%s' does not exist. Make sure that the path and filename are correct."
  165. IDS_NOTAWAVEFILE "The file '%s' is not a valid WAVE sound file."
  166. IDS_NOTASUPPORTEDFILE "You cannot mix or insert '%s' because this file is incompatible with the current file."
  167. IDS_CANTPASTE "Sound Recorder cannot paste the contents of the clipboard into this file because their formats are incompatible."
  168. IDS_FILETOOLARGE "There is not enough memory available to load '%s'. Quit one or more application to increase available memory, and then try again."
  169. IDS_DELBEFOREWARN "All data before the position %s seconds will be deleted. Do you want to continue?"
  170. IDS_DELAFTERWARN "All data after the position %s seconds will be deleted. Do you want to continue?"
  171. IDS_UNTITLED "Sound"
  172. IDS_FILTERNULL "# do not localize this string"
  173. IDS_FILTER "Sounds (*.wav)#*.wav#All Files (*.*)#*.*#"
  174. IDS_OBJECTLINK "ObjectLink"
  175. IDS_OWNERLINK "OwnerLink"
  176. IDS_NATIVE "Native"
  177. IDS_FAKEITEMNAME "Wave"
  178. // IDS_CLASSROOT "Sound"
  179. // IDS_EMBEDDING "Embedding"
  180. IDS_POSITIONFORMAT "%d%c%02d sec."
  181. IDS_NOZEROPOSITIONFORMAT "%c%02d sec."
  182. 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."
  183. // IDS_SOUNDOBJECT "Sound in %s"
  184. IDS_CLIPBOARD "Clipboard"
  185. IDS_MONOFMT "Mono %d%c%03dkHz, %d-bit"
  186. IDS_NOZEROMONOFMT "Mono %c%03dkHz, %d-bit"
  187. IDS_STEREOFMT "Stereo %d%c%03dkHz, %d-bit"
  188. IDS_NOZEROSTEREOFMT "Stereo %c%03dkHz, %d-bit"
  189. // IDS_PLAYVERB "&Play"
  190. // IDS_EDITVERB "&Edit"
  191. IDS_DEFFILEEXT "WAV"
  192. IDS_NOACMNEW "&New"
  193. ID_REWINDBTN "Seek To Start"
  194. ID_FORWARDBTN "Seek To End"
  195. ID_PLAYBTN "Play"
  196. ID_STOPBTN "Stop"
  197. ID_RECORDBTN "Record"
  198. // IDS_LINKEDUPDATE "&Update Link"
  199. IDS_OBJECTTITLE "Sound Object in %s"
  200. IDS_EXITANDRETURN "E&xit && Return to %s"
  201. //
  202. // Registry fix-up stuff:
  203. //
  204. 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."
  205. IDS_FIXREGERROR "There was an error updating the registry."
  206. IDS_ERR_CANTCONVERT "Sound Recorder was unable to complete the conversion."
  207. IDS_PROPERTIES "Properties for %s"
  208. IDS_SHOWPLAYABLE "Playback formats"
  209. IDS_SHOWRECORDABLE "Recording formats"
  210. IDS_SHOWALL "All formats"
  211. IDS_DATASIZE "%u bytes"
  212. IDS_NOCOPYRIGHT "No Copyright information"
  213. IDS_PLAYVERB "&Play"
  214. IDS_EDITVERB "&Edit"
  215. IDS_OPENVERB "&Open"
  216. #ifdef CHICAGO
  217. IDS_MMSYSPROPTITLE "Audio Properties"
  218. IDS_MMSYSPROPTAB "Audio" // same
  219. #endif
  220. //
  221. // No compile enable of BIDI support
  222. //
  223. IDS_RTLENABLED "0=rtl"
  224. END
  225. /*
  226. * This is the primary modal dialog box for the application
  227. */
  228. #ifndef USE_MMCNTRLS
  229. //
  230. // common controls requires more vertical real estate
  231. //
  232. #define DTB 4
  233. #else
  234. //
  235. // mmcntrls requires less vertical real estate
  236. //
  237. #define DTB 0
  238. #endif
  239. IDD_SOUNDRECBOX DIALOG PRELOAD MOVEABLE DISCARDABLE 32768, 0, 180, 66
  240. CAPTION "Sound Recorder"
  241. CLASS "SoundRec"
  242. MENU AppMenu
  243. FONT 8, "MS Shell Dlg"
  244. STYLE WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
  245. BEGIN
  246. CONTROL "", -1, "shadowframe", WS_CHILD | WS_GROUP, 6, 4, 40, 23
  247. CONTROL "Position:", 302, "noflickertext", WS_CHILD | SS_CENTER,
  248. 8, 7, 36, 10
  249. CONTROL "0.0", ID_CURPOSTXT, "noflickertext", WS_CHILD | SS_CENTER,
  250. 8, 17, 36, 8
  251. CONTROL "", ID_WAVEDISPLAY, "wavedisplay", WS_CHILD, 52, 4, 76, 23
  252. CONTROL "", 304, "shadowframe", WS_CHILD, 134, 4, 40, 23
  253. CONTROL "Length:", 305, "noflickertext", WS_CHILD | SS_CENTER, 136,
  254. 7, 36, 10
  255. CONTROL "0.0", ID_FILELENTXT, "noflickertext", WS_CHILD | SS_CENTER,
  256. 136, 17, 36, 8
  257. CONTROL "", ID_CURPOSSCRL, TRACKBAR_CLASS, TBS_HORZ | TBS_NOTICKS |
  258. WS_TABSTOP | WS_CHILD | TBS_BOTH, 6, 30, 168, 20 -4
  259. CONTROL "", ID_REWINDBTN, "button", BS_OWNERDRAW |
  260. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 6, 48, 32, 15
  261. CONTROL "", ID_FORWARDBTN, "button", BS_OWNERDRAW |
  262. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 40, 48, 32, 15
  263. CONTROL "", ID_PLAYBTN, "button", BS_OWNERDRAW |
  264. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 74, 48, 32, 15
  265. CONTROL "", ID_STOPBTN, "button", BS_OWNERDRAW | BS_PUSHBUTTON |
  266. WS_TABSTOP | WS_CHILD, 108, 48, 32, 15
  267. CONTROL "", ID_RECORDBTN, "button", BS_OWNERDRAW |
  268. BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 142, 48, 32, 15
  269. END
  270. /*
  271. * Bring in the control definitions.
  272. */
  273. #ifndef CHICAGO
  274. #include <msacmdlg.h>
  275. #include <msacmdlg.dlg>
  276. #endif
  277. #ifdef CHICAGO
  278. /*
  279. * This is an extension template for the explorer view Save As common dialog.
  280. */
  281. IDD_SAVEAS DIALOG DISCARDABLE 0, 0, 331,20
  282. STYLE WS_CHILD | DS_CONTROL | DS_3DLOOK | WS_VISIBLE | WS_CLIPSIBLINGS
  283. FONT 8, "MS Shell Dlg"
  284. BEGIN
  285. LTEXT "Format:", IDC_TXT_FORMAT, 6, 2, 50, 9, SS_NOTIFY
  286. EDITTEXT IDC_CONVERT_TO, 55, 2, 105, 9, ES_AUTOHSCROLL |
  287. ES_READONLY | NOT WS_BORDER
  288. PUSHBUTTON "&Change...", IDC_CONVERTTO, 64+100, 0, 45, 14, WS_GROUP
  289. END
  290. #else
  291. /*
  292. * This is a custom Save As dialog.
  293. */
  294. #include <commdlg.h>
  295. #include <dlgs.h>
  296. #include "convert.h"
  297. #define LBS_DISABLENOSCROLL 0x1000L
  298. IDD_SAVEAS DIALOG LOADONCALL MOVEABLE DISCARDABLE
  299. 36, 24, 268, 150+14
  300. CAPTION "Open"
  301. STYLE WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_MODALFRAME
  302. FONT 8, "MS Shell Dlg"
  303. BEGIN
  304. LTEXT "File &name:", stc3, 6, 6, 76, 9
  305. CONTROL "", edt1, "edit", ES_LEFT | ES_AUTOHSCROLL | WS_BORDER |
  306. WS_TABSTOP | WS_CHILD | ES_OEMCONVERT,
  307. 6, 16, 90, 12
  308. CONTROL "", lst1, "listbox",
  309. LBS_SORT | LBS_HASSTRINGS | LBS_NOTIFY | LBS_DISABLENOSCROLL
  310. | WS_VSCROLL | WS_CHILD | WS_BORDER | WS_TABSTOP
  311. | LBS_OWNERDRAWFIXED,
  312. 6, 32, 90, 68
  313. LTEXT "&Folders:", -1, 110, 6, 96, 9
  314. LTEXT "", stc1, 110, 18, 96, 9, SS_NOPREFIX
  315. CONTROL "", lst2, "listbox",
  316. LBS_SORT | LBS_HASSTRINGS | LBS_NOTIFY | LBS_DISABLENOSCROLL
  317. | WS_VSCROLL | WS_CHILD | WS_BORDER | WS_TABSTOP
  318. | LBS_OWNERDRAWFIXED,
  319. 110, 32, 96, 68
  320. LTEXT "List files of &type:", stc2, 6, 104, 90, 9
  321. CONTROL "", cmb1, "combobox", CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
  322. WS_BORDER | WS_VSCROLL | WS_TABSTOP | WS_CHILD,
  323. 6, 114, 90, 96
  324. LTEXT "Dri&ves:", stc4, 110, 104, 96, 9
  325. CONTROL "", cmb2, "combobox",
  326. CBS_SORT | CBS_HASSTRINGS | CBS_OWNERDRAWFIXED | CBS_DROPDOWNLIST
  327. | WS_CHILD | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL
  328. | WS_TABSTOP,
  329. 110, 114, 96, 68
  330. DEFPUSHBUTTON "OK", IDOK, 212, 6, 50, 14, WS_GROUP
  331. PUSHBUTTON "Cancel", IDCANCEL, 212, 24, 50, 14, WS_GROUP
  332. PUSHBUTTON "&Help", pshHelp, 212, 46, 50, 14, WS_GROUP
  333. LTEXT "Format:", -1, 6, 132, 50, 9
  334. EDITTEXT IDC_CONVERT_TO, 6, 145, 190, 9, ES_AUTOHSCROLL |
  335. ES_READONLY | NOT WS_BORDER
  336. PUSHBUTTON "&Convert To...", IDC_CONVERTTO, 212, 143, 50, 14
  337. END
  338. #endif
  339. /*
  340. * This is a progress dialog to keep the user entertained during conversions
  341. */
  342. IDD_CONVERTING DIALOG DISCARDABLE 0, 0, 190, 80
  343. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_3DLOOK
  344. CAPTION "Converting"
  345. FONT 8, "MS Shell Dlg"
  346. BEGIN
  347. LTEXT "From:", -1, 10, 7, 130, 8
  348. EDITTEXT IDC_CONVERT_FROM, 10, 7+10, 180, 8, ES_AUTOHSCROLL |
  349. ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
  350. LTEXT "To:", -1, 10, 7+20, 130, 8
  351. EDITTEXT IDC_CONVERT_TO, 10, 7+30, 180, 8, ES_AUTOHSCROLL |
  352. ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
  353. CONTROL "", IDC_PROGRESSBAR, PROGRESS_CLASS, WS_CHILD,
  354. 10, 14+40, 170, 8
  355. DEFPUSHBUTTON "Cancel", IDCANCEL, 95-20, 24+40, 40, 14
  356. END
  357. /*
  358. * Properties of a Wave document
  359. */
  360. IDD_PROPERTIES DIALOG DISCARDABLE 0, 0, 230, 218
  361. STYLE DS_MODALFRAME | DS_NOIDLEMSG | WS_POPUP | WS_CAPTION
  362. CAPTION "Details"
  363. FONT 8, "MS Shell Dlg"
  364. BEGIN
  365. ICON IDI_DSOUND,IDC_DISPICON,7,7,18,20
  366. EDITTEXT IDC_FILENAME,69,11,151,12,ES_AUTOHSCROLL | ES_READONLY |
  367. NOT WS_BORDER | NOT WS_TABSTOP
  368. LTEXT "Copyright:",IDC_TXT_COPYRIGHT,7,42,49,9
  369. EDITTEXT IDC_COPYRIGHT,69,42,151,10, ES_AUTOHSCROLL | ES_READONLY |
  370. NOT WS_BORDER | NOT WS_TABSTOP
  371. LTEXT "Length:",IDC_TXT_FILELEN,7,56,49,9
  372. LTEXT "",IDC_FILELEN,69,56,151,9, NOT WS_TABSTOP
  373. LTEXT "Data Size:", IDC_TXT_DATASIZE,7, 56+14, 49, 9
  374. LTEXT "",IDC_DATASIZE,69,56+14,151,9, NOT WS_TABSTOP
  375. LTEXT "Audio Format:",IDC_TXT_AUDIOFORMAT,7,70+14,60,9
  376. EDITTEXT IDC_AUDIOFORMAT,69,70+14,151,10,ES_AUTOHSCROLL |
  377. ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
  378. GROUPBOX "Format Conversion", IDC_CONVGROUP, 7, 90+14, 212, 71,
  379. NOT WS_GROUP
  380. ICON IDI_CONVERT,-1, 14, 106+14, 18, 20
  381. LTEXT "To adjust the sound quality or use less space for this sound, click Convert Now.",
  382. IDC_STATIC, 40, 108+14, 160, 20
  383. LTEXT "C&hoose from:", -1, 40, 108+20+2+14, 60, 9
  384. COMBOBOX IDC_CONVERTCHOOSEFROM, 40, 108+20+10+2+14, 90, 40,
  385. CBS_DROPDOWNLIST | CBS_SORT
  386. | WS_VSCROLL | WS_TABSTOP
  387. PUSHBUTTON "&Convert Now...", IDC_CONVERTTO, 150, 125+14+14, 60, 14
  388. END