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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
{
Miranda IM: the free IM client for Microsoft* Windows*
Copyright 2000-2006 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
{$IFNDEF M_USERINFOEX}
{$DEFINE M_USERINFOEX}
{*************************************************************
* Interfaces Module
}
const MIID_UIUSERINFOEX:MUUID='{9C23A24B-E6AA-43c6-B0B8-D6C36D2F7B57}';
const MIID_CONTACTINFO :MUUID='{17DBD7C9-450E-4000-BFB4-908A7EF4CE72}';
const MIID_REMINDER :MUUID='{02E890BD-278D-4890-918D-AB2CF5DC50BD}';
{*************************************************************
* PropertySheetPage Module
}
{ UserInfo/AddPage v0.1.0.0+
If the hIcon member of te optiondialogpage is valid, the tree show it for nicer look.
Otherwise the default icon is displayed for this treeitem.
}
const
// ODPF_UNICODE = 8; // string fields in OPTIONSDIALOGPAGE are WCHAR*
ODPF_ICON = 64; // the hIcon member of the option dialog page is valid
{ Handling notifications v0.1.0.4+
A dialogbox should call SetWindowLongPtr(hDlg, DWL_MSGRESULT, PSP_CHANGED) on a PSN_INFOCHANGED notification if
there are unsafed changes and apply button should keep enabled. Otherwise the changed status
of the dialogbox is resetted as well as the changed status of the details dialog box itself if no page
called this message. Because UserinfoEx now looks for changes in the settings of a user to keep the
shown inforamtion up to date.
}
PSP_CHANGED = 2;
PSN_ICONCHANGED = 2000;
{ PSM_GETBOLDFONT v0.1.0.3+
wParam=NULL
lParam=(HFONT*)&hFont
get bold dialog font. wParam is pointer to a handle that retrieves the boldfont.
You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the font.
This function returns TRUE on success or FALSE otherwise.
}
//!! PSM_GETBOLDFONT = WM_USER+102; //defined in m_options.inc
{ PSM_ISLOCKED v0.1.0.4+
Returns state of propertysheet. If it is locked, The PSM_CHANGED messages sent by a propertysheetpage does not
have any effect. To aVOID editcontrols, ... to check for changes on redrawing at a load of settings from database or
if another propertysheetpage is selected, a plugin should check this state and skip those checks to reduce stressing
the database if such a test if control's content changed does so.
wParam=NULL
lParam=NULL
You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the handle.
This function returns TRUE if the PropertySheet is locked or FALSE otherwise.
Example:
__inline BOOLEAN PspIsLocked(HWND hPsp)
HWND hPs = GetParent(hPsp);
return ((BOOLEAN)SendMessage((hPs), PSM_ISLOCKED, 0, 0) || GetWindowLongPtr((hPs), DWL_MSGRESULT) != 0);
}
PSM_ISLOCKED = WM_USER+901;
{ PSM_GETCONTACT v0.1.0.4+
You can get the handle to the contact the propertysheet is associated with by calling PSM_GETCONTACT
to the parent of your propertysheetpage - the propertysheet.
wParam=NULL
lParam=(HANDLE*)&hContact
You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the handle.
This function returns TRUE on success or FALSE otherwise.
}
PSM_GETCONTACT = WM_USER+903;
{ PSM_GETBASEPROTO v0.1.0.4+
You can get a pointer to the basic protocol module by sending PSM_GETBASEPROTO to the parent of your propertysheetpage.
wParam=NULL
lParam=(LPCSTR*)&szBaseProto
The propertysheet loads the basic contact protocol on creation for a better handling
of owners (ICQ) protocol used for changing details on the server. Should also reduce database traffic.
You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the protocol.
This function returns TRUE on success or FALSE otherwise.
}
PSM_GETBASEPROTO = WM_USER+905;
INDEX_CURPAGE = -1;
{ PSM_GETPAGEHWND v0.1.1.1+
retrieve the windowhandle for a propertysheetpage identified by its id
wParam=idDlg
lParam=hInstance
}
PSM_GETPAGEHWND = WM_USER+906;
{ PSM_DLGMESSAGE v0.1.1.1+
Send a message to a specified propertypage of the details dialog.
This enables communication between propertypages without the need to know
the window handles of each page.
}
type
PDLGCOMMAND = ^TDLGCOMMAND;
TDLGCOMMAND = record
hInst :HINST;
idDlg :word;
idDlgItem:word;
uMsg :uint;
wParam :WPARAM;
lParam :LPARAM;
end;
const
PSM_DLGMESSAGE = WM_USER+907;
(* PSM_ISAEROMODE v0.8.2.1+
This message can be sent to the propertysheet (details dialog) to examine,
whether the aero adaption mode is enabled or not. This message should be used in
each propertysheet page's dialog procedure as follows:
...
switch (msg) {
...
case WM_CTLCOLORSTATIC:
case WM_CTLCOLORDLG:
if (PSIsAeroMode(hDlg))
return (INT_PTR)GetStockBrush(WHITE_BRUSH);
break;
...
This will draw a propertysheet page with white background, if aero adaption is enabled.
wParam=not used
lParam=pointer to boolean bIsAero
*)
PSM_ISAEROMODE = (WM_USER+908);
{*************************************************************
* vCard Module
}
// UserInfo/vCardExport v0.1.0.4+
MS_USERINFO_VCARD_IMPORT:PAnsiChar = 'UserInfo/vCard/Import';
MS_USERINFO_VCARD_IMPORTALL:PAnsiChar = 'UserInfo/vCard/ImportAll';
// UserInfo/vCardImport v0.1.0.4+
MS_USERINFO_VCARD_EXPORT:PAnsiChar = 'UserInfo/vCard/Export';
// UserInfo/vCardImport v0.1.0.4+
MS_USERINFO_VCARD_EXPORTALL:PAnsiChar = 'UserInfo/vCard/ExportAll';
{*************************************************************
* time Module
}
{ UserInfo/LocalTime v0.1.0.3+
Computes the local time for the desired contact and writes it to lpst.
wParam=(WPARAM)hContact
lParam=(LPSYSTEMTIME)lpst
The service gets your windows box's local time, reads your timezoneinformation (Windows setting)
and hContact's timezone from his user details. With these information contact's local time is computed
considering daylightsaving time.
Return values are TRUE for success and FALSE if anything went wrong.
}
MS_USERINFO_LOCALTIME:PAnsiChar = 'UserInfo/LocalTime';
{ UserInfo/LocalTime v0.7.0.1+
This service provides the timezone information for a given contact
as known by windows, too. All but the DaylightName and StandardName members
of the class are filled out and can be used. The values are read
from the windows registry and therefore keep up to date if the latest
windows hotfixes are installed. There is no default API in the windows SDK
to solve this problem.
wParam=(WPARAM)hContact
lParam=(TIME_ZONE_INFORMATION*)tzi
Return values are 0 for success and 1 if no valid timezone is set for the contact.
}
MS_USERINFO_TIMEZONEINFO:PAnsiChar = 'UserInfo/TimezoneInfo';
{*************************************************************
* Reminder module
}
{ UserInfo/Reminder/Check v0.1.0.4+
This service checks if one of your contacts has birthday in the next few days
wParam = lParam = not used
}
MS_USERINFO_REMINDER_CHECK:PAnsiChar = 'UserInfo/Reminder/Check';
{ UserInfo/Reminder/Check v0.1.1.1+
This service creates a dialog, that lists all of the anniversaries
wParam = lParam = not used
}
MS_USERINFO_REMINDER_LIST:PAnsiChar = 'UserInfo/Reminder/List';
{ UserInfo/Reminder/Check v0.1.2.16+
This service compares birthday date which is set by the protocol module of each contact
to the first found custom set birthday date. If a difference is detected, the user is asked
whether to update the custom set birthday by the one of the protocol or not.
If no custom birthday is set yet and the protocol contains a valid birthday, it is copied to
primary custom module (e.g.: mBirthday or UserInfo).
wParam = handle to single contact or NULL to backup all
lParam = not used
}
MS_USERINFO_REMINDER_AGGRASIVEBACKUP:PAnsiChar = 'UserInfo/Reminder/AggrassiveBackup';
{ UserInfo/Refresh v0.7.0.1+
This service calls PSS_GETINFO for all contacts in the contact list
wParam = not used
lParam = not used
}
MS_USERINFO_REFRESH:PAnsiChar = 'UserInfo/Refresh';
{*************************************************************
* Uinfobuttonclass module
}
// button styles
MBS_DEFBUTTON = $00001000; // default button
MBS_PUSHBUTTON = $00002000; // toggle button
MBS_FLAT = $00004000; // flat button
MBS_DOWNARROW = $00008000; // has arrow on the right
MBF_UNICODE = 1;
// BUTTONADDTOOLTIP
// use lParam=MBF_UNICODE to set unicode tooltips
// for lParam=0 the string is interpreted as ansi
// message to explicitly translate the buttons text,
// as it is not done by default translation routine
// wParam=lParam=NULL
BUTTONTRANSLATE = WM_USER+6;
{ UserInfo/MsgBox v0.1.0.4+
Slightly modified version of MButtonClass, to draw both text and icon in a button control
}
UINFOBUTTONCLASS = 'UInfoButtonClass';
(*!! DELETED
{*************************************************************
* Messagebox module
}
{ UserInfo/MsgBox v0.1.0.3+
Some little changed message box for nicer look of miranda's messages or questions :-)
wParam=hContact - can be null
lParam=(TMsgBox* )pMsg - structure that holds information about the look of the message dialog
uType member of TMsgBox can be a combination of the following values, where most of them are defined in winuser.h:
MB_OK
MB_OKCANCEL
MB_YESALLNO
MB_YESNO
For valid icon values use one of the following MB_ICON_...
Funktion returns: IDOK, IDYES, IDALL, IDNO or IDCANCEL
}
MB_YESALLNO = $00000007;
MB_UNICODE = $10000000;
{
valid predefined icon values
}
MB_ICON_NONE = $00000000;
MB_ICON_ERROR = $00000010;
MB_ICON_QUESTION = $00000020;
MB_ICON_WARNING = $00000030;
MB_ICON_INFO = $00000040;
MB_ICON_OTHER = $000000F0; // use icon TMsgBox->hiMsg
type
PMsgBox = ^TMsgBox;
TMsgBox = record
uSize :uint; // size of this structure
uType :uint; // parameters
hiLogo :HICON; // right upper icon of the info bar
hiMsg :HICON; // icon left next to the message text
szTitle :TCHAR; // dialog window title text
szInfoText:TCHAR; // text of the infobar on the top of the dialog
szMsg :TCHAR; // the message text
hParent :hwnd; // parent window for the messagebox
end;
const
MS_MSGBOX:PAnsiChar = 'UserInfo/MsgBox';
*)
{*************************************************************
* contact info module
}
// additional information which can be retrieved with this service
CNF_COPHONE = 55; // returns company phone (string)
CNF_COFAX = 40; // returns company fax (string)
CNF_COCELLULAR = 41; // returns company cellular (string)
CNF_COEMAIL = 42; // returns company email address (string)
{ CNF_BIRTHDATE v0.1.2.18+
returns a formated string with the birthdate in it
wParam - 1 for long dateformat, 0 for short dateformat
lParam - CONTACTINFO structure as for all other fields, too
returns 0 on success and 1 on failure
}
CNF_BIRTHDATE = 43; // returns date of birth (string)
{*************************************************************
* extended integration module
}
{ UserInfo/Homepage/OpenURL v0.1.2.19+
This service reads the contact's homepage from UserInfo module or contact's protocol module
and opens the default browser to show it.
wParam=hContact - handle to contact whose homepage is to show
lParam=not used
}
MS_USERINFO_HOMEPAGE_OPENURL:PAnsiChar = 'UserInfo/Homepage/OpenURL';
{*************************************************************
* extended database module
*}
{ DB/Contact/GetSettingStrEx v0.7.0.1+
This service function reads a database setting from USERINFO module.
If the setting does not exist, it is looked up in 'pszProto'.
If 'hContact' points to a MetaContact, the setting is recursivly
searched in all sub contacts, too, starting with the default contact,
if the MetaContact does not directly provide the setting.
This service can directly replace the default MS_DB_CONTACT_GETSETTING_STR
for reading contact information from the database.
There will be no difference for the user but the possible source of information.
This service can be used to retrieve all kinds of settings!
Some versions of the default MS_DB_CONTACT_GETSETTING_STR service return
an error for BYTE, WORD and DWORD values if cgs.pValue->type is not 0.
wParam = (WPARAM)(HANDLE)hContact
lParam = (LPARAM)(DBCONTACTGETSETTING*)&cgs
This service returns one of the results of MS_DB_CONTACT_GETSETTING_STR!
}
MS_DB_CONTACT_GETSETTING_STR_EX:PAnsiChar = 'DB/Contact/GetSettingStrEx';
{$ENDIF}
|