使用winx库设定xp界面风格(学习winx心得)

来源:互联网 发布:甲骨文 谷歌 java版权 编辑:程序博客网 时间:2024/05/24 06:47

winx库我就不多说了如果你要学习请参看

http://blog.csdn.net/xushiweizh

上面还有winx库的例子。


首先感谢许大虾!!

#include <winx.h>   //使用winx库

#include "resource.h"


// -------------------------------------------------------------------------

// CHelloDlg


class CHelloDlg : public winx::ModalDialog<CHelloDlg, IDD_HELLO>

{

};//这里就是winx库的调用!


// -------------------------------------------------------------------------


int APIENTRY WinMain(HINSTANCE hInstance,    //这是windows设计的必须main函数!

                     HINSTANCE hPrevInstance,

                     LPSTR     lpCmdLine,

                     int       nCmdShow)

{

    CHelloDlg dlg;//和mfc的文档一样

    dlg.DoModal();

    return 0;

}

编译联接好后我们会生成一个可执行文件假设文件名为hello.exe。

接着我们再建立一个记事本文件然后键入如下文件

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

<assemblyIdentity

    name="Hello"           

    processorArchitecture="x86"

    version="1.0.0.0"

    type="win32"/>

<description>Hello, WINX!!!</description>

<dependency>

    <dependentAssembly>

        <assemblyIdentity

            type="win32"

            name="Microsoft.Windows.Common-Controls"

            version="6.0.0.0"

            processorArchitecture="x86"

            publicKeyToken="6595b64144ccf1df"

            language="*"

        />

    </dependentAssembly>

</dependency>

</assembly>


然后保存为"hello.exe.manifest"。(文件名必须是编译联接好的可执行文件的文件名加上.manifest)最后可以试一下你生成的hello文件。


小提示:                   1.如果单独编译还需要自己添加文件头和连接库

                          2.设置Include路径

                         3.Alt+F7 => C/C++ => Category: Preprocessor => Additional include directories

                        4.D:/winx-1.1.01-with-wtl/winx/include(这是我的路径)                 

                       5.设置Lib路径

                      6.Alt+F7 => Link => Category: Input => Additional library path

                     7.D:/winx-1.1.01-with-wtl/winx/lib(这是我的路径)


如有不明之处请email联系,邮箱为why99fun@163.com。

原创粉丝点击