+ x = winRect.left ;
+ y = winRect.top ;
+
+ if ( fgStructure.Window->Parent == NULL ) /* If this is not a subwindow ... */
+ {
+ /*
+ * Adjust the size of the window to allow for the size of the frame
+ */
+ width += (GetSystemMetrics( SM_CXSIZEFRAME ) - 1)*2;
+ height += (GetSystemMetrics( SM_CYSIZEFRAME ) - 1)*2 + GetSystemMetrics( SM_CYCAPTION );
+ }
+ else /* This is a subwindow, get the parent window's position and subtract it off */
+ {
+ GetWindowRect ( fgStructure.Window->Parent->Window.Handle, &winRect ) ;
+ x -= winRect.left + GetSystemMetrics( SM_CXSIZEFRAME ) ;
+ y -= winRect.top + GetSystemMetrics( SM_CXSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION ) ;
+ }