summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-25 18:57:45 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-25 18:57:45 +0300
commit55df6c3d447e7e3864b4e1cad671aaa0e74be16c (patch)
tree33c7b9e029b3aef9942bec1470f8928a90bc509b
parentde7997f69c7872b57b0548c7a6baa3818e83dd0a (diff)
new method that emulates button click
-rw-r--r--include/m_gui.h1
-rw-r--r--libs/win32/mir_core.libbin317458 -> 317714 bytes
-rw-r--r--libs/win64/mir_core.libbin318400 -> 318662 bytes
-rw-r--r--make_core_def.cmd12
-rw-r--r--src/mir_core/src/CCtrlButton.cpp5
-rw-r--r--src/mir_core/src/mir_core.def1
-rw-r--r--src/mir_core/src/mir_core64.def1
7 files changed, 14 insertions, 6 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 6c00623959..39504aa4e6 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -571,6 +571,7 @@ public:
CCallback<CCtrlButton> OnClick;
+ void Click();
bool IsPushed() const;
void Push(bool bPushed);
};
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib
index 573e3e749a..cef42eed86 100644
--- a/libs/win32/mir_core.lib
+++ b/libs/win32/mir_core.lib
Binary files differ
diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib
index 96c16192bd..cd42bf7a9c 100644
--- a/libs/win64/mir_core.lib
+++ b/libs/win64/mir_core.lib
Binary files differ
diff --git a/make_core_def.cmd b/make_core_def.cmd
index e8d7dd9116..d562eabb98 100644
--- a/make_core_def.cmd
+++ b/make_core_def.cmd
@@ -1,13 +1,13 @@
@echo off
echo.
-.\tools\makedef\makedef.exe /IMAGE:bin12\debug\libs\mir_core.mir /DEF:src\mir_core\src\mir_core.def
+.\tools\makedef\makedef.exe /IMAGE:bin10\debug\libs\mir_core.mir /DEF:src\mir_core\src\mir_core.def
echo.
-.\tools\makedef\makedef.exe /IMAGE:bin12\debug64\libs\mir_core.mir /DEF:src\mir_core\src\mir_core64.def
+.\tools\makedef\makedef.exe /IMAGE:bin10\debug64\libs\mir_core.mir /DEF:src\mir_core\src\mir_core64.def
echo.
-.\tools\makedef\makedef.exe /IMAGE:bin12\debug\libs\mir_app.mir /DEF:src\mir_app\src\mir_app.def
+.\tools\makedef\makedef.exe /IMAGE:bin10\debug\libs\mir_app.mir /DEF:src\mir_app\src\mir_app.def
echo.
-.\tools\makedef\makedef.exe /IMAGE:bin12\debug64\libs\mir_app.mir /DEF:src\mir_app\src\mir_app64.def
+.\tools\makedef\makedef.exe /IMAGE:bin10\debug64\libs\mir_app.mir /DEF:src\mir_app\src\mir_app64.def
echo.
-.\tools\makedef\makedef.exe /IMAGE:bin12\debug\libs\libjson.mir /DEF:libs\libjson\src\libjson.def
+.\tools\makedef\makedef.exe /IMAGE:bin10\debug\libs\libjson.mir /DEF:libs\libjson\src\libjson.def
echo.
-.\tools\makedef\makedef.exe /IMAGE:bin12\debug64\libs\libjson.mir /DEF:libs\libjson\src\libjson64.def
+.\tools\makedef\makedef.exe /IMAGE:bin10\debug64\libs\libjson.mir /DEF:libs\libjson\src\libjson64.def
diff --git a/src/mir_core/src/CCtrlButton.cpp b/src/mir_core/src/CCtrlButton.cpp
index 3b5166959b..0ed43e8466 100644
--- a/src/mir_core/src/CCtrlButton.cpp
+++ b/src/mir_core/src/CCtrlButton.cpp
@@ -36,6 +36,11 @@ BOOL CCtrlButton::OnCommand(HWND, WORD, WORD idCode)
return FALSE;
}
+void CCtrlButton::Click()
+{
+ ::SendMessage(m_parentWnd->GetHwnd(), WM_COMMAND, MAKELONG(m_idCtrl, BN_CLICKED), 0);
+}
+
bool CCtrlButton::IsPushed() const
{
return ::SendMessage(m_hwnd, BM_GETCHECK, 0, 0) == BST_CHECKED;
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index 8a8e4df230..44602097df 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -1051,3 +1051,4 @@ CallFunctionSync @1170
?Resize@CDlgBase@@QAEXXZ @1239 NONAME
Utils_IsRtl @1240
HookTemporaryEvent @1241
+?Click@CCtrlButton@@QAEXXZ @1242 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index f188b5b51d..f90766de3b 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -1051,3 +1051,4 @@ CallFunctionSync @1170
?Resize@CDlgBase@@QEAAXXZ @1239 NONAME
Utils_IsRtl @1240
HookTemporaryEvent @1241
+?Click@CCtrlButton@@QEAAXXZ @1242 NONAME