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
|
#include "common.h"
CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog, HWND hwndParent)
: CSuper(proto, idDialog, hwndParent, false),
m_skypename(this, IDC_SKYPENAME), m_password(this, IDC_PASSWORD),
m_group(this, IDC_GROUP)
{
CreateLink(m_skypename, SKYPE_SETTINGS_ID, _T(""));
CreateLink(m_password, "Password", _T(""));
CreateLink(m_group, SKYPE_SETTINGS_GROUP, _T("Skype"));
}
void CSkypeOptionsMain::OnInitDialog()
{
CSuper::OnInitDialog();
SendMessage(m_skypename.GetHwnd(), EM_LIMITTEXT, 32, 0);
SendMessage(m_password.GetHwnd(), EM_LIMITTEXT, 20, 0);
SendMessage(m_group.GetHwnd(), EM_LIMITTEXT, 64, 0);
}
void CSkypeOptionsMain::OnApply()
{
TCHAR *group = m_group.GetText();
if (mir_tstrlen(group) > 0 && !Clist_GroupExists(group))
Clist_CreateGroup(0, group);
}
int CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
char *title = mir_t2a(m_tszUserName);
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = g_hInstance;
odp.pszTitle = title;
//odp.dwInitParam = (LPARAM)this;
odp.flags = ODPF_BOLDGROUPS | ODPF_DONTTRANSLATE;
odp.pszGroup = LPGEN("Network");
odp.pszTab = LPGEN("Account");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_MAIN);
odp.pfnDlgProc = CSkypeOptionsMain::DynamicDlgProc;
odp.dwInitParam = (LPARAM)&SkypeMainOptionsParam;
SkypeMainOptionsParam.create = CSkypeOptionsMain::CreateOptionsPage;
SkypeMainOptionsParam.param = this;
Options_AddPage(wParam, &odp);
mir_free(title);
return 0;
}
|