用于EagleEye3.0 规则集漏报和误报测试的示例项目,项目收集于github和gitee
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
4.5 KiB

5 months ago
/**
* Copyright (C) 2014-2050 SOUI团队
* All rights reserved.
*
* @file SRealWnd.h
* @brief
* @version v1.0
* @author soui
* @date 2014-07-06
*
* Describe
*/
#pragma once
#include "core/Swnd.h"
//////////////////////////////////////////////////////////////////////////
// Real Window Control
// Binding a real window
//
// Usage: <realwnd id=xx wndclass="edit" wndname="name" style="00000001" exstyle="00000000"/>
//
namespace SOUI
{
/**
* @class SRealWndParam
* @brief RealWnd窗口参数
*
* Describe RealWnd窗口参数
*/
class SOUI_EXP SRealWndParam
{
public:
/**
* SRealWndParam::SRealWndParam
* @brief
*
* Describe
*/
SRealWndParam();
/**
* SRealWndParam::~SRealWndParam
* @brief
*
* Describe
*/
~SRealWndParam();
SStringT m_strClassName; /**< 类名 */
SStringT m_strWindowName; /**< 窗口名 */
DWORD m_dwStyle; /**< 窗口样式 */
DWORD m_dwExStyle; /**< 窗口扩展样式 */
pugi::xml_document m_xmlParams; /**< 文档 */
};
/**
* @class SRealWnd
* @brief
*
* Describe
*/
class SOUI_EXP SRealWnd : public SWindow
{
SOUI_CLASS_NAME(SRealWnd, L"realwnd")
public:
/**
* SRealWnd::SRealWnd
* @brief
*
* Describe
*/
SRealWnd();
/**
* SRealWnd::~SRealWnd
* @brief
*
* Describe
*/
virtual ~SRealWnd();
/**
* SRealWnd::GetRealHwnd
* @brief
* @param BOOL bAutoCreate --
* @return HWND
*
* Describe
*/
const HWND GetRealHwnd(BOOL bAutoCreate=TRUE);
/**
* SRealWnd::GetRealWndParam
* @brief
* @return SRealWndParam
*
* Describe
*/
const SRealWndParam & GetRealWndParam()
{
return m_realwndParam;
}
/**
* SRealWnd::SetData
* @brief
* @param LPVOID lpData --
*
* Describe
*/
void SetData(LPVOID lpData)
{
m_lpData=lpData;
}
/**
* SRealWnd::GetData
* @brief
* @return LPVOID
*
* Describe
*/
const LPVOID GetData()
{
return m_lpData;
}
SOUI_ATTRS_BEGIN()
ATTR_STRINGT(L"wndclass", m_realwndParam.m_strClassName, FALSE)
ATTR_STRINGT(L"wndname", m_realwndParam.m_strWindowName, FALSE)
ATTR_HEX(L"style", m_realwndParam.m_dwStyle, FALSE)
ATTR_HEX(L"exstyle", m_realwndParam.m_dwExStyle, FALSE)
ATTR_BOOL(L"init",m_bInit,FALSE)
SOUI_ATTRS_END()
protected:
/**
* SRealWnd::NeedRedrawWhenStateChange
* @brief
* @return BOOL
*
* Describe
*/
virtual BOOL NeedRedrawWhenStateChange();
/**
* SRealWnd::InitFromXml
* @brief
* @return BOOL
*
* Describe
*/
virtual BOOL InitFromXml(pugi::xml_node xmlNode);
virtual BOOL OnRelayout(const CRect &rcWnd);
/**
* SRealWnd::OnShowWindow
* @brief
* @param BOOL bShow --
* @param UINT nStatus --
*
* Describe
*/
void OnShowWindow(BOOL bShow, UINT nStatus);
/**
* SRealWnd::OnDestroy
* @brief
*
* Describe
*/
void OnDestroy();
/**
* SRealWnd::OnPaint
* @brief
* @param CDCHandle dc --
*
* Describe
*/
void OnPaint(IRenderTarget *pRT) {}
/**
* SRealWnd::ShowRealWindow
* @brief
*
* Describe
*/
void ShowRealWindow();
/**
* SRealWnd::InitRealWnd
* @brief
*
* Describe
*/
BOOL InitRealWnd();
SOUI_MSG_MAP_BEGIN()
MSG_WM_PAINT_EX(OnPaint)
MSG_WM_DESTROY(OnDestroy)
MSG_WM_SHOWWINDOW(OnShowWindow)
SOUI_MSG_MAP_END()
SRealWndParam m_realwndParam; /**< 窗口参数 */
BOOL m_bInit; /**< 是否初始化 */
HWND m_hRealWnd; /**< 窗口句柄 */
LPVOID m_lpData; /**< 附加参数 */
};
}//namespace SOUI