aboutsummaryrefslogtreecommitdiff
path: root/Src/auth/Loginbox/popupMessage.h
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/auth/Loginbox/popupMessage.h
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/auth/Loginbox/popupMessage.h')
-rw-r--r--Src/auth/Loginbox/popupMessage.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/Src/auth/Loginbox/popupMessage.h b/Src/auth/Loginbox/popupMessage.h
new file mode 100644
index 00000000..bed5dc5c
--- /dev/null
+++ b/Src/auth/Loginbox/popupMessage.h
@@ -0,0 +1,52 @@
+#ifndef NULLSOFT_AUTH_LOGINPOPUP_MESSAGE_HEADER
+#define NULLSOFT_AUTH_LOGINPOPUP_MESSAGE_HEADER
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+#include "./loginPopup.h"
+
+class LoginPopupMessage : public LoginPopup
+{
+public:
+ typedef enum
+ {
+ typeMask = 0x0000FFFF,
+ typeContinue = 0x00000000,
+ typeYesNo = 0x00000001,
+ iconMask = 0xFFFF0000,
+ iconInfo = 0x00000000,
+ iconWarning = 0x00010000,
+ iconError = 0x00020000,
+ } Type;
+
+ typedef void (CALLBACK *ResultCallback)(HWND /*hPopup*/, INT_PTR /*resultCode*/, LPARAM param);
+
+protected:
+ LoginPopupMessage(HWND hwnd);
+ ~LoginPopupMessage();
+
+public:
+ static HWND CreatePopup(HWND hParent, LPCWSTR pszTitle, LPCWSTR pszMessage, UINT uType, ResultCallback callback, LPARAM param);
+
+protected:
+ void UpdateLayout(BOOL fRedraw);
+ void EndDialog(INT_PTR code);
+
+ BOOL OnInitDialog(HWND hFocus, LPARAM param);
+ BOOL OnUpdateWindowPos(const RECT* clientRect, RECT *rectOut);
+
+protected:
+ ResultCallback callback;
+ LPARAM param;
+ INT szButtons[8];
+ UINT buttonsCount;
+
+private:
+ friend static HRESULT CALLBACK LoginPopupMessage_CreateInstance(HWND hwnd, LPARAM param, LoginPopup **instance);
+};
+
+
+
+#endif //NULLSOFT_AUTH_LOGINPOPUP_MESSAGE_HEADER \ No newline at end of file