当前位置:首页 > Windows程序 > 正文

GetWindowDC GetWindowRect GetClientDC(GetDC) GetClientRect]

2021-03-26 Windows程序

::GetWindowDC(m_hWnd); // 表示GetWindowDC()是一个全局函数,作用域大

GetWindowDC() 获得的设备环境覆盖了整个窗口(包括非客户区),例如标题栏、菜单、滚动条,以及边框

GetWindowRect() rect表示应用程序窗口在屏幕中的位置rigth left top bottom

GetDC()  获取的是应用程序中客户区的环境设备

GetClientRect()  rect表示应用程序客户区的rect. left right top bottom 其中left=0 top=0(恒成立)

[

该函数获取窗口客户区的坐标。客户区坐标指定客户区的左上角和右下角。由于客户区坐标是相对窗口客户区的左上角而言的,因此左上角坐标为(0,0),注意一下:窗口的客户区为窗口中除标题栏、菜单栏之外的地方。

]

[00012]-[2015-08-27]-[00]-[Windows 程序设计 ---GetWindowDC GetWindowRect GetClientDC(GetDC) GetClientRect]

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/68040.html