-2

I just want to ask, because I couldn't figure out how to formulate my question, I know there will be for sure some answers on google, but I just don't know what to ask for. So.. I want to make dword with options. I mean something like this;

DWORD dwOpt = 0;
dwOpt = NOTUSE_D3D | USE_FULLSCREEN |.....

I think this code is ok, please correct me if it isn't. However, when I'm trying to check if it is there, I'm just getting bad results, and that's most likely because I don't know how to make it and I just used logic for it. I'm using:

BOOL bFullScreen = dwOpt |= USE_FULLSCREEN //? TRUE : FALSE;

Thank you for answers.

KateItaly
  • 47
  • 5

1 Answers1

0

You probably wanted to write

BOOL bFullScreen != (dwOpt & USE_FULLSCREEN) ? TRUE : FALSE;
                        // ^^^^^^^^^^^^^^^^ Use the boolean & (and) operator
                        //                  to check if particular bits are set.
πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190