在c++编程中提示错误不能在成员函数的类外部重新申明该函数?

1.在程序中出现不能在在成员函数的类外部重新申明此函数的错误提示
2.

 void CCoolControlsManager::CCMControl::DrawScrollBar(HDC hDC, const RECT& rect,
       int nType, BOOL bScrollbarCtrl);
   {
   int nScrollSize = GetSystemMetrics( SM_CXHSCROLL );

   // The minimal thumb size depends on the system version
   // For Windows 98 minimal thumb size is a half of scrollbar size 
   // and for Windows NT is always 8 pixels regardless of system metrics. 
   // I really don't know why.
   int nMinThumbSize;
   if ( GetVersion() & 0x80000000 ) // Windows 98 code
      nMinThumbSize = nScrollSize / 2;
   else                    
      nMinThumbSize = 8;
   
   // Calculate the arrow rectangles
   RECT rc1 = rect, rc2 = rect;   
   if (true)
   {

   } (nType == SB_HORZ);
   {
      if ( ( rect.right - rect.left ) < 2 * nScrollSize )
         nScrollSize = ( rect.right - rect.left ) / 2;

      rc1.right = rect.left + nScrollSize;
      rc2.left = rect.right - nScrollSize;
   }
   else // SB_VERT
   {
      if ( ( rect.bottom - rect.top ) < 2 * nScrollSize )
         nScrollSize = ( rect.bottom - rect.top ) / 2;

      rc1.bottom = rect.top + nScrollSize;      
      rc2.top = rect.bottom - nScrollSize;
   }  

3.提示错误

clipboard.png

阅读 9.8k
1 个回答

多了一个分号

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题