Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 548
  • Last Modified:

Deleting the CTabCtrl Border

While trying to delete the border from a CTabCtrl I am doing this :
      long x = GetWindowLong(m_Tab,GWL_STYLE);
      x |= ~WS_BORDER;
      SetWindowLong(m_Tab,GWL_STYLE,x);
But the TabCtrl is not changed .
Why is that ??????????
0
sector
Asked:
sector
1 Solution
 
PriyeshCommented:
Ilanmoshe..
     I think u have got a mistake.... u have to "and" it not "or".. u know 1 & 0 = 0 and 1 | 0 = 1
so the code is x &= ~WS_BORDER if u want to remove the border..
See the border bit is set and u and a 0 with it to remove it.. if u or a 0, the set bit is unchanged..
   Regards..
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now