在 Void MainFrm::OnSize(UINT Type,int cx,int cy){}函数中 cx cy 分别代表的是窗口的尺寸吗? 我想在一个对话框类内读出该尺寸 我该用什么办法饿。。
解决方案 »
- tcp堆栈溢出 和粘包 应该是2个不同的概念吧,求你比较分析,另外,我最近做了粘包处理(加头部)和抓包(读网卡)分析,貌似还是感觉有丢包,求你进来看详解解释
- 求<com技术内幕>英文版电子书,pdf or chm,谢谢
- 弱弱的问一个问题:vc6.0为什么会报给我“'WSAIoctl' : undeclared identifier”
- UpDateData出问题!!!
- 需要在网页中实现摄像头采集静态图像,并以文件形式上传到服务器,谁有思路,经验进来谈谈
- 急!MSDN问题!
- VC中一个令人费解的语句
- 求助,人脸识别,有代码,但运行有错
- >>>>有关使用ado的疑问????????????
- int转成char*, 不用sprintf怎么做,谁能告诉我几种方法?
- 套接字传输速率的问题?
- 显示窗体不同位置(应该叫截取窗体)
GetWindowRect(&rect);
rect.Width()//宽 rect.Heigth()//高
dc.GetClientRect().x,
dc.GetClientRect().y
cx
Specifies the new width of the client area.
cy
Specifies the new height of the client area.
应该是GetClientRect
整个窗口直接通过GetWindowRect可以获得
而OnSize中的cx,cy是客户区的尺寸GetClientRect获得
CRect rect;
/*GetClientRect(&rect);*/
GetWindowRect(rect);
int width=rect.Width();
int height=rect.Height();
CRect rect;
GetClientRect(&rect);
int width=rect.Width();
int height=rect.Height();
GetClientRect(&rect);
int w=rect.Width();
int h=rect.Height();
CString str;
str.Format("宽=%d,高=%d",w,h);
MessageBox(str,"真的",0);
BOOL SetWindowPos(
HWND hWnd, // handle to window
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning flags
);函数都有了,可以了
在setWindowPos()里的 X 处写为 A-30 Y处写为 B-50 那么我每次呼出的对话框就肯定锁定在这个位置上了 不管主窗体的大小如何改变 我都放到这个位置 或者说是 这个点上。如果能实现的话麻烦告诉下好吗?