soui 5.0.0.1
 
Loading...
Searching...
No Matches
IHostWnd Struct Reference
Inheritance diagram for IHostWnd:
INativeWnd IObjRef TNativeWndProxy< IHostWnd > IHostDialog SHostWnd THostWndProxy< IHostDialog > THostWndProxy< IHostDialog > SDropDownWnd SMenuEx THostWndProxy< T > SHostDialog SHostDialog SDropDownWnd_ComboBox SMessageBoxImpl SMessageBoxImpl

Public Member Functions

long AddRef () PURE
 添加引用
 
long Release () PURE
 释放引用
 
void OnFinalRelease () PURE
 释放对象
 
HWND CreateNative (LPCTSTR lpWindowName, DWORD dwStyle, DWORD dwExStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, int nID, LPVOID lpParam) PURE
 创建一个Native窗口
 
HWND GetHwnd () PURE
 获取窗口HWND
 
BOOL SubclassWindow (HWND hWnd) PURE
 用SNativeWnd对象子类化一个HWND
 
HWND UnsubclassWindow (BOOL bForce) PURE
 反子类化
 
const MSG * GetCurrentMessage () SCONST PURE
 获取当前的窗口消息对象
 
int GetDlgCtrlID () SCONST PURE
 获取窗口ID
 
DWORD GetStyle () SCONST PURE
 获取窗口Style
 
DWORD GetExStyle () SCONST PURE
 获取窗口exStyle
 
LONG_PTR GetWindowLongPtr (int nIndex) SCONST PURE
 获取窗口关联数据
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong) PURE
 设置窗口关联数据
 
HWND GetParent () PURE
 获取父窗口
 
HWND SetParent (HWND hWndNewParent) PURE
 设置父窗口
 
BOOL IsWindowEnabled () SCONST PURE
 获取窗口的enable状态
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags) PURE
 修改窗口style
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags) PURE
 修改窗口exStyle
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags) PURE
 设置窗口的Pos
 
BOOL CenterWindow (HWND hWndCenter) PURE
 窗口居中
 
BOOL DestroyWindow () PURE
 销毁窗口
 
BOOL IsWindow () SCONST PURE
 检查是否为有效HWND
 
BOOL Invalidate (BOOL bErase) PURE
 刷新窗口
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase) PURE
 刷新窗口指定区域
 
BOOL GetWindowRect (LPRECT lpRect) SCONST PURE
 获取窗口位置
 
BOOL GetClientRect (LPRECT lpRect) SCONST PURE
 获取窗口客户区位置
 
BOOL ClientToScreen (LPPOINT lpPoint) SCONST PURE
 将相对窗口的坐标转换为屏幕坐标
 
BOOL ClientToScreen2 (LPRECT lpRect) SCONST PURE
 将相对窗口的矩形坐标转换为屏幕坐标
 
BOOL ScreenToClient (LPPOINT lpPoint) SCONST PURE
 将屏幕坐标转换为窗口坐标
 
BOOL ScreenToClient2 (LPRECT lpRect) SCONST PURE
 将屏幕矩形坐标转换为窗口坐标
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) SCONST PURE
 将一组窗口坐标转换为相对于另一个窗口的坐标
 
int MapWindowRect (HWND hWndTo, LPRECT lpRect) SCONST PURE
 将一个窗口矩形映射为相对于另一个窗口的矩形
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)) PURE
 启动一人定时器
 
BOOL KillTimer (UINT_PTR nIDEvent) PURE
 删除一个定时器
 
HDC GetDC () PURE
 获取窗口的客户区DC
 
HDC GetWindowDC () PURE
 获取窗口DC
 
int ReleaseDC (HDC hDC) PURE
 释放DC
 
BOOL CreateCaret (HBITMAP hBitmap, int nWidth, int nHeight) PURE
 创建一个光标
 
BOOL HideCaret () PURE
 隐藏光标
 
BOOL ShowCaret () PURE
 显示光标
 
HWND GetCapture () PURE
 获取当前有鼠标捕获的HWND
 
HWND SetCapture () PURE
 将当前窗口设置为捕获鼠标输入
 
BOOL ReleaseCapture () PURE
 退出鼠标捕获
 
HWND SetFocus () PURE
 让窗口成为接收键盘输入的焦点窗口
 
