diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-15 09:41:03 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-15 09:41:03 +0000 |
commit | 1aa8530b2d4dfa6d6f424903fc67c87682a0267e (patch) | |
tree | 2ec9f4348c09bbd1a53c153863cd7aaa063ddd30 /protocols/SkypeWeb/src/skype_chatrooms.cpp | |
parent | c59762e958cc7f412379ce4b90d378f0c6b62022 (diff) |
SkypeWeb: Invite dialog -> core ui
git-svn-id: http://svn.miranda-ng.org/main/trunk@14563 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_chatrooms.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_chatrooms.cpp | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index a5f8d4aa61..275f86437f 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -178,7 +178,12 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam) switch (gch->dwData)
{
case 10: {
- MCONTACT hContact = (MCONTACT)DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_GC_INVITE), NULL, InviteDlgProc, (LPARAM)this);
+ CSkypeInviteDlg dlg(this);
+ if(!dlg.DoModal())
+ {
+ break;
+ }
+ MCONTACT hContact = dlg.m_hContact;
if (hContact != NULL)
{
ptrA username(db_get_sa(hContact, m_szModuleName, SKYPE_SETTINGS_ID));
@@ -668,43 +673,6 @@ INT_PTR CSkypeProto::GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return FALSE;
}
-INT_PTR CSkypeProto::InviteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- CSkypeProto *ppro = (CSkypeProto*)lParam;
- HWND hwndCombo = GetDlgItem(hwndDlg, IDC_CONTACT);
- for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
- if (ppro->isChatRoom(hContact)) continue;
- TCHAR *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
- int idx = SendMessage(hwndCombo, CB_ADDSTRING, 0, LPARAM(ptszNick));
- SendMessage(hwndCombo, CB_SETITEMDATA, idx, hContact);
- }
- SendMessage(hwndCombo, CB_SETCURSEL, 0, 0);
- }
- return TRUE;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDCANCEL:
- EndDialog(hwndDlg, 0);
- return TRUE;
-
- case IDOK:
- int idx = SendDlgItemMessage(hwndDlg, IDC_CONTACT, CB_GETCURSEL, 0, 0);
- if (idx != -1)
- EndDialog(hwndDlg, SendDlgItemMessage(hwndDlg, IDC_CONTACT, CB_GETITEMDATA, idx, 0));
- else
- EndDialog(hwndDlg, 0);
- return TRUE;
- }
- }
-
- return 0;
-}
-
void CSkypeProto::FilterContacts(HWND hwndDlg, CSkypeProto *ppro)
{
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
|