an information 'bout |

  • Thread starter RicercatoreSbadato
  • Start date
R

RicercatoreSbadato

m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;

what does "|" mean? That the window is both WS_CHILD and
WS_CLIPCHILDREN?
 
E

EventHelix.com

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.
 
R

Rolf Magnus

RicercatoreSbadato said:
m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;

what does "|" mean?

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

red floyd

Rolf said:
RicercatoreSbadato wrote:




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)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top