LRESULT SendMessage (UINT message, WPARAM wParam, LPARAM lParam) PURE
 同步执行一个消息到窗口处理过程
 
BOOL PostMessage (UINT message, WPARAM wParam, LPARAM lParam) PURE
 异步执行一个消息到窗口处理过程
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam, LPARAM lParam) PURE
 
BOOL SetWindowText (LPCTSTR lpszString) PURE
 设置窗口标题
 
int GetWindowText (LPTSTR lpszStringBuf, int nMaxCount) SCONST PURE
 获取窗口标题文本
 
BOOL IsIconic () SCONST PURE
 查询是否为最小化状态
 
BOOL IsZoomed () SCONST PURE
 查询是否为最大化状态
 
BOOL IsWindowVisible () SCONST PURE
 查询窗口是否可见
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint) PURE
 移动窗口位置
 
BOOL MoveWindow2 (LPCRECT lpRect, BOOL bRepaint) PURE
 移动窗口位置
 
BOOL ShowWindow (int nCmdShow) PURE
 显示窗口
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw) PURE
 设置窗口异形区域
 
BOOL SetLayeredWindowAttributes (COLORREF crKey, BYTE bAlpha, DWORD dwFlags) PURE
 设置窗口的分层属性
 
BOOL UpdateLayeredWindow (HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags) PURE
 更新分层窗口
 
void SetMsgHandler (FunMsgHandler fun, void *ctx) PURE
 设置窗口消息处理函数
 
MsgHandlerInfoGetMsgHandler () PURE
 获取窗口消息处理对象
 
HWND CreateEx (HWND hWndParent, DWORD dwStyle, DWORD dwExStyle, int x, int y, int nWidth, int nHeight, IXmlNode *xmlInit DEF_VAL(NULL)) PURE
 创建窗口
 
HWND Create (HWND hWndParent, int x DEF_VAL(0), int y DEF_VAL(0), int nWidth DEF_VAL(0), int nHeight DEF_VAL(0)) PURE
 创建窗口
 
void SetLayoutId (LPCTSTR pszLayoutId) PURE
 设置窗口布局资源ID
 
BOOL InitFromXml (IXmlNode *pNode) PURE
 从XML初始化窗口
 
IWindowGetIRoot () PURE
 获取Dui Root
 
BOOL IsTranslucent () SCONST PURE
 查询窗口的半透明标志
 
IHostPresenterGetPresenter () PURE
 获取窗口的上屏对象
 
void SetPresenter (IHostPresenter *pPresenter) PURE
 设置窗口上屏对象
 
IMessageLoopGetMsgLoop () PURE
 获取窗口所属的msgloop对象
 
IWindowFindIChildByID (int nId) PURE
 根据ID查找子窗口
 
IWindowFindIChildByName (LPCWSTR pszName) PURE
 根据Name查找子窗口
 
IWindowFindIChildByNameA (LPCSTR pszName) PURE
 根据Name查找子窗口
 
INcPainterGetNcPainter () PURE
 获取非客户区的绘制对象
 
void SetEventHandler (FunCallback fun, void *ctx) PURE
 设置事件处理对象
 
EventHandlerInfoGetEventHandler () PURE
 获取事件处理对象
 
BOOL AnimateHostWindow (DWORD dwTime, DWORD dwFlags) PURE
 动画显示/隐藏窗口
 
void EnableDragDrop () PURE
 让窗口支持DragDrop
 
void ShowHostWnd (int uShowCmd, BOOL bWaitAniDone) PURE
 显示或者隐藏HostWnd
 
void EnablePrivateUiDef (BOOL bEnable) PURE
 是否启用布局中定义的私有UIDef对象
 
void SetScale (int nScale, LPCRECT pDestRect) PURE
 设置窗口的dpi倍数
 
- Public Member Functions inherited from INativeWnd
long AddRef () PURE
 添加引用
 
long Release () PURE
 释放引用
 
void OnFinalRelease () PURE
 释放对象
 
HWND CreateNative (LPCTSTR lpWindowName, DWORD dwStyle, DWORD dwExStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, int nID, LPVOID lpParam) PURE
 创建一个Native窗口
 
HWND GetHwnd () PURE
 获取窗口HWND
 
BOOL SubclassWindow (HWND hWnd) PURE
 用SNativeWnd对象子类化一个HWND
 
