cddbui.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef NULLSOFT_CDDB_UI_HEADER
  2. #define NULLSOFT_CDDB_UI_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <windows.h>
  7. #define AUTOCLOSE_NOW 0x00000000
  8. #define AUTOCLOSE_NEVER 0xFFFFFFFF
  9. #define STATE_INACTIVE ((UINT)0)
  10. #define STATE_ACTIVE ((UINT)1)
  11. #define STATE_COMPLETED ((UINT)2)
  12. #define STATE_ABORTING ((UINT)3)
  13. typedef void (CALLBACK *CDDBDLG_ONBTNCLICK)(HWND /*hwndDlg*/, BSTR /*bstrUser*/); // return TRUE to close dialog or FALSE to stay in STATE_ABORTING
  14. // all functions can accept String IDS and will resolve it using WASABI_API_LNGSTRINGW
  15. HWND CddbProgressDlg_Create(HWND hwndParent, INT nCmdShow);
  16. BOOL CddbProgressDlg_Initialize(HWND hwnd, LPCWSTR pszCaption, CDDBDLG_ONBTNCLICK fnOnAbort, BSTR bstrAbortUser); //
  17. BOOL CddbProgressDlg_Completed(HWND hwnd, LPCWSTR pszResult, LPCWSTR pszReason, DWORD nAutoCloseDelay, HRESULT rCode);
  18. BOOL CddbProgressDlg_SetStatus(HWND hwnd, LPCWSTR pszStatus, INT nPercentCompleted);
  19. BOOL CddbProgressDlg_EnableAbortButton(HWND hwnd, BOOL bEnable);
  20. BOOL CddbProgressDlg_ShowButton1(HWND hwnd, LPCWSTR pszCaption, CDDBDLG_ONBTNCLICK fnOnButton1, BSTR bstrUser); // set pszCaption = NULL and/or fnOnButton1 = NULL to hide it
  21. UINT CddbProgressDlg_GetState(HWND hwnd);
  22. BOOL CddbProgressDlg_SetUserData(HWND hwnd, HANDLE user);
  23. HANDLE CddbProgressDlg_GetUserData(HWND hwnd);
  24. BOOL CddbProgressDlg_ShowInTaskbar(HWND hwnd, BOOL bShow);
  25. BOOL CddbProgressDlg_SetExtendedMode(HWND hwnd, BOOL bEnable);
  26. BOOL CddbProgressDlg_AddRecord(HWND hwnd, LPCWSTR pszArtist, LPCWSTR pszTitle, LPCWSTR pszLanguage);
  27. INT CddbProgressDlg_GetSelRecordIndex(HWND hwnd);
  28. HRESULT CddbProgressDlg_DoModal(HWND hwnd, RECT *prc); // if prc != NULL will contain window rect before it closed
  29. BOOL CddbProgressDlg_ExitModal(HWND hwnd, HRESULT rCode, BOOL bDestroy); /// exits modal loop without destroying window
  30. BOOL CddbProgressDlg_IsModal(HWND hwnd);
  31. #define FINDWND_ONLY_VISIBLE 0x01
  32. #define FINDWND_ONLY_ENABLED 0x02
  33. BOOL FindAllOwnedWindows(HWND hwndHost, HWND *hwndList, INT cList, UINT flags);
  34. #endif //NULLSOFT_CDDB_UI_HEADER