Time:09-27
CodePudding user response:
duilib Windows about the shadow in the attribute set is invalid, after which the code contained in the WndShadow file
class DIRECTUI_API CSkinShadow {Public: CSkinShadow (void); Virtual ~ CSkinShadow (void); Protected: //instance handle, used to register a serial port and create a window The static HINSTANCE s_hInstance; The HWND m_hWnd; The HWND m_hParent; # pragma warning (push) # pragma warning (4786) disable: The static STD: : map# pragma warning (pop) LONG m_OriParentProc;//the Original WndProc of the parent window BYTE m_Status; Enum ShadowStatus {SS_ENABLED=1,//Shadow is enabled, if not, the following one is always false SS_VISABLE=1 & lt; <1,//Shadow window is visible SS_PARENTVISIBLE=1 & lt; <2,//the Parent window is visible, if not, the above one is always false }; Signed char m_nEdgeSize;//Shadow window size, relative to the parent window size LPARAM m_WndSize;//Restore the last parent window size, //2 to determine the update strategy when the parent window is resized Bool m_bUpdate;//Set this to true if the shadow should not be update until next WM_PAINT is received The static CDuiImage m_Image; //HINSTANCE m_hInstance; Public: The static bool Initialize (HINSTANCE HINSTANCE); The static void SetImage (UINT nID, LPCTSTR lpszType, HINSTANCE HINSTANCE); Void the Create (HWND hParentWnd); Bool SetSize (int NewSize=0); //the Redraw, resize and move the shadow //called when the window resized or shadow properties changed, but not only version without resizing Void the Update (HWND hParent); Void ShowShadow (BOOL bShow, HWND hParent); //Show/hide the shadow, depending on the enabled status stored in m_Status Void Show (HWND hParent); Protected: //static LRESULT CALLBACK WndProc (HWND HWND, UINT uMsg, WPARAM WPARAM, LPARAM LPARAM); The static LRESULT CALLBACK ParentProc (HWND HWND, UINT uMsg, WPARAM WPARAM, LPARAM LPARAM); }; }
Page link:https//www.codepudding.com/Softwareengineering/37433.html