HWND UnsubclassWindow (BOOL bForce) PURE
 反子类化
 
const MSG * GetCurrentMessage () SCONST PURE
 获取当前的窗口消息对象
 
int GetDlgCtrlID () SCONST PURE
 获取窗口ID
 
DWORD GetStyle () SCONST PURE
 获取窗口Style
 
DWORD GetExStyle () SCONST PURE
 获取窗口exStyle
 
LONG_PTR GetWindowLongPtr (int nIndex) SCONST PURE
 获取窗口关联数据
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong) PURE
 设置窗口关联数据
 
HWND GetParent () PURE
 获取父窗口
 
HWND SetParent (HWND hWndNewParent) PURE
 设置父窗口
 
BOOL IsWindowEnabled () SCONST PURE
 获取窗口的enable状态
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags) PURE
 修改窗口style
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags) PURE
 修改窗口exStyle
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags) PURE
 设置窗口的Pos
 
BOOL CenterWindow (HWND hWndCenter) PURE
 窗口居中
 
BOOL DestroyWindow () PURE
 销毁窗口
 
BOOL IsWindow () SCONST PURE
 检查是否为有效HWND
 
BOOL Invalidate (BOOL bErase) PURE
 刷新窗口
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase) PURE
 刷新窗口指定区域
 
BOOL GetWindowRect (LPRECT lpRect) SCONST PURE
 获取窗口位置
 
BOOL GetClientRect (LPRECT lpRect) SCONST PURE
 获取窗口客户区位置
 
BOOL ClientToScreen (LPPOINT lpPoint) SCONST PURE
 将相对窗口的坐标转换为屏幕坐标
 
BOOL ClientToScreen2 (LPRECT lpRect) SCONST PURE
 将相对窗口的矩形坐标转换为屏幕坐标
 
BOOL ScreenToClient (LPPOINT lpPoint) SCONST PURE
 将屏幕坐标转换为窗口坐标
 
BOOL ScreenToClient2 (LPRECT lpRect) SCONST PURE
 将屏幕矩形坐标转换为窗口坐标
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) SCONST PURE
 将一组窗口坐标转换为相对于另一个窗口的坐标
 
int MapWindowRect (HWND hWndTo, LPRECT lpRect) SCONST PURE
 将一个窗口矩形映射为相对于另一个窗口的矩形
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)) PURE
 启动一人定时器
 
BOOL KillTimer (UINT_PTR nIDEvent) PURE
 删除一个定时器
 
HDC GetDC () PURE
 获取窗口的客户区DC
 
HDC GetWindowDC () PURE
 获取窗口DC
 
int ReleaseDC (HDC hDC) PURE
 释放DC
 
BOOL CreateCaret (HBITMAP hBitmap, int nWidth, int nHeight) PURE
 创建一个光标
 
BOOL HideCaret () PURE
 隐藏光标
 
BOOL ShowCaret () PURE
 显示光标
 
HWND GetCapture () PURE
 获取当前有鼠标捕获的HWND
 
HWND SetCapture () PURE
 将当前窗口设置为捕获鼠标输入
 
BOOL ReleaseCapture () PURE
 退出鼠标捕获
 
HWND SetFocus () PURE
 让窗口成为接收键盘输入的焦点窗口
 
LRESULT SendMessage (UINT message, WPARAM wParam, LPARAM lParam) PURE
 同步执行一个消息到窗口处理过程
 
BOOL PostMessage (UINT message, WPARAM wParam, LPARAM lParam) PURE
 异步执行一个消息到窗口处理过程
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam, LPARAM lParam) PURE
 
BOOL SetWindowText (LPCTSTR lpszString) PURE
 设置窗口标题
 
int GetWindowText (LPTSTR lpszStringBuf, int nMaxCount) SCONST PURE
 获取窗口标题文本
 
BOOL IsIconic () SCONST PURE
 查询是否为最小化状态
 
BOOL IsZoomed () SCONST PURE
 查询是否为最大化状态
 
BOOL IsWindowVisible () SCONST PURE
 查询窗口是否可见
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint) PURE
 移动窗口位置
 
BOOL MoveWindow2 (LPCRECT lpRect, BOOL bRepaint) PURE
 移动窗口位置
 
BOOL ShowWindow (int nCmdShow) PURE
 显示窗口
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw) PURE
 设置窗口异形区域
 
