void MoveCenter(HWND hWnd)
{
RECT rectDesktop, rectWindow;
GetWindowRect(GetDesktopWindow(),&rectDesktop) ;
GetWindowRect(hWnd,&rectWindow) ;

LONG width, height;
width = rectWindow.right - rectWindow.left ;
height = rectWindow.bottom - rectWindow.top ;

LONG x, y;
x = LONG((rectDesktop.right - width) / 2) ;
y = LONG((rectDesktop.bottom - height) / 2) ;

MoveWindow(hWnd, x, y, width, height, TRUE) ;
} 
:D