MoveWindow(0,0,100,100);正在将对话框移到中心. [英] MoveWindow(0,0,100,100); is moving the dialog to centre.

查看:224
本文介绍了MoveWindow(0,0,100,100);正在将对话框移到中心.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,


如果我使用this-> MoveWindow(0,0,100,100),我的MoveWindow会有一个小问题;要将对话框移到左上角,则移动窗口会将对话框移到中心而不是左上角.

我什至尝试过setwindowpos.但是却给出了同样的问题

谁能帮助我

谢谢
Abhishek.

Hi friends,


I have a small problem with MoveWindow if i use this->MoveWindow(0,0,100,100); to move the dialog to top left corner the movewindow is moving the dialog to the center instead of top left.

I even tried setwindowpos. But gives the same problem

Can any one help me

Thanking you,
Abhishek.

推荐答案

hi,


对不起,我发现了问题. !!

我在onsize()中执行getclientrect(xyz),并在oninitialize()中使用xyz客户端rect,因为先调用了oninitialize,然后再调用csize xyz的onsize具有错误的坐标.


抱歉,您的回复很晚,感谢您的支持. :)



Sorry i have found the problem. !!

I was doing getclientrect(xyz) in onsize() and using xyz client rect in oninitialize() since oninitialize is called first and then the onsize the crect xyz had wrong coordinate.


Sorry for late reply and thanks for your support. :)


这篇关于MoveWindow(0,0,100,100);正在将对话框移到中心.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