Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 18-Aug-11 6:02am
v5
Comments
Richard MacCutchan 18-Aug-11 11:47am    
I just tried this and it works fine, maybe you are doing something wrong.
abhishek.biradar 18-Aug-11 11:59am    
There is one parent window and 3 child windows. 2 child windows where created by me earlier few days back
I created this third window today and did movewindow the other 2 window are moving correctly by don't know what is the problem with this third one
Richard MacCutchan 18-Aug-11 13:22pm    
Without seeing some of your code I don't know either.
TRK3 18-Aug-11 16:50pm    
Are you calling MoveWindow after the dialog is created and displayed? Or are you calling it earlier? Basically, I am asking is there something else that's moving the window after you move it, but before it gets painted?

1 solution

hi,


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. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900