BOOL SetLayeredWindowAttributes (COLORREF crKey, BYTE bAlpha, DWORD dwFlags) PURE
 设置窗口的分层属性
 
BOOL UpdateLayeredWindow (HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags) PURE
 更新分层窗口
 
void SetMsgHandler (FunMsgHandler fun, void *ctx) PURE
 设置窗口消息处理函数
 
MsgHandlerInfoGetMsgHandler () PURE
 获取窗口消息处理对象
 
- Public Member Functions inherited from IObjRef
long AddRef () PURE
 Increases the reference count.
 
long Release () PURE
 Decreases the reference count.
 
void OnFinalRelease () PURE
 Called when the reference count reaches zero and the object is about to be released.
 

Detailed Description

Definition at line 21 of file shostwnd-i.h.

Member Function Documentation

◆ AnimateHostWindow()

BOOL IHostWnd::AnimateHostWindow ( DWORD dwTime,
DWORD dwFlags )

动画显示/隐藏窗口

Parameters
dwTime
dwFlags
Returns
Remarks
参考API AnimateWindow

◆ CenterWindow()

BOOL IHostWnd::CenterWindow ( HWND hWndCenter)

窗口居中

Parameters
hWndCenter相对居中窗口
Returns
TRUE-SUCCEED

◆ ClientToScreen()

BOOL IHostWnd::ClientToScreen ( LPPOINT lpPoint)

将相对窗口的坐标转换为屏幕坐标

Parameters
[in]

out] lpPoint 待转换坐标

Returns
TRUE-SUCCEED

◆ ClientToScreen2()

BOOL IHostWnd::ClientToScreen2 ( LPRECT lpRect)

将相对窗口的矩形坐标转换为屏幕坐标

Parameters
[in]

out] lpRect 待转换坐标

Returns
TRUE-SUCCEED

◆ Create()

HWND IHostWnd::Create ( HWND hWndParent,
int x DEF_VAL0,
int y DEF_VAL0,
int nWidth DEF_VAL0,
int nHeight DEF_VAL0 )

创建窗口

Parameters
hWndParent
x
y
nWidth
nHeight
Returns
HWND

◆ CreateCaret()

BOOL IHostWnd::CreateCaret ( HBITMAP hBitmap,
int nWidth,
int nHeight )

创建一个光标

Parameters
hBitmap光标位图
Returns

◆ CreateEx()

HWND IHostWnd::CreateEx ( HWND hWndParent,
DWORD dwStyle,
DWORD dwExStyle,
int x,
int y,
int nWidth,
int nHeight,
IXmlNode *xmlInit DEF_VALNULL )

创建窗口

Parameters
hWndParent父窗口
dwStylestyle
dwExStyleexStyle
x
y
nWidth
nHeight
xmlInitinit xml node
Returns
HWND

◆ CreateNative()

HWND IHostWnd::CreateNative ( LPCTSTR lpWindowName,
DWORD dwStyle,
DWORD dwExStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
int nID,
LPVOID lpParam )

创建一个Native窗口

Parameters
lpWindowName窗口名
dwStyle窗口style
dwExStyle窗口exStyle
x窗口显示位置X
y窗口显示位置Y
nWidth窗口显示宽度
nHeight窗口显示高度
hWndParent父窗口
nID窗口ID
lpParam附加参数
Returns
窗口HWND

◆ DestroyWindow()

BOOL IHostWnd::DestroyWindow ( )

销毁窗口

Returns
TRUE-SUCCEED

◆ EnableDragDrop()

void IHostWnd::EnableDragDrop ( )

让窗口支持DragDrop

Returns

◆ EnablePrivateUiDef()

void IHostWnd::EnablePrivateUiDef ( BOOL bEnable)

是否启用布局中定义的私有UIDef对象

Parameters
BOOLbEnable TRUE-启动,FALSE-关闭
Returns
void
Remarks
当程序中需要重新从私有UIDef中获取数据时启动,启用完后关闭

◆ FindIChildByID()

IWindow * IHostWnd::FindIChildByID ( int nId)

根据ID查找子窗口

Parameters
nIdint–子窗口ID
Returns
IWindow*–匹配窗口
Remarks
采用广度优先算法搜索匹配子窗口

◆ FindIChildByName()

IWindow * IHostWnd::FindIChildByName ( LPCWSTR pszName)

