an information 'bout |

Discussion in 'C++' started by RicercatoreSbadato, Sep 8, 2005.

  1. m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;

    what does "|" mean? That the window is both WS_CHILD and
    WS_CLIPCHILDREN?
     
    RicercatoreSbadato, Sep 8, 2005
    #1
    1. Advertising

  2. WS_CHILD and WS_CLIPCHILDREN are bit patterns. "I" is enabling the bits
    corresponding both the patterns.

    Thus the window would have the attributes of WS_CHILD and
    WS_CLIPCHILDREN.

    --
    EventStudio 2.5 - http://www.EventHelix.com/EventStudio
    Enter model in plain text;generate sequence diagram in PDF/Word
     
    EventHelix.com, Sep 8, 2005
    #2
    1. Advertising

  3. tnx ;)
     
    RicercatoreSbadato, Sep 8, 2005
    #3
  4. RicercatoreSbadato

    Rolf Magnus Guest

    RicercatoreSbadato wrote:

    > m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;
    >
    > what does "|" mean?


    Maybe you should get an entry level C++ book. '|' is C++'s 'or' operator.
     
    Rolf Magnus, Sep 8, 2005
    #4
  5. RicercatoreSbadato

    red floyd Guest

    Rolf Magnus wrote:
    > RicercatoreSbadato wrote:
    >
    >
    >> m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;
    >>
    >>what does "|" mean?

    >
    >
    > Maybe you should get an entry level C++ book. '|' is C++'s 'or' operator.
    >


    More specifically, it's C++'s *bitwise or* operator, as opposed to
    boolean or.

    i.e.

    assume WS_CHILD is 0x0001 and WS_CLIPCHILDREN is 0x0002

    Then WS_CHILD | WS_CLIPCHILDREN is 0x0003;

    Whereas the boolean or (||) would give a different result (namely 1)
     
    red floyd, Sep 8, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. z. f.
    Replies:
    0
    Views:
    718
    z. f.
    Feb 3, 2005
  2. Bruce
    Replies:
    1
    Views:
    350
    Lucas Tam
    Aug 18, 2005
  3. subrato
    Replies:
    8
    Views:
    943
    Juan T. Llibre
    Mar 14, 2006
  4. Tamer Ibrahim

    :( I asked a lot a bout date validation :(

    Tamer Ibrahim, Nov 12, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    316
    Paulo
    Nov 12, 2007
  5. .rhavin grobert
    Replies:
    8
    Views:
    379
    James Kanze
    Nov 28, 2008
Loading...

Share This Page