diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-28 16:16:47 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-28 16:16:47 +0300 |
commit | 6494f9edf3d013964e6a8d177b3c353a497134ee (patch) | |
tree | 55ae193bf5a88918a5c5303511f73b57d3c6e8a2 /src/mir_core | |
parent | e3cc499b6962be4a4d29350b97f0ea7a4548b4ce (diff) |
CCtrlMButton::SetTooltip extracted to the separate function
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/Windows/CCtrlMButton.cpp | 7 | ||||
-rw-r--r-- | src/mir_core/src/mir_core.def | 1 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/mir_core/src/Windows/CCtrlMButton.cpp b/src/mir_core/src/Windows/CCtrlMButton.cpp index c300ba9814..2941ed2ad6 100644 --- a/src/mir_core/src/Windows/CCtrlMButton.cpp +++ b/src/mir_core/src/Windows/CCtrlMButton.cpp @@ -46,8 +46,8 @@ void CCtrlMButton::OnInit() {
CCtrlButton::OnInit();
+ SetTooltip(m_toolTip);
SendMessage(m_hwnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_hIcon);
- SendMessage(m_hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateW_LP(_A2T(m_toolTip), m_parentWnd->GetPlugin()), BATF_UNICODE);
SendMessage(m_hwnd, BUTTONSETASFLATBTN, TRUE, 0);
}
@@ -60,3 +60,8 @@ void CCtrlMButton::MakePush() {
SendMessage(m_hwnd, BUTTONSETASPUSHBTN, TRUE, 0);
}
+
+void CCtrlMButton::SetTooltip(const char *pszTooltip)
+{
+ SendMessage(m_hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateW_LP(_A2T(pszTooltip), m_parentWnd->GetPlugin()), BATF_UNICODE);
+}
\ No newline at end of file diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 0d7894a5c5..2d4f776b42 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -1561,3 +1561,4 @@ db_event_updateId @1772 _TranslateW_UUID@8 @1785 NONAME
?Langpack_GetDefaultLocaleName@@YGPADXZ @1786 NONAME
_EventExists@4 @1787 NONAME
+?SetTooltip@CCtrlMButton@@QAEXPBD@Z @1788 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index db7faf95a8..db3c9dbf2d 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -1561,3 +1561,4 @@ db_event_updateId @1772 TranslateW_UUID @1785 NONAME
?Langpack_GetDefaultLocaleName@@YAPEADXZ @1786 NONAME
EventExists @1787 NONAME
+?SetTooltip@CCtrlMButton@@QEAAXPEBD@Z @1788 NONAME
|