About.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. ** Copyright © 2007-2014 Winamp SA
  3. **
  4. ** This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
  5. ** liable for any damages arising from the use of this software.
  6. **
  7. ** Permission is granted to anyone to use this software for any purpose, including commercial applications, and to
  8. ** alter it and redistribute it freely, subject to the following restrictions:
  9. **
  10. ** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
  11. ** If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  12. **
  13. ** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  14. **
  15. ** 3. This notice may not be removed or altered from any source distribution.
  16. **
  17. ** Author: Ben Allison [email protected]
  18. ** Created: March 1, 2007
  19. **
  20. */
  21. #include "main.h"
  22. #include "../Agave/Language/api_language.h"
  23. #include "resource.h"
  24. #include <FLAC/all.h>
  25. #include <strsafe.h>
  26. static HMODULE libflac=0;
  27. static char defaultVersionString[64];
  28. static const char **versionString=0;
  29. static const char *GetFLACVersion()
  30. {
  31. return "1.4.2";
  32. }
  33. int DoAboutMessageBox(HWND parent, wchar_t* title, wchar_t* message)
  34. {
  35. MSGBOXPARAMSW msgbx = {sizeof(MSGBOXPARAMSW),0};
  36. msgbx.lpszText = message;
  37. msgbx.lpszCaption = title;
  38. msgbx.lpszIcon = MAKEINTRESOURCEW(102);
  39. msgbx.hInstance = GetModuleHandle(0);
  40. msgbx.dwStyle = MB_USERICON;
  41. msgbx.hwndOwner = parent;
  42. return MessageBoxIndirectW(&msgbx);
  43. }
  44. void About(HWND hwndParent)
  45. {
  46. wchar_t message[1024] = {0};
  47. StringCchPrintfW(message, 1024, WASABI_API_LNGSTRINGW(IDS_ABOUT_TEXT),
  48. plugin.description, __DATE__, GetFLACVersion());
  49. DoAboutMessageBox(hwndParent,(wchar_t*)plugin.description,message);
  50. }