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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Centre Window

Status
Not open for further replies.

Skute

Programmer
Joined
Jul 21, 2003
Messages
272
Location
GB
Hi,

i want to know howto centre my application in the screen, ive been looking for functions like GetScreenRect or something so i can calculate the dimensions and positions i need.

Anyone know the function i need?
 
in MFC you can just
wnd->CenterWindow();

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
sorry, im not using MFC. Should have specified.

 
do it manually,
use GetDesktopWindow and get width, height of desktop window. Compute center position of your window and set its position.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top