根据Name查找子窗口

Parameters
pszNameLPCWSTR–子窗口Name
Returns
IWindow*–匹配窗口
Remarks
采用广度优先算法搜索匹配子窗口

◆ FindIChildByNameA()

IWindow * IHostWnd::FindIChildByNameA ( LPCSTR pszName)

根据Name查找子窗口

Parameters
pszNameLPCSTR–子窗口Name(utf8)
Returns

◆ GetCapture()

HWND IHostWnd::GetCapture ( )

获取当前有鼠标捕获的HWND

Returns
鼠标捕获的HWND

◆ GetClientRect()

BOOL IHostWnd::GetClientRect ( LPRECT lpRect)

获取窗口客户区位置

Parameters
[out]lpRect客户区位置
Returns
TRUE-SUCCEED

◆ GetCurrentMessage()

const MSG * IHostWnd::GetCurrentMessage ( )

获取当前的窗口消息对象

Returns
窗口消息对象指针

◆ GetDC()

HDC IHostWnd::GetDC ( )

获取窗口的客户区DC

Returns
客户区DC

◆ GetEventHandler()

EventHandlerInfo * IHostWnd::GetEventHandler ( )

获取事件处理对象

Returns
EventHandlerInfo*

◆ GetHwnd()

HWND IHostWnd::GetHwnd ( )

获取窗口HWND

Returns
窗口HWND

◆ GetIRoot()

IWindow * IHostWnd::GetIRoot ( )

获取Dui Root

Returns
Dui Root

◆ GetMsgHandler()

MsgHandlerInfo * IHostWnd::GetMsgHandler ( )

获取窗口消息处理对象

Returns
消息处理对象

◆ GetMsgLoop()

IMessageLoop * IHostWnd::GetMsgLoop ( )

获取窗口所属的msgloop对象

Parameters

return

◆ GetNcPainter()

INcPainter * IHostWnd::GetNcPainter ( )

获取非客户区的绘制对象

Returns
INcPainter *

◆ GetParent()

HWND IHostWnd::GetParent ( )

获取父窗口

Returns
父窗口HWND

◆ GetPresenter()

IHostPresenter * IHostWnd::GetPresenter ( )

获取窗口的上屏对象

Returns
IHostPresenter* - 上屏对象

◆ GetWindowDC()

HDC IHostWnd::GetWindowDC ( )

获取窗口DC

Returns
窗口DC

◆ GetWindowLongPtr()

LONG_PTR IHostWnd::GetWindowLongPtr ( int nIndex)

获取窗口关联数据

Parameters
nIndex数据索引
Returns
数据值

◆ GetWindowRect()

BOOL IHostWnd::GetWindowRect ( LPRECT lpRect)

获取窗口位置

Parameters
[out]lpRect窗口位置
Returns
TRUE-SUCCEED

◆ GetWindowText()

int IHostWnd::GetWindowText ( LPTSTR lpszStringBuf,
int nMaxCount )

获取窗口标题文本

Parameters
lpszStringBuf缓冲区
nMaxCount缓冲区长度
Returns
lpszStringBuf为null时返回数据长度

◆ HideCaret()

BOOL IHostWnd::HideCaret ( )

隐藏光标

Returns

◆ InitFromXml()

BOOL IHostWnd::InitFromXml ( IXmlNode * pNode)

从XML初始化窗口

Parameters
pNodeXML数据
Returns
TRUE-成功

◆ Invalidate()

BOOL IHostWnd::Invalidate ( BOOL bErase)

刷新窗口

Parameters
bErase清除窗口内容
Returns
TRUE-SUCCEED

◆ InvalidateRect()

BOOL IHostWnd::InvalidateRect ( LPCRECT lpRect,
BOOL bErase )

刷新窗口指定区域

Parameters
lpRect待刷新区域
bErase清除窗口内容
Returns
TRUE-SUCCEED

◆ IsIconic()

BOOL IHostWnd::IsIconic ( )

查询是否为最小化状态

Returns
TRUE-最小化

◆ IsTranslucent()

BOOL IHostWnd::IsTranslucent ( )

查询窗口的半透明标志

Returns
TRUE-窗口半透明

◆ IsWindow()

BOOL IHostWnd::IsWindow ( )

检查是否为有效HWND

Returns

◆ IsWindowEnabled()

