Subj : Re: Problem with compiling this code To : borland.public.cpp.borlandcpp From : Ed Mulroy Date : Wed Sep 07 2005 01:13 pm I think the error does not come from anything you show. As proof, the code below which is your code with stubs added for what you removed prior to posting, compiled and linked with no errors and no warnings. Look at what you did not show in your message for the source of the problem. .. Ed /*--------------------------------------------*/ #include class CTitleBar2 { public: CTitleBar2(); CTitleBar2(HINSTANCE hInst, HWND ParentWindow); //Creation virtual ~CTitleBar2(); //Destruction void Create(HINSTANCE hInst, HWND ParentWindow); //Set the header text eg: hostname, windowtitle ect... void SetText(LPTSTR TextOut); // Variable like ShowWindow but it triggers the scrolling feature void DisplayWindow(BOOL Show, BOOL SetHideFlag=FALSE); //Returns the window - This is stored // in the header cause of it size :) HWND GetSafeHwnd() { return m_hWnd; }; private: //Init if default variables void Init(); //Creates the window void CreateDisplay(); //Callbacks from buttons, timers, draw, ect ect static LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam); //StartPaint/EndPaint routine... void Draw(); //Default variabled used for creation of the window HINSTANCE hInstance; HWND Parent; HWND m_hWnd; //Variables for scrolling of the window BOOL SlideDown; BOOL AutoHide; //Is the pin pushed in or not... BOOL HideAfterSlide; //TRUE = Hide the dialog after slide int IntAutoHideCounter; //Routines to load pictures and free pictures void LoadPictures(); void FreePictures(); //Pictures for the menubar HBITMAP hClose; HBITMAP hMinimize; HBITMAP hMaximize; HBITMAP hPinUp; HBITMAP hPinDown; HWND Pin; //Text to show on titlebar and it corespondent font! :) LPTSTR Text; HFONT Font; }; CTitleBar2::CTitleBar2() {} CTitleBar2::~CTitleBar2() {} #pragma argsused CTitleBar2::CTitleBar2(HINSTANCE hInst, HWND ParentWindow) {} #pragma argsused void CTitleBar2::Create(HINSTANCE hInst, HWND ParentWindow) {} #pragma argsused void CTitleBar2::SetText(LPTSTR TextOut) {} #pragma argsused void CTitleBar2::DisplayWindow(BOOL Show, BOOL SetHideFlag) {} void CTitleBar2::Init() {} void CTitleBar2::CreateDisplay() {} void CTitleBar2::Draw() {} void CTitleBar2::LoadPictures() {} void CTitleBar2::FreePictures() {} LRESULT CALLBACK CTitleBar2::WndProc( HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) { return DefWindowProc(hwnd, iMsg, wParam, lParam); } extern HINSTANCE _hInstance; int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { CTitleBar2 ctb2(_hInstance, HWND_DESKTOP); return 0; } /*--------------------------------------------*/ > Scott Wilson wrote in message > news:431f0a1f@newsgroups.borland.com... > Hi, > I am having an issue with the compilation of this code (well this is the > class header where the error is flagging that the problem is): > > The Errors: > Error E2238 FullScreenTitleBar.h 53: Multiple decleration for CTitleBar2 > Error E2344 FullScreenTitleBar.h 52: Earlier declaration of CTitleBar2 > > > Any ideas? > > The code: > class CTitleBar2 // line 52 > { > ... .