CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: case statements

  1. #1
    Join Date
    May 2001
    Posts
    9

    case statements

    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



  2. #2
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: case statements

    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





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured