summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2016-03-31 07:25:52 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2016-03-31 07:25:52 +0000
commita2be5d69812652e513b604e393a057626ff52104 (patch)
tree8bfb747c1034ab6bab462610fbb4aa1b0eda5832
parentb4d1a98542c63747d1f7287be63779f054fa85da (diff)
VKontakte:
chat create dialog -> core ui chat invite dialog -> core ui rename dialog classes code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@16566 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/VKontakte/src/vk_captcha.cpp2
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp141
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp138
-rw-r--r--protocols/VKontakte/src/vk_dialogs.h39
-rw-r--r--protocols/VKontakte/src/vk_wallpost.cpp2
5 files changed, 170 insertions, 152 deletions
diff --git a/protocols/VKontakte/src/vk_captcha.cpp b/protocols/VKontakte/src/vk_captcha.cpp
index 59fec9fac8..feabeaa00b 100644
--- a/protocols/VKontakte/src/vk_captcha.cpp
+++ b/protocols/VKontakte/src/vk_captcha.cpp
@@ -59,7 +59,7 @@ bool CVkProto::RunCaptchaForm(LPCSTR szUrl, CMStringA &result)
param.h = bmp.bmHeight;
}
- CaptchaForm dlg(this, &param);
+ CVkCaptchaForm dlg(this, &param);
if (!dlg.DoModal())
return false;
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 6be3455d39..f486af926a 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -547,42 +547,6 @@ void CVkProto::OnSendChatMsg(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
/////////////////////////////////////////////////////////////////////////////////////////
-static INT_PTR CALLBACK InviteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- CVkProto *ppro = (CVkProto*)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)) {
- 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;
-}
-
LPTSTR CVkProto::ChangeChatTopic(CVkChatInfo *cc)
{
ENTER_STRING pForm = { sizeof(pForm) };
@@ -611,13 +575,15 @@ void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch)
break;
case IDM_INVITE:
- hContact = (MCONTACT)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INVITE), NULL, InviteDlgProc, (LPARAM)this);
- if (hContact != NULL) {
- int uid = getDword(hContact, "ID", -1);
- if (uid != -1)
- Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.addChatUser.json", true, &CVkProto::OnReceiveSmth)
- << INT_PARAM("user_id", uid)
- << INT_PARAM("chat_id", cc->m_chatid));
+ {
+ CVkInviteChatForm dlg(this);
+ if (dlg.DoModal() && dlg.m_hContact != NULL) {
+ int uid = getDword(dlg.m_hContact, "ID", -1);
+ if (uid != -1)
+ Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.addChatUser.json", true, &CVkProto::OnReceiveSmth)
+ << INT_PARAM("user_id", uid)
+ << INT_PARAM("chat_id", cc->m_chatid));
+ }
}
break;
@@ -949,98 +915,17 @@ void CVkProto::StopChatContactTyping(int iChatId, int iUserId)
// After that I call standard cleaning procedure:
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact);
-
}
}
/////////////////////////////////////////////////////////////////////////////////////////
-static void FilterContacts(HWND hwndDlg, CVkProto *ppro)
-{
- HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- char *proto = GetContactProto(hContact);
- if (mir_strcmp(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact))
- if (HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0))
- SendMessage(hwndClist, CLM_DELETEITEM, (WPARAM)hItem, 0);
- }
-}
-
-static void ResetOptions(HWND hwndDlg)
-{
- HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
- SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- SendMessage(hwndClist, CLM_GETHIDEOFFLINEROOT, 1, 0);
-}
-
-static INT_PTR CALLBACK GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- CVkProto *ppro = (CVkProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- NMCLISTCONTROL* nmc;
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- ppro = (CVkProto*)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- {
- HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
- SetWindowLongPtr(hwndClist, GWL_STYLE,
- GetWindowLongPtr(hwndClist, GWL_STYLE) | CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE | CLS_GROUPCHECKBOXES);
- SendMessage(hwndClist, CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
-
- ResetOptions(hwndDlg);
- }
- return TRUE;
-
- case WM_NOTIFY:
- nmc = (NMCLISTCONTROL*)lParam;
- if (nmc->hdr.idFrom == IDC_CLIST && nmc->hdr.code == CLN_LISTREBUILT)
- FilterContacts(hwndDlg, ppro);
- break;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDCANCEL:
- EndDialog(hwndDlg, 0);
- return TRUE;
-
- case IDOK:
- HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
- CMStringA uids;
- for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
- if (ppro->isChatRoom(hContact))
- continue;
-
- if (int hItem = SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0)) {
- if (SendMessage(hwndClist, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- int uid = ppro->getDword(hContact, "ID");
- if (uid != 0) {
- if (!uids.IsEmpty())
- uids.AppendChar(',');
- uids.AppendFormat("%d", uid);
- }
- }
- }
- }
-
- TCHAR tszTitle[1024];
- GetDlgItemText(hwndDlg, IDC_TITLE, tszTitle, _countof(tszTitle));
- ppro->CreateNewChat(uids, tszTitle);
- EndDialog(hwndDlg, 0);
- return TRUE;
- }
- }
- return FALSE;
-}
-
INT_PTR CVkProto::SvcCreateChat(WPARAM, LPARAM)
{
if (!IsOnline())
- return 1;
- DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_GC_CREATE), NULL, GcCreateDlgProc, (LPARAM)this);
- return 0;
+ return (INT_PTR)1;
+ CVkGCCreateForm dlg(this);
+ return (INT_PTR)!dlg.DoModal();
}
void CVkProto::CreateNewChat(LPCSTR uids, LPCTSTR ptszTitle)
@@ -1048,7 +933,7 @@ void CVkProto::CreateNewChat(LPCSTR uids, LPCTSTR ptszTitle)
if (!IsOnline())
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.createChat.json", true, &CVkProto::OnCreateNewChat)
- << TCHAR_PARAM("title", ptszTitle)
+ << TCHAR_PARAM("title", ptszTitle ? ptszTitle : _T(""))
<< CHAR_PARAM("user_ids", uids));
}
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index b934d14cf7..9fd1d333c2 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////// IDD_CAPTCHAFORM ////////////////////////////////////////
-CaptchaForm::CaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS* param) :
+CVkCaptchaForm::CVkCaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS* param) :
CVkDlgBase(proto, IDD_CAPTCHAFORM, false),
m_instruction(this, IDC_INSTRUCTION),
m_edtValue(this, IDC_VALUE),
@@ -27,12 +27,12 @@ CaptchaForm::CaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS* param) :
m_btnOk(this, IDOK),
m_param(param)
{
- m_btnOpenInBrowser.OnClick = Callback(this, &CaptchaForm::On_btnOpenInBrowser_Click);
- m_btnOk.OnClick = Callback(this, &CaptchaForm::On_btnOk_Click);
- m_edtValue.OnChange = Callback(this, &CaptchaForm::On_edtValue_Change);
+ m_btnOpenInBrowser.OnClick = Callback(this, &CVkCaptchaForm::On_btnOpenInBrowser_Click);
+ m_btnOk.OnClick = Callback(this, &CVkCaptchaForm::On_btnOk_Click);
+ m_edtValue.OnChange = Callback(this, &CVkCaptchaForm::On_edtValue_Change);
}
-void CaptchaForm::OnInitDialog()
+void CVkCaptchaForm::OnInitDialog()
{
SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_KEYS), TRUE));
SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_KEYS)));
@@ -42,7 +42,7 @@ void CaptchaForm::OnInitDialog()
m_instruction.SetText(TranslateT("Enter the text you see"));
}
-INT_PTR CaptchaForm::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CVkCaptchaForm::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_CTLCOLORSTATIC:
@@ -81,31 +81,31 @@ INT_PTR CaptchaForm::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
return CDlgBase::DlgProc(msg, wParam, lParam);
}
-void CaptchaForm::OnDestroy()
+void CVkCaptchaForm::OnDestroy()
{
IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_BIG, 0));
IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, 0));
}
-void CaptchaForm::On_btnOpenInBrowser_Click(CCtrlButton*)
+void CVkCaptchaForm::On_btnOpenInBrowser_Click(CCtrlButton*)
{
m_proto->ShowCaptchaInBrowser(m_param->bmp);
}
-void CaptchaForm::On_btnOk_Click(CCtrlButton*)
+void CVkCaptchaForm::On_btnOk_Click(CCtrlButton*)
{
m_edtValue.GetTextA(m_param->Result, _countof(m_param->Result));
EndDialog(m_hwnd, 1);
}
-void CaptchaForm::On_edtValue_Change(CCtrlEdit*)
+void CVkCaptchaForm::On_edtValue_Change(CCtrlEdit*)
{
m_btnOk.Enable(!IsEmpty(ptrA(m_edtValue.GetTextA())));
}
////////////////////////////////// IDD_WALLPOST ///////////////////////////////////////////
-WallPostForm::WallPostForm(CVkProto * proto, WALLPOST_FORM_PARAMS * param) :
+CVkWallPostForm::CVkWallPostForm(CVkProto* proto, WALLPOST_FORM_PARAMS* param) :
CVkDlgBase(proto, IDD_WALLPOST, false),
m_edtMsg(this, IDC_ED_MSG),
m_edtUrl(this, IDC_ED_URL),
@@ -113,12 +113,12 @@ WallPostForm::WallPostForm(CVkProto * proto, WALLPOST_FORM_PARAMS * param) :
m_btnShare(this, IDOK),
m_param(param)
{
- m_btnShare.OnClick = Callback(this, &WallPostForm::On_btnShare_Click);
- m_edtMsg.OnChange = Callback(this, &WallPostForm::On_edtValue_Change);
- m_edtUrl.OnChange = Callback(this, &WallPostForm::On_edtValue_Change);
+ m_btnShare.OnClick = Callback(this, &CVkWallPostForm::On_btnShare_Click);
+ m_edtMsg.OnChange = Callback(this, &CVkWallPostForm::On_edtValue_Change);
+ m_edtUrl.OnChange = Callback(this, &CVkWallPostForm::On_edtValue_Change);
}
-void WallPostForm::OnInitDialog()
+void CVkWallPostForm::OnInitDialog()
{
SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL), TRUE));
SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL)));
@@ -129,13 +129,13 @@ void WallPostForm::OnInitDialog()
m_btnShare.Disable();
}
-void WallPostForm::OnDestroy()
+void CVkWallPostForm::OnDestroy()
{
IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_BIG, 0));
IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, 0));
}
-void WallPostForm::On_btnShare_Click(CCtrlButton *)
+void CVkWallPostForm::On_btnShare_Click(CCtrlButton*)
{
m_param->ptszUrl = mir_tstrdup(m_edtUrl.GetText());
m_param->ptszMsg = mir_tstrdup(m_edtMsg.GetText());
@@ -144,7 +144,109 @@ void WallPostForm::On_btnShare_Click(CCtrlButton *)
EndDialog(m_hwnd, 1);
}
-void WallPostForm::On_edtValue_Change(CCtrlEdit *)
+void CVkWallPostForm::On_edtValue_Change(CCtrlEdit*)
{
m_btnShare.Enable(!IsEmpty(ptrT(m_edtMsg.GetText())) || !IsEmpty(ptrT(m_edtUrl.GetText())));
}
+
+////////////////////////////////// IDD_INVITE /////////////////////////////////////////////
+
+CVkInviteChatForm::CVkInviteChatForm(CVkProto* proto) :
+ CVkDlgBase(proto, IDD_INVITE, false),
+ m_btnOk(this, IDOK),
+ m_cbxCombo(this, IDC_CONTACT),
+ m_hContact(NULL)
+{
+ m_btnOk.OnClick = Callback(this, &CVkInviteChatForm::btnOk_OnOk);
+}
+
+void CVkInviteChatForm::OnInitDialog()
+{
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
+ if (!m_proto->isChatRoom(hContact)) {
+ TCHAR *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ m_cbxCombo.AddString(ptszNick, hContact);
+ }
+ }
+}
+
+void CVkInviteChatForm::btnOk_OnOk(CCtrlButton*)
+{
+ m_hContact = m_cbxCombo.GetItemData(m_cbxCombo.GetCurSel());
+ EndDialog(m_hwnd, 1);
+}
+
+////////////////////////////////// IDD_GC_CREATE //////////////////////////////////////////
+
+CVkGCCreateForm::CVkGCCreateForm(CVkProto* proto) :
+ CVkDlgBase(proto, IDD_GC_CREATE, false),
+ m_btnOk(this, IDOK),
+ m_clCList(this, IDC_CLIST),
+ m_edtTitle(this, IDC_TITLE)
+{
+ m_btnOk.OnClick = Callback(this, &CVkGCCreateForm::btnOk_OnOk);
+}
+
+void CVkGCCreateForm::OnInitDialog()
+{
+ SetWindowLongPtr(m_clCList.GetHwnd(), GWL_STYLE, GetWindowLongPtr(m_clCList.GetHwnd(), GWL_STYLE)
+ | CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE);
+ m_clCList.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
+
+ ResetListOptions(&m_clCList);
+ FilterList(&m_clCList);
+}
+
+void CVkGCCreateForm::btnOk_OnOk(CCtrlButton*)
+{
+ CMStringA szUIds;
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
+ if (m_proto->isChatRoom(hContact))
+ continue;
+
+ HANDLE hItem = m_clCList.FindContact(hContact);
+ if (hItem && m_clCList.GetCheck(hItem)) {
+ int uid = m_proto->getDword(hContact, "ID");
+ if (uid != 0) {
+ if (!szUIds.IsEmpty())
+ szUIds.AppendChar(',');
+ szUIds.AppendFormat("%d", uid);
+ }
+ }
+ }
+
+ bool bRes = !szUIds.IsEmpty();
+ if (bRes)
+ m_proto->CreateNewChat(szUIds, m_edtTitle.GetText());
+
+ EndDialog(m_hwnd, bRes);
+}
+
+void CVkGCCreateForm::FilterList(CCtrlClc* clCList)
+{
+ if (!clCList)
+ return;
+
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ char *proto = GetContactProto(hContact);
+ if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
+ if (HANDLE hItem = clCList->FindContact(hContact))
+ clCList->DeleteItem(hItem);
+ }
+}
+
+void CVkGCCreateForm::ResetListOptions(CCtrlClc* clCList)
+{
+ if (!clCList)
+ return;
+
+ clCList->SetBkBitmap(0, NULL);
+ clCList->SetBkColor(GetSysColor(COLOR_WINDOW));
+ clCList->SetGreyoutFlags(0);
+ clCList->SetLeftMargin(4);
+ clCList->SetIndent(10);
+ clCList->SetHideEmptyGroups(true);
+ clCList->SetHideOfflineRoot(true);
+ for (int i = 0; i <= FONTID_MAX; i++)
+ clCList->SetTextColor(i, GetSysColor(COLOR_WINDOWTEXT));
+} \ No newline at end of file
diff --git a/protocols/VKontakte/src/vk_dialogs.h b/protocols/VKontakte/src/vk_dialogs.h
index bfdbc272c2..3de38eaa7b 100644
--- a/protocols/VKontakte/src/vk_dialogs.h
+++ b/protocols/VKontakte/src/vk_dialogs.h
@@ -29,7 +29,7 @@ struct CAPTCHA_FORM_PARAMS
char Result[100];
};
-class CaptchaForm : public CVkDlgBase
+class CVkCaptchaForm : public CVkDlgBase
{
CCtrlData m_instruction;
CCtrlEdit m_edtValue;
@@ -38,7 +38,7 @@ class CaptchaForm : public CVkDlgBase
CAPTCHA_FORM_PARAMS* m_param;
public:
- CaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS* param);
+ CVkCaptchaForm(CVkProto* proto, CAPTCHA_FORM_PARAMS* param);
void OnInitDialog();
INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
void OnDestroy();
@@ -72,7 +72,7 @@ struct WALLPOST_FORM_PARAMS
}
};
-class WallPostForm : public CVkDlgBase
+class CVkWallPostForm : public CVkDlgBase
{
CCtrlEdit m_edtMsg;
CCtrlEdit m_edtUrl;
@@ -82,9 +82,40 @@ class WallPostForm : public CVkDlgBase
WALLPOST_FORM_PARAMS* m_param;
public:
- WallPostForm(CVkProto *proto, WALLPOST_FORM_PARAMS* param);
+ CVkWallPostForm(CVkProto* proto, WALLPOST_FORM_PARAMS* param);
void OnInitDialog();
void OnDestroy();
void On_btnShare_Click(CCtrlButton*);
void On_edtValue_Change(CCtrlEdit*);
+};
+
+////////////////////////////////// IDD_INVITE /////////////////////////////////////////////
+
+class CVkInviteChatForm : public CVkDlgBase
+{
+ CCtrlButton m_btnOk;
+ CCtrlCombo m_cbxCombo;
+
+public:
+ MCONTACT m_hContact;
+
+ CVkInviteChatForm(CVkProto* proto);
+ void OnInitDialog();
+ void btnOk_OnOk(CCtrlButton*);
+};
+
+////////////////////////////////// IDD_GC_CREATE //////////////////////////////////////////
+
+class CVkGCCreateForm : public CVkDlgBase
+{
+ CCtrlButton m_btnOk;
+ CCtrlClc m_clCList;
+ CCtrlEdit m_edtTitle;
+
+public:
+ CVkGCCreateForm(CVkProto* proto);
+ void OnInitDialog();
+ void btnOk_OnOk(CCtrlButton*);
+ void FilterList(CCtrlClc*);
+ void ResetListOptions(CCtrlClc*);
}; \ No newline at end of file
diff --git a/protocols/VKontakte/src/vk_wallpost.cpp b/protocols/VKontakte/src/vk_wallpost.cpp
index 8adf6e2deb..3dc00b686f 100644
--- a/protocols/VKontakte/src/vk_wallpost.cpp
+++ b/protocols/VKontakte/src/vk_wallpost.cpp
@@ -22,7 +22,7 @@ INT_PTR __cdecl CVkProto::SvcWallPost(WPARAM hContact, LPARAM)
debugLogA("CVkProto::SvcWallPost");
WALLPOST_FORM_PARAMS param(db_get_tsa(hContact, m_szModuleName, "Nick"));
- WallPostForm dlg(this, &param);
+ CVkWallPostForm dlg(this, &param);
if (!dlg.DoModal())
return 1;