DuiLib(6)——界面管家CPaintManagerUI的函数简介

来源:互联网 发布:网络大专可以做人事吗 编辑:程序博客网 时间:2024/05/29 13:31

一、Init

void Init(HWND hWnd, LPCTSTR pstrName = NULL);
初始化界面元素,清除所有的图片、字体、……总之就是一切恢复到原始状态了

二、Invalidate

void Invalidate();    void Invalidate(RECT& rcItem);
刷新界面,刷新某个区域

三、pos与size

关于界面位置与尺寸

    POINT GetMousePos() const;    SIZE GetClientSize() const;    SIZE GetInitSize();    void SetInitSize(int cx, int cy);    RECT& GetSizeBox();    void SetSizeBox(RECT& rcSizeBox);    RECT& GetCaptionRect();    void SetCaptionRect(RECT& rcCaption);    SIZE GetRoundCorner() const;    void SetRoundCorner(int cx, int cy);    SIZE GetMinInfo() const;    void SetMinInfo(int cx, int cy);    SIZE GetMaxInfo() const;    void SetMaxInfo(int cx, int cy);

四、Font

关于字体

    TFontInfo* GetDefaultFontInfo();    void SetDefaultFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic, bool bShared = false);    DWORD GetCustomFontCount(bool bShared = false) const;    HFONT AddFont(int id, LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic, bool bShared = false);    HFONT GetFont(int id);    HFONT GetFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);int GetFontIndex(HFONT hFont, bool bShared = false);int GetFontIndex(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic, bool bShared = false);    void RemoveFont(HFONT hFont, bool bShared = false);    void RemoveFont(int id, bool bShared = false);    void RemoveAllFonts(bool bShared = false);    TFontInfo* GetFontInfo(int id);    TFontInfo* GetFontInfo(HFONT hFont);

五、Image

关于图片

    const TImageInfo* GetImage(LPCTSTR bitmap);    const TImageInfo* GetImageEx(LPCTSTR bitmap, LPCTSTR type = NULL, DWORD mask = 0, bool bUseHSL = false);    const TImageInfo* AddImage(LPCTSTR bitmap, LPCTSTR type = NULL, DWORD mask = 0, bool bUseHSL = false, bool bShared = false);    const TImageInfo* AddImage(LPCTSTR bitmap, HBITMAP hBitmap, int iWidth, int iHeight, bool bAlpha, bool bShared = false);    void RemoveImage(LPCTSTR bitmap, bool bShared = false);    void RemoveAllImages(bool bShared = false);static void ReloadSharedImages();void ReloadImages();

六、控件焦点Focus

    CControlUI* GetFocus() const;    void SetFocus(CControlUI* pControl, bool bFocusWnd=true);    void SetFocusNeeded(CControlUI* pControl);

七、定时器Timer

    bool SetTimer(CControlUI* pControl, UINT nTimerID, UINT uElapse);    bool KillTimer(CControlUI* pControl, UINT nTimerID);    void KillTimer(CControlUI* pControl);    void RemoveAllTimers();

八、获取控件

    CControlUI* GetRoot() const;    CControlUI* FindControl(POINT pt) const;    CControlUI* FindControl(LPCTSTR pstrName) const;    CControlUI* FindSubControlByPoint(CControlUI* pParent, POINT pt) const;    CControlUI* FindSubControlByName(CControlUI* pParent, LPCTSTR pstrName) const;    CControlUI* FindSubControlByClass(CControlUI* pParent, LPCTSTR pstrClass, int iIndex = 0);    CDuiPtrArray* FindSubControlsByClass(CControlUI* pParent, LPCTSTR pstrClass);

九、操作子控件

    bool AttachDialog(CControlUI* pControl);    bool InitControls(CControlUI* pControl, CControlUI* pParent = NULL);bool RenameControl(CControlUI* pControl, LPCTSTR pstrName);    void ReapObjects(CControlUI* pControl);

十、进程、路径、资源

    static HINSTANCE GetInstance();    static CDuiString GetInstancePath();    static CDuiString GetCurrentPath();    static HINSTANCE GetResourceDll();    static const CDuiString& GetResourcePath();    static const CDuiString& GetResourceZip();    static bool IsCachedResourceZip();    static HANDLE GetResourceZipHandle();    static void SetInstance(HINSTANCE hInst);    static void SetCurrentPath(LPCTSTR pStrPath);    static void SetResourceDll(HINSTANCE hInst);    static void SetResourcePath(LPCTSTR pStrPath);static void SetResourceZip(LPVOID pVoid, unsigned int len);    static void SetResourceZip(LPCTSTR pstrZip, bool bCachedResourceZip = false);    static bool GetHSL(short* H, short* S, short* L);    static void SetHSL(bool bUseHSL, short H, short S, short L); // H:0~360, S:0~200, L:0~200     static void ReloadSkin();static CPaintManagerUI* GetPaintManager(LPCTSTR pstrName);static CDuiPtrArray* GetPaintManagers();    static bool LoadPlugin(LPCTSTR pstrModuleName);    static CDuiPtrArray* GetPlugins();




0 0
原创粉丝点击