/** * @file XTPWindowList.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(_XTPWINDOWLIST_H__) # define _XTPWINDOWLIST_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPWindowList dialog. */ class _XTP_EXT_CLASS CXTPWindowList : public CXTPResizeDialog { /** @cond */ DECLARE_DYNAMIC(CXTPWindowList) /** @endcond */ public: /** * @brief * Constructs a CXTPWindowList object. * @param pMDIFrameWnd Pointer to the application's main window. */ CXTPWindowList(CMDIFrameWnd* pMDIFrameWnd); /** * @brief * Constructs a CXTPWindowList object. * @param hWndMDIClient Handle to the application's MDI client window. */ CXTPWindowList(HWND hWndMDIClient); public: /** * @brief * Call this member function to set the dialog's icon. * @param hIcon Icon handle to set. */ void SetWindowIcon(HICON hIcon) { m_hIcon = hIcon; } protected: /** * @brief * Call this member function to add a MDI child to the window list. * @param hwndMDIChildWnd Pointer to a MDI child window. */ virtual void InsertMDIChild(HWND hwndMDIChildWnd); /** * @brief * Call this member function to retrieve a MDI child window's text. * @param hWnd Handle to a MDI child window. * @return * A CString object representing the window's text. */ virtual CString GetChildWndText(HWND hWnd) const; /** * @brief * Call this member function to toggle the restore/minimize state for * selected MDI children. */ void RestoreAndMinimize(); /** * @brief * Call this member function to enable/disable button controls for * the window list dialog depending on selection. */ virtual void SetEnableButtons(); /** * @brief * Call this member function to populate the window list with * MDI children. * @param hWnd Handle to a MDI client window. */ void FillMDIClientWindowList(HWND hWnd); /** * @brief * Call this member function to populate the window list with * currently open MDI children. */ virtual void FillMDIWindowList(); /** * @brief * Call this member function to select the active MDI child window. */ virtual void SelectMDIActive(); protected: /** @cond */ DECLARE_MESSAGE_MAP() //{{AFX_VIRTUAL(CXTPWindowList) virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL //{{AFX_MSG(CXTPWindowList) virtual BOOL OnInitDialog(); afx_msg void OnSelchangeLBox(); afx_msg void OnBtnActivate(); afx_msg void OnBtnSave(); afx_msg void OnBtnClosewindows(); afx_msg void OnBtnTilehorz(); afx_msg void OnBtnTilevert(); afx_msg void OnBtnCascade(); afx_msg void OnBtnMinimize(); afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct); afx_msg void OnDestroy(); //}}AFX_MSG /** @endcond */ protected: /** @cond */ //{{AFX_DATA(CXTPWindowList) CButton m_btnMinimize; CButton m_btnCascade; CButton m_btnOk; CButton m_btnTileVert; CButton m_btnTileHorz; CButton m_btnSave; CButton m_btnClose; CButton m_btnActivate; //}}AFX_DATA /** @endcond */ HWND m_hWndMDIClient; /**< Handle to a MDI client area. */ HICON m_hIcon; /**< Resize dialog's handle. */ CMDIFrameWnd* m_pMDIFrameWnd; /**< Pointer to application's MDI frame. */ CXTPListBox m_lboxWindows; /**< Flicker free list box to display MDI children. */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(_XTPWINDOWLIST_H__) /** @endcond */