- GetWindowRect( window->Parent->Window.Handle, &rect );
- AdjustWindowRect ( &rect, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS |
- WS_CLIPCHILDREN, FALSE );
+ RECT parentRect;
+ GetWindowRect( window->Parent->Window.Handle, &parentRect );
+ x -= parentRect.left + GetSystemMetrics( SM_CXSIZEFRAME ) * 2;
+ y -= parentRect.top + GetSystemMetrics( SM_CYSIZEFRAME ) * 2 +
+ GetSystemMetrics( SM_CYCAPTION );