OnEraseBkgnd(CDC *pDC)
来源:互联网 发布:数据绑定 编辑:程序博客网 时间:2024/04/30 02:44
/*
float fsp[2];
POINT Newp; //获取现在对话框的大小
CRect recta;
GetClientRect(&recta); //取客户区大小
Newp.x=recta.right-recta.left;
Newp.y=recta.bottom-recta.top;
fsp[0]=(float)Newp.x/Old.x;
fsp[1]=(float)Newp.y/Old.y;
CRect Rect;
int woc;
CPoint OldTLPoint,TLPoint; //左上角
CPoint OldBRPoint,BRPoint; //右下角
HWND hwndChild=::GetWindow(m_hWnd,GW_CHILD); //列出所有控件
while(hwndChild)
{
woc=::GetDlgCtrlID(hwndChild);//取得ID
GetDlgItem(woc)->GetWindowRect(Rect);
ScreenToClient(Rect);
OldTLPoint = Rect.TopLeft();
TLPoint.x = long(OldTLPoint.x*fsp[0]);
TLPoint.y = long(OldTLPoint.y*fsp[1]);
OldBRPoint = Rect.BottomRight();
BRPoint.x = long(OldBRPoint.x *fsp[0]);
BRPoint.y = long(OldBRPoint.y *fsp[1]);
Rect.SetRect(TLPoint,BRPoint);
GetDlgItem(woc)->MoveWindow(Rect,TRUE);
hwndChild=::GetWindow(hwndChild, GW_HWNDNEXT);
}
Old=Newp;
float fsp[2];
POINT Newp; //获取现在对话框的大小
CRect recta;
GetClientRect(&recta); //取客户区大小
Newp.x=recta.right-recta.left;
Newp.y=recta.bottom-recta.top;
fsp[0]=(float)Newp.x/Old.x;
fsp[1]=(float)Newp.y/Old.y;
CRect Rect;
int woc;
CPoint OldTLPoint,TLPoint; //左上角
CPoint OldBRPoint,BRPoint; //右下角
HWND hwndChild=::GetWindow(m_hWnd,GW_CHILD); //列出所有控件
while(hwndChild)
{
woc=::GetDlgCtrlID(hwndChild);//取得ID
GetDlgItem(woc)->GetWindowRect(Rect);
ScreenToClient(Rect);
OldTLPoint = Rect.TopLeft();
TLPoint.x = long(OldTLPoint.x*fsp[0]);
TLPoint.y = long(OldTLPoint.y*fsp[1]);
OldBRPoint = Rect.BottomRight();
BRPoint.x = long(OldBRPoint.x *fsp[0]);
BRPoint.y = long(OldBRPoint.y *fsp[1]);
Rect.SetRect(TLPoint,BRPoint);
GetDlgItem(woc)->MoveWindow(Rect,TRUE);
hwndChild=::GetWindow(hwndChild, GW_HWNDNEXT);
}
Old=Newp;
- OnEraseBkgnd(CDC *pDC)
- CDC、HDC、pDC
- OnDraw(CDC* pDC)
- OnDraw(CDC *pDC)
- CDC *pDC HDC
- CDC、HDC、pDC
- CDC、HDC、pDC-------C++
- OnDraw(CDC* pDC) .
- OnDraw(CDC* pDC)详解
- CDC、HDC、pDC
- CDC、HDC、pDC (转)
- CDC *pDC HDC hDC 的区别
- OnDraw(CDC* pDC) Serialize(CArchive& ar)
- CDC *pDC=GetDC();具体是什么意思?
- CDC * pdc 指针 与 hdc 转换
- CDC、HDC、pDC之间的关系
- pDC CDC GetDC hdc HDC hWnd HWND CWnd pWnd ---整理!!
- CDC *pDC和HDC hdc有什么不同
- android 获取IP
- RMAN学习9——丢失联机redolog的恢复
- 云计算与它的三个架构
- 返回顶部
- dijkstra+堆优化 USACO 3.2.6 Sweet Butter
- OnEraseBkgnd(CDC *pDC)
- PHP IPV6转换函数
- poj3281--网络流 + 拆点
- Vi恢复上一步操作
- Android——APK反编译总结1.1版本
- S3C2440上LCD驱动(FrameBuffer)实例开发讲解
- 关于Google Map地图偏移研究测试
- struts中ForwardAction的使用,以统一的方式*.do访问应用
- Msys+MinGW编译VLC1.1.11