BOOL IHostWnd::IsWindowEnabled ( )

获取窗口的enable状态

Returns
TRUE-enable

◆ IsWindowVisible()

BOOL IHostWnd::IsWindowVisible ( )

查询窗口是否可见

Returns
TRUE-可见

◆ IsZoomed()

BOOL IHostWnd::IsZoomed ( )

查询是否为最大化状态

Returns
TRUE-最大化

◆ KillTimer()

BOOL IHostWnd::KillTimer ( UINT_PTR nIDEvent)

删除一个定时器

Parameters
nIDEvent定时器ID
Returns

◆ MapWindowPoints()

int IHostWnd::MapWindowPoints ( HWND hWndTo,
LPPOINT lpPoint,
UINT nCount )

将一组窗口坐标转换为相对于另一个窗口的坐标

Parameters
hWndTo目标窗口
[in]

out] lpPoint 坐标数组

Parameters
nCount数组长度
Returns
TRUE-SUCCEED

◆ MapWindowRect()

int IHostWnd::MapWindowRect ( HWND hWndTo,
LPRECT lpRect )

将一个窗口矩形映射为相对于另一个窗口的矩形

Parameters
hWndTo目标窗口
[in]

out] lpRect 待转换矩形

Returns
TRUE-SUCCEED

◆ ModifyStyle()

BOOL IHostWnd::ModifyStyle ( DWORD dwRemove,
DWORD dwAdd,
UINT nFlags )

修改窗口style

Parameters
dwRemove待移除标志位
dwAdd待增加标志位
nFlagsWindow positioning flags
Returns
TRUE-SUCCEED

◆ ModifyStyleEx()

BOOL IHostWnd::ModifyStyleEx ( DWORD dwRemove,
DWORD dwAdd,
UINT nFlags )

修改窗口exStyle

Parameters
dwRemove待移除标志位
dwAdd待增加标志位
nFlagsWindow positioning flags
Returns
TRUE-SUCCEED

◆ MoveWindow()

BOOL IHostWnd::MoveWindow ( int x,
int y,
int nWidth,
int nHeight,
BOOL bRepaint )

移动窗口位置

Parameters
x
y
nWidth
nHeight
bRepaint刷新窗口标志
Returns

◆ MoveWindow2()

BOOL IHostWnd::MoveWindow2 ( LPCRECT lpRect,
BOOL bRepaint )

移动窗口位置

Parameters
lpRect目标位置
bRepaint刷新标志
Returns

◆ PostMessage()

BOOL IHostWnd::PostMessage ( UINT message,
WPARAM wParam,
LPARAM lParam )

异步执行一个消息到窗口处理过程

Parameters
messagemsg id
wParam
lParam
Returns
消息处理返回值

◆ ReleaseCapture()

BOOL IHostWnd::ReleaseCapture ( )

退出鼠标捕获

Returns

◆ ReleaseDC()

int IHostWnd::ReleaseDC ( HDC hDC)

释放DC

Parameters
hDCDC
Returns

◆ ScreenToClient()

BOOL IHostWnd::ScreenToClient ( LPPOINT lpPoint)

将屏幕坐标转换为窗口坐标

Parameters
[in]

out] lpPoint 待转换坐标

Returns
TRUE-SUCCEED

◆ ScreenToClient2()

BOOL IHostWnd::ScreenToClient2 ( LPRECT lpRect)

将屏幕矩形坐标转换为窗口坐标

Parameters
[in]

out] lpRect 待转换坐标

Returns
TRUE-SUCCEED

◆ SendMessage()

LRESULT IHostWnd::SendMessage ( UINT message,
WPARAM wParam,
LPARAM lParam )

同步执行一个消息到窗口处理过程

Parameters
messagemsg id
wParam
lParam
Returns
消息处理返回值

◆ SetCapture()

HWND IHostWnd::SetCapture ( )

将当前窗口设置为捕获鼠标输入

Returns
前一个HWND

◆ SetEventHandler()

void IHostWnd::SetEventHandler ( FunCallback fun,
void * ctx )

设置事件处理对象

Parameters
fun事件处理对象
ctx事件处理对象Context
Returns

◆ SetFocus()

HWND IHostWnd::SetFocus ( )

让窗口成为接收键盘输入的焦点窗口

Returns
前一个焦点窗口

◆ SetLayeredWindowAttributes()

