summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-26 22:14:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-26 22:14:04 +0300
commited6386d96cea6837d005b1881a237447043dc84e (patch)
treebdd2ba976ff698d8bfa86b86cbbcb359b3de68e6
parentef5d5d9a996e2392d4634f8114d096e1fa98fb43 (diff)
long needed function CCtrlBase::Show(bool)
-rw-r--r--include/m_gui.h5
-rw-r--r--libs/win32/mir_core.libbin313620 -> 314120 bytes
-rw-r--r--libs/win64/mir_core.libbin314528 -> 315034 bytes
-rw-r--r--src/mir_core/src/mir_core.def4
-rw-r--r--src/mir_core/src/mir_core64.def4
-rw-r--r--src/mir_core/src/ui_utils.cpp10
6 files changed, 18 insertions, 5 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 226260c324..18f47b90c0 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -500,7 +500,10 @@ public:
__forceinline void SetSilent() { m_bSilent = true; }
__forceinline void UseSystemColors() { m_bUseSystemColors = true; }
- void Enable(int bIsEnable = true);
+ void Show(bool bShow = true);
+ __forceinline void Hide() { Show(false); }
+
+ void Enable(bool bIsEnable = true);
__forceinline void Disable() { Enable(false); }
BOOL Enabled(void) const;
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib
index 1d37de9d0a..7b94503376 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 2f42baaf97..258359bccd 100644
--- a/libs/win64/mir_core.lib
+++ b/libs/win64/mir_core.lib
Binary files differ
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index ae47e8ac8a..68cf90c200 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -576,7 +576,7 @@ mir_wstrcmpi @280
?EditLabel@CCtrlClc@@QAEXPAX@Z @741 NONAME
?EditLabel@CCtrlListView@@QAEPAUHWND__@@H@Z @742 NONAME
?EditLabel@CCtrlTreeView@@QAEPAUHWND__@@PAU_TREEITEM@@@Z @743 NONAME
-?Enable@CCtrlBase@@QAEXH@Z @744 NONAME
+?Enable@CCtrlBase@@QAEX_N@Z @744 NONAME
?EnableGroupView@CCtrlListView@@QAEHH@Z @745 NONAME
?Enabled@CCtrlBase@@QBEHXZ @746 NONAME
?EndEditLabel@CCtrlClc@@QAEX_N@Z @747 NONAME
@@ -1037,3 +1037,5 @@ CallFunctionSync @1170
?SwapPages@CCtrlPages@@QAEXHH@Z @1224 NONAME
?IsPushed@CCtrlButton@@QBE_NXZ @1225 NONAME
?Push@CCtrlButton@@QAEX_N@Z @1226 NONAME
+?Hide@CCtrlBase@@QAEXXZ @1227 NONAME
+?Show@CCtrlBase@@QAEX_N@Z @1228 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index 24bbd1f59b..3c4841edfd 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -576,7 +576,7 @@ mir_wstrcmpi @280
?EditLabel@CCtrlClc@@QEAAXPEAX@Z @741 NONAME
?EditLabel@CCtrlListView@@QEAAPEAUHWND__@@H@Z @742 NONAME
?EditLabel@CCtrlTreeView@@QEAAPEAUHWND__@@PEAU_TREEITEM@@@Z @743 NONAME
-?Enable@CCtrlBase@@QEAAXH@Z @744 NONAME
+?Enable@CCtrlBase@@QEAAX_N@Z @744 NONAME
?EnableGroupView@CCtrlListView@@QEAAHH@Z @745 NONAME
?Enabled@CCtrlBase@@QEBAHXZ @746 NONAME
?EndEditLabel@CCtrlClc@@QEAAX_N@Z @747 NONAME
@@ -1037,3 +1037,5 @@ CallFunctionSync @1170
?SwapPages@CCtrlPages@@QEAAXHH@Z @1224 NONAME
?IsPushed@CCtrlButton@@QEBA_NXZ @1225 NONAME
?Push@CCtrlButton@@QEAAX_N@Z @1226 NONAME
+?Hide@CCtrlBase@@QEAAXXZ @1227 NONAME
+?Show@CCtrlBase@@QEAAX_N@Z @1228 NONAME
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp
index 76dfb85a23..c11f67240c 100644
--- a/src/mir_core/src/ui_utils.cpp
+++ b/src/mir_core/src/ui_utils.cpp
@@ -79,7 +79,8 @@ void CDlgBase::Create()
void CDlgBase::Show(int nCmdShow)
{
- Create();
+ if (m_hwnd == nullptr)
+ Create();
ShowWindow(m_hwnd, nCmdShow);
}
@@ -2696,7 +2697,12 @@ void CCtrlBase::OnApply()
void CCtrlBase::OnReset()
{}
-void CCtrlBase::Enable(int bIsEnable)
+void CCtrlBase::Show(bool bShow)
+{
+ ::ShowWindow(m_hwnd, bShow ? SW_SHOW : SW_HIDE);
+}
+
+void CCtrlBase::Enable(bool bIsEnable)
{
::EnableWindow(m_hwnd, bIsEnable);
}