1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
|