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
53
54
55
56
57
58
59
60
61
62
63
|
#pragma once
struct ToastData : public MZeroedObject
{
MCONTACT hContact;
TCHAR *tszTitle;
TCHAR *tszText;
union
{
HICON hIcon;
HBITMAP hBitmap;
};
int iType; // 0 = none, 1 = hBitmap, 2 = hIcon
WNDPROC pPopupProc;
void *vPopupData;
ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HICON _hIcon = NULL) :
hContact(_hContact),
tszTitle(mir_tstrdup(_tszTitle)),
tszText(mir_tstrdup(_tszText)),
hIcon(_hIcon),
iType(_hIcon ? 2 : 0) ,
pPopupProc(NULL),
vPopupData(NULL)
{}
ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HBITMAP bmp = NULL) :
hContact(_hContact),
tszTitle(mir_tstrdup(_tszTitle)),
tszText(mir_tstrdup(_tszText)),
hBitmap(bmp),
iType(bmp ? 1 : 0),
pPopupProc(NULL),
vPopupData(NULL)
{}
~ToastData()
{
mir_free(tszTitle);
mir_free(tszText);
}
};
struct ClassData : public MZeroedObject
{
int iFlags;
HICON hIcon;
WNDPROC pPopupProc;
ClassData(int f, HICON h = NULL) : iFlags(f), hIcon(h), pPopupProc(NULL)
{
}
};
struct ToastHandlerData : public MZeroedObject
{
MCONTACT hContact;
WNDPROC pPopupProc;
void *vPopupData;
ToastNotification *tstNotification;
};
|