Click to See Complete Forum and Search --> : case statements


barazor
July 18th, 2001, 03:57 PM
Im currently chomping on this bit of code, trying to convert it to c++. Would the "select case fstyle && &h80" be equal to "if (fStyle and &H80)"? I know its rough but im just wondering what the bit of code below does...

Select Case fStyle And &H80
Case &H80
XBorder = GetSystemMetrics(SM_CXDLGFRAME)
Case Else
XBorder = GetSystemMetrics(SM_CXFRAME)
End Select

Ghost308
July 18th, 2001, 04:09 PM
If you are trying to convert this code to C++, think of the Select Case statement like you would a Switch statement in C++.


switch(fStyle && &h80)
{
case &h80:
XBorder = GetSystemMetrics(SM_CXDLGFRAME);
default:
XBorder = GetSystemMetrics(SM_CXFRAME);
}

I doubt that is exactly the c++ code you'll need but maybe a template for it? good luck!

Jeff