BOOL IHostWnd::SetLayeredWindowAttributes ( COLORREF crKey,
BYTE bAlpha,
DWORD dwFlags )

设置窗口的分层属性

Parameters
crKey透明色
bAlpha透明度
dwFlags标志位
Returns

◆ SetLayoutId()

void IHostWnd::SetLayoutId ( LPCTSTR pszLayoutId)

设置窗口布局资源ID

Parameters
pszLayoutId布局资源ID
Returns

◆ SetMsgHandler()

void IHostWnd::SetMsgHandler ( FunMsgHandler fun,
void * ctx )

设置窗口消息处理函数

Parameters
fun消息处理函数
ctx消息处理函数Context
Returns

◆ SetParent()

HWND IHostWnd::SetParent ( HWND hWndNewParent)

设置父窗口

Parameters
hWndNewParent新父窗口HWND
Returns
原父窗口HWND

◆ SetPresenter()

void IHostWnd::SetPresenter ( IHostPresenter * pPresenter)

设置窗口上屏对象

Parameters
pPresenter上屏对象
Returns

◆ SetScale()

void IHostWnd::SetScale ( int nScale,
LPCRECT pDestRect )

设置窗口的dpi倍数

Parameters
intnScale dpi倍数,以100为基数
LPCRECTpDestRect 缩放后的窗口坐标
Returns
void

◆ SetTimer()

UINT_PTR IHostWnd::SetTimer ( UINT_PTR nIDEvent,
UINT nElapse,
void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)  )

启动一人定时器

Parameters
nIDEvent定时器ID
nElapse延时(ms)
lpfnTimer定时器处理函数,为null时产生WM_TIMER消息
Returns
定时器ID

◆ SetWindowLongPtr()

LONG_PTR IHostWnd::SetWindowLongPtr ( int nIndex,
LONG_PTR dwNewLong )

设置窗口关联数据

Parameters
nIndex数据索引
dwNewLong数据值
Returns
原数据值

◆ SetWindowPos()

BOOL IHostWnd::SetWindowPos ( HWND hWndInsertAfter,
int x,
int y,
int cx,
int cy,
UINT nFlags )

设置窗口的Pos

Parameters
hWndInsertAfterzorder位置
x
y
cx
cy
nFlags标志位
Returns
TRUE-SUCCEED

◆ SetWindowRgn()

int IHostWnd::SetWindowRgn ( HRGN hRgn,
BOOL bRedraw )

设置窗口异形区域

Parameters
hRgn异形区域
bRedraw刷新标志
Returns

◆ SetWindowText()

BOOL IHostWnd::SetWindowText ( LPCTSTR lpszString)

设置窗口标题

Parameters
lpszString标题文本
Returns

◆ ShowCaret()

BOOL IHostWnd::ShowCaret ( )

显示光标

Returns

◆ ShowHostWnd()

void IHostWnd::ShowHostWnd ( int uShowCmd,
BOOL bWaitAniDone )

显示或者隐藏HostWnd

Parameters
uShowCmd和ShowWindow参数相同
bWaitAniDone当窗口有配置进出动画时,等待动画完成标志
Returns

◆ ShowWindow()

BOOL IHostWnd::ShowWindow ( int nCmdShow)

显示窗口

Parameters
nCmdShow显示标志
Returns

◆ SubclassWindow()

BOOL IHostWnd::SubclassWindow ( HWND hWnd)

用SNativeWnd对象子类化一个HWND

Parameters
hWnd目标HWND
Returns
TRUE-成功

◆ UnsubclassWindow()

HWND IHostWnd::UnsubclassWindow ( BOOL bForce)

反子类化

Parameters
bForce为真是,如果当前窗口的wndproc不是SNativeWnd对象的窗口过程也执行反子类化
Returns
执行反子类化的窗口HWND

◆ UpdateLayeredWindow()

BOOL IHostWnd::UpdateLayeredWindow ( HDC hdcDst,
POINT * pptDst,
SIZE * psize,
HDC hdcSrc,
POINT * pptSrc,
COLORREF crKey,
BLENDFUNCTION * pblend,
DWORD dwFlags )

更新分层窗口

Parameters
hdcDst
pptDst
psize
hdcSrc
pptSrc
crKey
pblend
dwFlags
Returns

The documentation for this struct was generated from the following file: