c++ - 代码总是提示要输入大括号,但又不缺少大括号
阿神
阿神 2017-04-17 14:45:01
0
3
554

1.总是提示输入大括号,但并不缺少大括号,而且输入后还是会有一样的提示
2.

if ( hWnd ) 
   {
      TCHAR szBuf[MAX_CLASSNAME];
      // Retrieve window class name
      GetClassName(hWnd szBuf,MAX_CLASSNAME);
      if ( lstrcmpi( szBuf, _T( "msctls_updown32" ) ) == 0 )   // Up-down is found
      {
         DWORD dwStyle = GetWindowLong( hWnd, GWL_STYLE );
         if ( ( dwStyle & UDS_ALIGNRIGHT || dwStyle & UDS_ALIGNLEFT ) &&
              SendMessage( hWnd, UDM_GETBUDDY, 0, 0L ) == (LONG)m_hWnd )
         {         
            RECT rc;
            GetWindowRect( hWnd, &rc );
            const int nEdge = GetSystemMetrics( SM_CXEDGE );
            if ( dwStyle & UDS_ALIGNRIGHT )
               rect.right += ( rc.right - rc.left ) - nEdge;
            else // UDS_ALIGNLEFT
               rect.left -= ( rc.right - rc.left ) - nEdge;

            HDC hDC = GetDC( hWnd );   // We must draw the lines onto spin control DC

            COLORREF clr = GetSysColor( m_nState & dsHoverMask ? COLOR_3DDKSHADOW : COLOR_3DHIGHLIGHT );
            if ( !IsWindowEnabled( m_hWnd ) )
               clr = GetSysColor( COLOR_3DFACE );
            FillSolidRect( hDC, 1, 1, rc.right - rc.left - nEdge - 1, 1, clr );
            if ( dwStyle & UDS_ALIGNLEFT )
               FillSolidRect( hDC, 1, 1, 1, rc.bottom - rc.top - nEdge - 1, clr );

            ReleaseDC( hWnd, hDC );
         }
      }
   }
   3.错误提示
   

阿神
阿神

闭关修行中......

全部回覆(3)
阿神

szBuf前少了個逗號了吧?

阿神

編譯器的提醒不是給人看的,可以試試clang

PHPzhong

如果編譯器能夠智慧指出錯誤,還要程式設計師幹嘛。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!