Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving DocumentView center [x,y] coordinates?

Status
Not open for further replies.

dex1123

Programmer
May 9, 2000
35
BG
I have created a simple MFC app derived from CView base class. I need to someway get the center point's coordinates in the DocView pane. How could I possibly do that? Thank you in advance.<br><br>dex
 
Dear dex,<br><br>In any method of your CView derived class after the window has been created:<br><br>CRect rc;<br>GetClientRect( &rc);<br>CPoint pt(rc.Width() / 2, rc.Height() / 2);<br><br>Good luck<br>-pete
 
Thanks a lot. Your post really helped. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top