From 2f1b8c756066316c59be907bcd94a73cae5e3a7b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 24 Mar 2015 18:51:51 +0000 Subject: UI Utils classes & templates moved to the core, thus allowing any plugin to use them git-svn-id: http://svn.miranda-ng.org/main/trunk@12492 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_util.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'protocols/JabberG/src/jabber_util.cpp') diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index dea5b49ff7..68f7acd2c7 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -1148,3 +1148,19 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) if (hHttpCon) Netlib_CloseHandle(hHttpCon); } + +///////////////////////////////////////////////////////////////////////////////////////// +// UI utilities + +int UIEmulateBtnClick(HWND hwndDlg, UINT idcButton) +{ + if (IsWindowEnabled(GetDlgItem(hwndDlg, idcButton))) + PostMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(idcButton, BN_CLICKED), (LPARAM)GetDlgItem(hwndDlg, idcButton)); + return 0; +} + +void UIShowControls(HWND hwndDlg, int *idList, int nCmdShow) +{ + for (; *idList; ++idList) + ShowWindow(GetDlgItem(hwndDlg, *idList), nCmdShow); +} -- cgit v1.2.3