代码改变世界

Visual C++ 2011-10-21

  Clingingboy  阅读(705)  评论(0编辑  收藏  举报

 

熟悉熟悉api…

1.BOOL IsIconic( HWND hWnd );

The IsIconic function determines whether the specified window is minimized (iconic).

2.BOOL IsZoomed( HWND hWnd );

The IsZoomed function determines whether a window is maximized.

3.HWND GetAncestor( HWND hwnd, UINT gaFlags );

The GetAncestor function retrieves the handle to the ancestor of the specified window.

GA_PARENT
Retrieves the parent window. This does not include the owner, as it does with the GetParent function.
GA_ROOT
Retrieves the root window by walking the chain of parent windows.
GA_ROOTOWNER
Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent.

4.MoveWindow and SetWindowPos

http://apps.hi.baidu.com/share/detail/23103714

5.DeferWindowPos

该函数为特定的窗口指定一个新窗口位置,并将其输入由BeginDeferWindowPos创建的结构,以便在EndDeferWindowPos函数执行期间更新(SetWindowPos立即执行)

HDWP hdwp=::BeginDeferWindowPos(1);
::DeferWindowPos(hdwp,m_pMainWnd->GetSafeHwnd(),HWND_TOPMOST,0,0,100,100,SWP_SHOWWINDOW);
::EndDeferWindowPos(hdwp);

6.CascadeWindows

The CascadeWindows function cascades the specified child windows of the specified parent window. (层叠方式排列窗口)

CascadeWindows(NULL,MDITILE_ZORDER,NULL,NULL,NULL);

7.BringWindowToTop和SetForegroundWindow

BringWindowToTop还是搞不懂…

8.TileWindows

以平铺顺序排列窗口,与CascadeWindows一样,都是属于排列窗体

TileWindows(NULL,MDITILE_HORIZONTAL,NULL,NULL,NULL);
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
历史上的今天:
2010-10-26 光照模型
2010-10-26 OpenGL学习笔记(12)基本光照
2010-10-26 OpenGL学习笔记(11)雾效果
2010-10-26 OpenGL学习笔记(10)抗锯齿
2010-10-26 OpenGL学习笔记(9)颜色混合
点击右上角即可分享
微信分享提示