分享

【原创】SkinMegic部分函数的使用 - lvan的日志 - 网易博客

 xihayouyi 2011-01-08

1.SetDialogSkin

int SetDialogSkin(
        LPCTSTR pszName       //Specifies the name of the skin object.
        );
Use SetDialogSkin to set default dialog skin. newly-created dialog will automatically be skinned after this function called. SetDialogSkin have no effect on dialog before the function called. If the dialog has menu, must use SetWindowSkin to set the dialog skin.
    这个函数用来设置对话框的默认的皮肤。如果是新创建的对话框,那么会自动的套用此函数所设置的对话框样式。如果是此函数调用之前创建的对话框则没有任何作用。而且如果创建的对话框有菜单,则必须调用此函数。
2.SetWindowSkin
int SetWindowSkin(
        HWND  hWnd,           //Handle to the window to be set skin
        LPCTSTR pszName       //Specifies the name of the skin object.
        );
Use SetWindowSkin to skin the standard windows - with rectangular opaque client area and region-based non-client area, menu bar, system/maximize/minimize/close buttons, caption and sizing edges and corners. 
这个函数用来设置标准窗口的皮肤。所谓标准窗口,就是有矩形客户区和非客户区,菜单条,系统/最大/最小/关闭按钮,标题以及可变化的边缘。(一般情况下就是说的单文档窗口)
3.SetShapeWindowSkin
int SetShapeWindowSkin(
        HWND  hWnd,           //Handle to the window to be set skin
        LPCTSTR pszName       //Specifies the name of the skin object.
        );

Use SetShapeWindowSkin function to skin application-specific windows without non-client area and menu bar. These windows can have absolutely any shape or even be translucent。

此函数用来设置没有非客户区和菜单条的特殊的窗口。这样的窗口可以使任何形状的,甚至是半透明的。
4.SetSingleDialogSkin
int SetSingleDialogSkin(
        HWND  hWnd,           //Handle to the window to be set skin
        LPCTSTR pszName       //Specifies the name of the skin object.
        );

Use SetSingleDialogSkin to skin the standard dialog If the dialog has menu, must use SetWindowSkin to set the dialog skin.

这个函数用来设置单个的对话框的皮肤,就是说它只对当前使用的对话框窗口起作用。但是如果对话框带有菜单,则必须要调用SetWindowSkin 函数。

 

5.SetControlSkin

int SetControlSkin(
        HWND  hWnd,           //Handle to the window to be set skin
        LPCTSTR pszName,       //Specifies the name of the skin object.
        LPCTSTR pszOwnerSkinName //Specifies the owner name of the pszName.
        );
pszOwnerSkinName
[in] Specifies the Owner name of the skin control object. SkinMagic use a tree to organize all skin objects, the owner is the parent object of a child object.

Use SetControlSkin to skin the individual control. you only use this API with the standard controls.

你可以使用此函数来对标准的控件进行换肤。

 

6.LoadSkinFile

int LoadSkinFile(
        LPCTSTR pszFileName        //the name of the skin file
        );
LoadSkinFile function load skin resource from disk file.
此函数用来加载皮肤文件。

        

其它函数我觉得没有太大用处。如果我们使用了皮肤,我们仍然可以自己绘制界面,它对于某些消息有截断,但是对大部分消息还是可以重载的。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多