From ba62eab90e0ff7741dfb2c6ad0be83521ac518df Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 May 2016 20:46:18 +0000 Subject: smiley button also removed from chat window in Scriver git-svn-id: http://svn.miranda-ng.org/main/trunk@16819 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/dlgboxsubclass.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins/SmileyAdd/src/dlgboxsubclass.cpp') diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 7f8e13779a..2f6663f051 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -71,13 +71,16 @@ public: RECT CalcSmileyButtonPos(void) { RECT rect; - POINT pt; - GetWindowRect(LButton, &rect); + + POINT pt; pt.y = rect.top; + MUUID muidScriver = { 0x84636f78, 0x2057, 0x4302, { 0x8a, 0x65, 0x23, 0xa1, 0x6d, 0x46, 0x84, 0x4c } }; + int iShift = (IsPluginLoaded(muidScriver)) ? 28 : -28; + if ((GetWindowLongPtr(LButton, GWL_STYLE) & WS_VISIBLE) != 0) - pt.x = rect.left - 28; + pt.x = rect.left + iShift; else pt.x = rect.left; @@ -270,6 +273,8 @@ static int MsgDlgHook(WPARAM, LPARAM lParam) msgwnd->REdit = wndEvtData->hwndLog; msgwnd->MEdit = wndEvtData->hwndInput; msgwnd->LButton = GetDlgItem(wndEvtData->hwndWindow, MI_IDC_ADD); + if (msgwnd->LButton == NULL) + msgwnd->LButton = GetDlgItem(wndEvtData->hwndWindow, 5019); // Get the protocol for this contact to display correct smileys. char *protonam = GetContactProto(DecodeMetaContact(msgwnd->hContact)); -- cgit v1.2.3