- // need to remove WS_CLIPSIBLINGS from all sibling windows
- // that are within this staticbox if set
- LONG style = ::GetWindowLong(child, GWL_STYLE);
- if ( style & WS_CLIPSIBLINGS )
- {
- style &= ~WS_CLIPSIBLINGS;
- ::SetWindowLong(child, GWL_STYLE, style);
-
- // MSDN: "If you have changed certain window data using
- // SetWindowLong, you must call SetWindowPos to have the
- // changes take effect."
- ::SetWindowPos(child, NULL, 0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
- SWP_FRAMECHANGED);
- }
-
- AutoHRGN hrgnChild(::CreateRectRgnIndirect(&rc));
- ::CombineRgn(hrgn, hrgn, hrgnChild, RGN_DIFF);
+ style &= ~WS_CLIPSIBLINGS;
+ ::SetWindowLong(child, GWL_STYLE, style);
+
+ // MSDN: "If you have changed certain window data using
+ // SetWindowLong, you must call SetWindowPos to have the
+ // changes take effect."
+ ::SetWindowPos(child, NULL, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
+ SWP_FRAMECHANGED);