From ed6386d96cea6837d005b1881a237447043dc84e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Mar 2017 22:14:04 +0300 Subject: long needed function CCtrlBase::Show(bool) --- src/mir_core/src/mir_core.def | 4 +++- src/mir_core/src/mir_core64.def | 4 +++- src/mir_core/src/ui_utils.cpp | 10 ++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src/mir_core') 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); } -- cgit v1.2.3