error: changes meaning of `HDC' from `typedef struct HDC__*HDC'
-
hi,
ich hab versucht die Beispiele von diesem Tutorial zu übersetzen (letztes Beispiel).
Ein Codeausschnitt:class CSkin { // -------------------------------------------------------------------------- // the skin window procedure, where the class // will handle WM_PAINT and WM_LBUTTONDOWN automatically. // -------------------------------------------------------------------------- friend LRESULT CALLBACK SkinWndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam); private: // the associated window handle HWND m_hWnd; // the old window procedure WNDPROC m_OldWndProc; // skin region HRGN m_rgnSkin; // the internal skin device context handle HDC m_dcSkin; // bitmap and old bitmap from the device context HBITMAP m_hBmp, m_hOldBmp; // skin dimensions int m_iWidth, m_iHeight; // on|off toggle bool m_bEnabled; // tell the class if it has a window subclassed. bool m_bHooked; // skin retrieval helper bool GetSkinData(int iSkinRegion, int iSkinBitmap); public: // ---------------------------------------------------------------------------- // constructor 1 - use it when you have not already created the app window. // this one will not subclass automatically, you must call Hook() to subclass. // will throw an exception if unable to initialize skin from resource. // ---------------------------------------------------------------------------- CSkin(int iSkinRegion, int iSkinBitmap); // ---------------------------------------------------------------------------- // constructor 2 - use it when you have already created the app window. // this one will subclass the window automatically. // will throw an exception if unable to initialize skin from resource. // ---------------------------------------------------------------------------- CSkin(HWND hWnd, int iSkinRegion, int iSkinBitmap); // ---------------------------------------------------------------------------- // destructor - will free allocated resources. // ---------------------------------------------------------------------------- virtual ~CSkin(); // ---------------------------------------------------------------------------- // subclass a window. // ---------------------------------------------------------------------------- bool Hook(HWND hWnd); // ---------------------------------------------------------------------------- // unsubclass the subclassed window. // ---------------------------------------------------------------------------- bool UnHook(); // ---------------------------------------------------------------------------- // tell us if we have a window subclassed. // ---------------------------------------------------------------------------- bool Hooked(); // ---------------------------------------------------------------------------- // toggle skin on/off. // ---------------------------------------------------------------------------- bool Enable(bool bEnable); // ---------------------------------------------------------------------------- // tell if the skinning is enabled // ---------------------------------------------------------------------------- bool Enabled(); // ---------------------------------------------------------------------------- // return the skin bitmap width. // ---------------------------------------------------------------------------- int Width(); // ---------------------------------------------------------------------------- // return the skin bitmap height. // ---------------------------------------------------------------------------- int Height(); // ---------------------------------------------------------------------------- // return the skin device context. // ---------------------------------------------------------------------------- HDC HDC(); // hier Fehlermeldung }; HDC CSkin::HDC() { return m_dcSkin; }Bei
HDC HDC();
bekomme ich folgende Fehlermeldung:error: changes meaning of `HDC' from `typedef struct HDC__*HDC'
Wo liegt der Fehler??/Wie kann ich ihn beheben??
mfg ghill
-
Funktion anders nennen?
-
Namenskonflikt
.
-
was für nen dummer fehler.
vielen dank, jetzt gehts.