﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>学习日记 &#187; ui</title>
	<atom:link href="https://www.softwareace.cn/?cat=79&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://www.softwareace.cn</link>
	<description>时刻想着为自己的产品多做一些对他好的事情</description>
	<lastBuildDate>Fri, 20 Mar 2026 06:58:28 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>分享Duilib中基于wke的浏览器控件</title>
		<link>https://www.softwareace.cn/?p=1615</link>
		<comments>https://www.softwareace.cn/?p=1615#comments</comments>
		<pubDate>Fri, 31 Mar 2017 02:38:28 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1615</guid>
		<description><![CDATA[概述 wke是基于谷歌chrome浏览器源代码的裁剪版本，大小仅仅只有10M左右，无需依赖其他的扩展库（跟CE [&#8230;]]]></description>
				<content:encoded><![CDATA[<p style="color: #454545;">概述<br />
wke是基于谷歌chrome浏览器源代码的裁剪版本，大小仅仅只有10M左右，无需依赖其他的扩展库（跟CEF的一大堆大约40M的DLL来比简直爽呆了），就可以在本地使用谷歌内核快速加载网页。网上也有基于wke在Duilib 上扩展的控件代码，其实wke头文件挺清楚的了，接口一目了然，特别是JS与C++交互的函数更是容易看懂，也没什么难的，你也可以做到的。</p>
<p style="color: #454545;">代码<br />
毕竟是裁剪库，有的功能还是没有接口来处理的（比如网页加载前、页面跳转、菜单消息……），头文件代码：</p>
<p></p><pre class="crayon-plain-tag">#ifndef __UIWKEWEBKIT_H_
#define __UIWKEWEBKIT_H_
#pragma once
#include "wke.h"
#include &lt;string&gt;
using std::wstring;
 
namespace DuiLib
{
    ///////////////////////////////////////////
    //网页加载状态改变的回调
    class CWkeWebkitLoadCallback
    {
    public:
        virtual void    OnLoadFailed()=0;
        virtual void    OnLoadComplete()=0;
        virtual void    OnDocumentReady()=0;
    };
    ///////////////////////////////////////////
    //网页标题、地址改变的回调
    class CWkeWebkitClientCallback
    {
    public:
        virtual void    OnTitleChange(const CDuiString&amp; strTitle)=0;
        virtual void    OnUrlChange(const CDuiString&amp; strUrl)=0;
    };
 
    class CWkeWebkitUI :
        public CControlUI,
        public wkeBufHandler
    {
    public:
        CWkeWebkitUI(void);
        ~CWkeWebkitUI(void);
        virtual void    onBufUpdated (const HDC hdc,int x, int y, int cx, int cy);
        virtual LPCTSTR    GetClass()const;
        virtual LPVOID    GetInterface(LPCTSTR pstrName);
        virtual void    DoEvent(TEventUI&amp; event);
        virtual void    DoPaint(HDC hDC, const RECT&amp; rcPaint);
        virtual void    SetPos(RECT rc);
        virtual void    DoInit();
        virtual void    SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
        //////////////////////////////////////
        const    wstring&amp; GetUrl()const ;
        bool    CanGoBack() const;
        bool    GoBack();
        bool    CanGoForward() const;
        bool    GoForward();
        void    StopLoad();
        void    Refresh();
        wkeWebView    GetWebView();
        void    SetLoadCallback(CWkeWebkitLoadCallback* pCallback);
        CWkeWebkitLoadCallback* GetLoadCallback();
        void    Navigate(LPCTSTR lpUrl);
        void    LoadFile(LPCTSTR lpFile);
        void    LoadHtml(LPCTSTR lpHtml);
    protected:
        void    StartCheckThread();
        void    StopCheckThread();
        static    void OnTitleChange(const struct _wkeClientHandler* clientHandler, const wkeString title);
        static  void OnUrlChange(const struct _wkeClientHandler* clientHandler, const wkeString url);
    private:
        static int    m_bWebkitCount;
        HANDLE        m_hCheckThread;
        wstring        m_strUrl;
        wkeWebView    m_pWebView;
        wkeClientHandler    m_ClientHandler;
        CWkeWebkitLoadCallback*        m_pLoadCallback;
        CWkeWebkitClientCallback*    m_pClientCallback;
    };
}
 
#endif//__UIWKEWEBKIT_H_</pre><p><span style="color: #454545;">实现部分代码：</span></p><pre class="crayon-plain-tag">#include "StdAfx.h"
#include "UIWkeWebkit.h"
#pragma comment(lib, "DuiEx/wke/wke")
 
namespace DuiLib{
///////////////////////////////////////////////////
//网页加载状态监测线程
DWORD WINAPI CheckThreadFun(LPVOID lpParam)
{
    CWkeWebkitUI* pWebkitUI=(CWkeWebkitUI*)lpParam;
    wkeWebView    pWebView=pWebkitUI-&gt;GetWebView();
    if ( NULL == pWebView )
        return 1;
    CWkeWebkitLoadCallback* pCallback=pWebkitUI-&gt;GetLoadCallback();
    if ( NULL == pCallback )
        return 1;
    bool bOver=false;
    while( !pWebView-&gt;isLoaded() )
    {
        if ( !bOver &amp;&amp; pWebView-&gt;isDocumentReady() )
        {
            pCallback-&gt;OnDocumentReady();
            bOver=true;
        }
        if ( pWebView-&gt;isLoadFailed() )
        {
            pCallback-&gt;OnLoadFailed();
            return 1;
        }
        ::Sleep(30);
    }
    if ( pWebView-&gt;isLoadComplete() )
        pCallback-&gt;OnLoadComplete();
    return 0;
}
 
//////////////////////////////////////////////////////
int CWkeWebkitUI::m_bWebkitCount=0;
CWkeWebkitUI::CWkeWebkitUI(void)
:m_pWebView(NULL)
,m_hCheckThread(NULL)
,m_pLoadCallback(NULL)
,m_pClientCallback(NULL)
{
    if ( 0 == m_bWebkitCount )
        wkeInit();
    m_pWebView=wkeCreateWebView();
    m_pWebView-&gt;setBufHandler(this);
    m_ClientHandler.onTitleChanged    =&amp;CWkeWebkitUI::OnTitleChange;
    m_ClientHandler.onURLChanged    =&amp;CWkeWebkitUI::OnUrlChange;
    m_bWebkitCount++;
}
 
CWkeWebkitUI::~CWkeWebkitUI(void)
{
    StopCheckThread();
    m_pManager-&gt;KillTimer(this);
    wkeDestroyWebView(m_pWebView);
    m_bWebkitCount--;
    if ( 0 == m_bWebkitCount )
        wkeShutdown();
}
 
LPCTSTR CWkeWebkitUI::GetClass() const
{
    return L"WkeWebkitUI";
}
 
LPVOID CWkeWebkitUI::GetInterface( LPCTSTR pstrName )
{
    if( _tcscmp(pstrName, _T("WkeWebkit")) == 0 ) 
        return static_cast&lt;CWkeWebkitUI*&gt;(this);
    return CControlUI::GetInterface(pstrName);
}
 
void CWkeWebkitUI::DoEvent( TEventUI&amp; event )
{
    switch( event.Type )
    {
    case UIEVENT_SETFOCUS:
        if ( m_pWebView ) m_pWebView-&gt;focus(); break;
    case UIEVENT_KILLFOCUS:
        if ( m_pWebView ) m_pWebView-&gt;unfocus(); break;
    case UIEVENT_WINDOWSIZE:
        if ( m_pWebView ) m_pWebView-&gt;resize(GET_X_LPARAM(event.lParam), GET_Y_LPARAM(event.lParam)); break;
    case UIEVENT_CHAR:
        {
            if ( NULL == m_pWebView ) break;
            unsigned int charCode = event.wParam;
            unsigned int flags = 0;
            if (HIWORD(event.lParam) &amp; KF_REPEAT)
                flags |= WKE_REPEAT;
            if (HIWORD(event.lParam) &amp; KF_EXTENDED)
                flags |= WKE_EXTENDED;
            bool bHandled=m_pWebView-&gt;keyPress(charCode, flags, false);
            if ( bHandled )
                return ;
            break;
        }
    case UIEVENT_KEYDOWN:
        {
            if ( NULL == m_pWebView ) break;
            unsigned int flags = 0;
            if (HIWORD(event.lParam) &amp; KF_REPEAT)
                flags |= WKE_REPEAT;
            if (HIWORD(event.lParam) &amp; KF_EXTENDED)
                flags |= WKE_EXTENDED;
            bool bHandled=m_pWebView-&gt;keyDown(event.wParam, flags, false);
            if ( event.wParam == VK_F5 )
                Refresh();
            if ( bHandled )
                return ;
            break;
        }
    case UIEVENT_KEYUP:
        {
            if ( NULL == m_pWebView ) break;
            unsigned int flags = 0;
            if (HIWORD(event.lParam) &amp; KF_REPEAT)
                flags |= WKE_REPEAT;
            if (HIWORD(event.lParam) &amp; KF_EXTENDED)
                flags |= WKE_EXTENDED;
            bool bHandled=m_pWebView-&gt;keyUp(event.wParam, flags, false);
            if ( bHandled )
                return ;
            break;
        }
    case UIEVENT_CONTEXTMENU:
        {
            if ( NULL == m_pWebView ) break;
            unsigned int flags = 0;
            if (event.wParam &amp; MK_CONTROL)
                flags |= WKE_CONTROL;
            if (event.wParam &amp; MK_SHIFT)
                flags |= WKE_SHIFT;
            if (event.wParam &amp; MK_LBUTTON)
                flags |= WKE_LBUTTON;
            if (event.wParam &amp; MK_MBUTTON)
                flags |= WKE_MBUTTON;
            if (event.wParam &amp; MK_RBUTTON)
                flags |= WKE_RBUTTON;
            bool handled = m_pWebView-&gt;contextMenuEvent(event.ptMouse.x, event.ptMouse.y, flags);
            if ( handled )
                return ;
            break;
        }
    case UIEVENT_MOUSEMOVE:
    case UIEVENT_BUTTONDOWN:
    case UIEVENT_BUTTONUP:
    case UIEVENT_RBUTTONDOWN:
    case UIEVENT_DBLCLICK:
        {
            HWND hWnd=m_pManager-&gt;GetPaintWindow();
            if ( event.Type == UIEVENT_BUTTONDOWN )
            {
                ::SetFocus(hWnd);
                SetCapture(hWnd);
            }
            else if ( event.Type == UIEVENT_BUTTONUP )
                ReleaseCapture();
            unsigned int flags = 0;
            if (event.wParam &amp; MK_CONTROL)
                flags |= WKE_CONTROL;
            if (event.wParam &amp; MK_SHIFT)
                flags |= WKE_SHIFT;
 
            if (event.wParam &amp; MK_LBUTTON)
                flags |= WKE_LBUTTON;
            if (event.wParam &amp; MK_MBUTTON)
                flags |= WKE_MBUTTON;
            if (event.wParam &amp; MK_RBUTTON)
                flags |= WKE_RBUTTON;
            UINT uMsg=0;
            switch ( event.Type )
            {
            case UIEVENT_BUTTONDOWN:    uMsg=WM_LBUTTONDOWN; break;
            case UIEVENT_BUTTONUP:        uMsg=WM_LBUTTONUP; break;
            case UIEVENT_RBUTTONDOWN:    uMsg=WM_RBUTTONDOWN; break;
            case UIEVENT_DBLCLICK:        uMsg=WM_LBUTTONDBLCLK; break;
            case UIEVENT_MOUSEMOVE:        uMsg=WM_MOUSEMOVE; break;
            }
            bool bHandled = m_pWebView-&gt;mouseEvent(uMsg, event.ptMouse.x-m_rcItem.left, \
                event.ptMouse.y-m_rcItem.top, flags);
            if ( bHandled )
                return ;
            break;
        }
    case UIEVENT_TIMER:
        if ( m_pWebView )
            m_pWebView-&gt;tick();
        break;
    case UIEVENT_SCROLLWHEEL:
        {
            POINT pt;
            pt.x = LOWORD(event.lParam);
            pt.y = HIWORD(event.lParam);
            int nFlag=GET_X_LPARAM(event.wParam);
            int delta = (nFlag==SB_LINEDOWN)?-120:120;
            unsigned int flags = 0;
            if (event.wParam &amp; MK_CONTROL)
                flags |= WKE_CONTROL;
            if (event.wParam &amp; MK_SHIFT)
                flags |= WKE_SHIFT;
            if (event.wParam &amp; MK_LBUTTON)
                flags |= WKE_LBUTTON;
            if (event.wParam &amp; MK_MBUTTON)
                flags |= WKE_MBUTTON;
            if (event.wParam &amp; MK_RBUTTON)
                flags |= WKE_RBUTTON;
            bool handled = m_pWebView-&gt;mouseWheel(pt.x, pt.y, delta, flags);
            if ( handled )
                return ;
            break;
        }
    default:
        CControlUI::DoEvent(event); break;
    }
}
 
void CWkeWebkitUI::DoPaint( HDC hDC, const RECT&amp; rcPaint )
{
    if ( m_pWebView )
    {
        RECT rcInsert;
        IntersectRect(&amp;rcInsert, &amp;m_rcItem, &amp;rcPaint);
        m_pWebView-&gt;paint(hDC, rcInsert.left, rcInsert.top, \
            rcInsert.right-rcInsert.left, rcInsert.bottom-rcInsert.top, \
            rcInsert.left-m_rcItem.left, rcInsert.top-m_rcItem.top, true);
    }
}
 
void CWkeWebkitUI::onBufUpdated( const HDC hdc,int x, int y, int cx, int cy )
{
    RECT rcValide={ x, y, x+cx, y+cy };
    ::OffsetRect(&amp;rcValide, m_rcItem.left, m_rcItem.top);
    HWND hWnd=m_pManager-&gt;GetPaintWindow();
    ::InvalidateRect(hWnd, &amp;rcValide, TRUE);
}
 
void CWkeWebkitUI::Navigate( LPCTSTR lpUrl )
{
    if ( m_pWebView )
    {
        m_pWebView-&gt;loadURL(lpUrl);
        StartCheckThread();
    }
}
 
void CWkeWebkitUI::SetPos( RECT rc )
{
    CControlUI::SetPos(rc);
    if ( m_pWebView )
        m_pWebView-&gt;resize(rc.right-rc.left, rc.bottom-rc.top);
}
 
void CWkeWebkitUI::DoInit()
{
    if ( !m_strUrl.empty() )
        Navigate(m_strUrl.c_str());
    m_pManager-&gt;SetTimer(this, 100, 100);
}
 
void CWkeWebkitUI::StartCheckThread()
{
    StopCheckThread();
    m_hCheckThread=::CreateThread(NULL, 0, CheckThreadFun, this, 0, NULL);
}
 
void CWkeWebkitUI::StopCheckThread()
{
    if ( m_hCheckThread )
    {
        if ( ::WaitForSingleObject(m_hCheckThread, 10) != WAIT_OBJECT_0 )
            ::TerminateThread(m_hCheckThread, 0);
        ::CloseHandle(m_hCheckThread);
        m_hCheckThread = NULL;
    }
}
 
bool CWkeWebkitUI::CanGoBack() const
{
    return m_pWebView?m_pWebView-&gt;canGoBack():false;
}
 
bool CWkeWebkitUI::GoBack()
{
    return m_pWebView?m_pWebView-&gt;goBack():false;
}
 
bool CWkeWebkitUI::CanGoForward() const
{
    return m_pWebView?m_pWebView-&gt;canGoForward():false;
}
 
bool CWkeWebkitUI::GoForward()
{
    return m_pWebView?m_pWebView-&gt;goForward():false;
}
 
void CWkeWebkitUI::StopLoad()
{
    if ( m_pWebView )
        m_pWebView-&gt;stopLoading();
}
 
void CWkeWebkitUI::Refresh()
{
    if ( m_pWebView )
    {
        StopCheckThread();
        m_pWebView-&gt;reload();
        StartCheckThread();
    }
}
 
wkeWebView CWkeWebkitUI::GetWebView()
{
    return m_pWebView;
}
 
void CWkeWebkitUI::SetLoadCallback( CWkeWebkitLoadCallback* pCallback )
{
    m_pLoadCallback=pCallback;
}
 
CWkeWebkitLoadCallback* CWkeWebkitUI::GetLoadCallback()
{
    return m_pLoadCallback;
}
 
void CWkeWebkitUI::OnTitleChange( const struct _wkeClientHandler* clientHandler, const wkeString title )
{
 
}
 
void CWkeWebkitUI::OnUrlChange( const struct _wkeClientHandler* clientHandler, const wkeString url )
{
 
}
 
void CWkeWebkitUI::LoadFile( LPCTSTR lpFile )
{
    if ( m_pWebView )
        m_pWebView-&gt;loadFile(lpFile);
}
 
void CWkeWebkitUI::LoadHtml( LPCTSTR lpHtml )
{
    if ( m_pWebView )
        m_pWebView-&gt;loadHTML(lpHtml);
}
 
const wstring&amp; CWkeWebkitUI::GetUrl() const
{
    return m_strUrl;
}
 
void CWkeWebkitUI::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue )
{
    if ( _tcscmp(pstrName, _T("url")) == 0 )
        m_strUrl = pstrValue;
    else
        CControlUI::SetAttribute(pstrName, pstrValue);
}
 
}</pre><p>&nbsp;</p>
<p style="color: #454545;">解析：<br />
主要处理的就是消息部分，把这个区域的那种消息分发给wke的接口去处理。另外就是加了个线程，检测网页加载状态，通过回调通知网页加载完成、失败、DOC完成（需要用户先初始化回调指针才会通知用户）。<br />
控件定义完成后，我们需要来配置XML了：</p>
<p style="color: #454545;">
<p style="color: #454545;">放在一个布局里面，指定URL即可，你也可以加上其他属性然后在SetAttribute中对这些属性进行初始化。</p>
<p style="color: #454545;">运行程序，一个无窗口的chrome内核网页控件就展示出来了：</p>
<p style="color: #454545;"><img src="http://static.ithtw.com/wp-content/uploads/2016/01/082314kQA.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1615</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>duilib tag</title>
		<link>https://www.softwareace.cn/?p=949</link>
		<comments>https://www.softwareace.cn/?p=949#comments</comments>
		<pubDate>Mon, 15 Sep 2014 02:07:28 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=949</guid>
		<description><![CDATA[http://www.tuicool.com/topics/11300021]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.tuicool.com/topics/11300021" target="_blank">http://www.tuicool.com/topics/11300021</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=949</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chromium Embedded Framework 中文文档（简介）（转）</title>
		<link>https://www.softwareace.cn/?p=745</link>
		<comments>https://www.softwareace.cn/?p=745#comments</comments>
		<pubDate>Wed, 26 Mar 2014 08:26:02 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=745</guid>
		<description><![CDATA[简介 &#160; Chromium Embedded Framework (CEF)是由 Marshall  [&#8230;]]]></description>
				<content:encoded><![CDATA[<h2>简介</h2>
<p>&nbsp;</p>
<p>Chromium Embedded Framework (CEF)是由 Marshall Greenblatt 在2008年创办的开源项目，致力于基于Google Chromium项目开发一个Web控件。 CEF目前已支持多种编程语言和操作系统，能方便地集成到现有或者新的应用程序中，设计上，它追求高性能的同时，也追求易于使用，它的基本框架通过原生库提供C和C++的编程接口，这些接口将宿主程序与Chromium与WebKit的实现细节隔离，能让浏览器与应用程序无缝集成，并支持自定义插件、协议、Javascript对象与扩展。宿主程序还能根据需要控制资源加载、页面跳转、上下文菜单、打印等等。这些好处都是在支持Google Chrome同等效率与HTML5技术可用的基本上提供的。<br />
大量的个人与组织为CEF的开发提供了时间与资源上的贡献，但是我们需要社区更多的投入，来支持CEF核心项目与扩展地对其它语言与框架提供支持的项目（参见扩展项目一节）。如果你有兴趣为CEF提供时间与金钱上的支持，请参见</p>
<p><a href="http://www.magpcss.org/ceforum/donate.php" rel="nofollow">CEF Donations</a> 页面。</p>
<p>&nbsp;</p>
<h2><a name="Binary_Distributions"></a>编译发行版本</h2>
<p>编译发行版本，包涵所有构建基于CEF应用程序所需的文件，在下载章节提供下载，该版本是可以独立使用的，不依赖于CEF或者Chromium的源代码。</p>
<p>&nbsp;</p>
<h2><a name="Source_Distributions"></a>源代码发行版本</h2>
<p>CEF项目是Chromium项目（http://chromium.org）的扩展项目，因此，要编译CEF源代码需要先下载Chromium源代码（下载方式见http://dev.chromium.org/developers/how-tos/get-the-code）并且根据你所选的系统与编译指示安装所有依赖的项目；然后，将CEF的文件放在Chromium的src目录顶层，跟base/chrome/thrid-party这些目录一起，比方说如果你的Chromium安装目录是C:\svn\Chromium\src那么CEF的文件应该在C:\svn\Chromium\src\cef。<a href="http://code.google.com/p/chromiumembedded/source/browse/trunk/CHROMIUM_BUILD_COMPATIBILITY.txt" rel="nofollow">CHROMIUM_BUILD_COMPATIBILITY.txt</a> 文件有CEF与Chromium版本兼容性的说明信息,如果要将Chromium升级某一版本，使用<br />
gclient sync &#8211;revision src@#### &#8211;force，</p>
<p>此外，DEPS文件将确保其它目录以合适的形式下载。在大多数系统下，编译需要提供至少4GB内存。</p>
<p>&nbsp;</p>
<h3><a name="Building_on_Windows"></a>在Windows下编译</h3>
<p>跟随你的Visual Studio版本的 <a href="http://dev.chromium.org/developers/how-tos/build-instructions-windows" rel="nofollow">Windows build instructions</a> ，运行CEF根目录下的cef_create_projects.bat脚本，根据<a href="http://code.google.com/p/gyp/" rel="nofollow">GYP</a>的配置生成Visual Stodio项目文件。如果你机器上同时安装了VS2005和VS2008，那么在运行cef_create_projects脚本前，可通过设置GYP_MSVS_VERSION 环境变量为&#8221;2005&#8243; 或&#8221;2008&#8243;来指定版本。</p>
<p>通过将gclient工具集成到CEF，可以自动在Chromium源代码更新后下载CEF源代码更新和运行<tt>cef_create_projects。编辑</tt><tt>位于Chromium src目录父目录(上例中是"C:\svn\Chromium") 的.gclient</tt>文件，在已有的solutions数组中添加如下的行:</p><pre class="crayon-plain-tag">solutions = [&nbsp;{ #Existing definitions here...&nbsp;},&nbsp;# BEGIN NEW LINES&nbsp;{ &quot;name&quot; &nbsp; &nbsp; &nbsp; &nbsp;: &quot;src/cef&quot;, &nbsp; &nbsp; &quot;url&quot; &nbsp; &nbsp; &nbsp; &nbsp; : &quot;http://chromiumembedded.googlecode.com/svn/trunk&quot;,&nbsp;},&nbsp;#END NEW LINES ]</pre><p></p>
<h3><a name="Building_on_Mac_OS_X"></a>Mac OS X下编译</h3>
<p>目前仅支持Mac OS X 10.6 (Snow Leopard) 和10.7 (Lion) ，编译结果可运行于10.5, 10.6 and 10.7。根据<a href="http://code.google.com/p/chromium/wiki/MacBuildInstructions" rel="nofollow">Mac build instructions</a>正确的配置系统，如果是10.7和Xcode 4，请遵循<a href="http://code.google.com/p/chromium/wiki/Xcode4Tips" rel="nofollow">Xcode4Tips</a>中额外的编译指示。</p>
<p>运行CEF根目录下的<tt>cef_create_projects.sh可根据</tt><a href="http://code.google.com/p/gyp/" rel="nofollow">GYP</a>的配置生成XCode项目文件。</p>
<p>&nbsp;</p>
<h3><a name="Building_on_Linux"></a>Linux下的编译</h3>
<p>开发中。</p>
<h2><a name="External_Projects"></a>扩展项目</h2>
<p>CEF基础框架支持C和C++语言，感谢其它维护者的努力工作，CEF可以支持更多的编程语言与框架。这些扩展项目并非由CEF团队维护，所以如果你有任何问题，请直接联系各项目的维护者。</p>
<ul>
<li>.Net - <a href="https://github.com/chillitom/CefSharp" rel="nofollow">https://github.com/chillitom/CefSharp</a></li>
<li>.Net - <a href="https://bitbucket.org/fddima/cefglue" rel="nofollow">https://bitbucket.org/fddima/cefglue</a></li>
<li>Delphi - <a href="http://code.google.com/p/delphichromiumembedded/" rel="nofollow">http://code.google.com/p/delphichromiumembedded/</a></li>
<li>Java - <a href="http://code.google.com/p/javachromiumembedded/" rel="nofollow">http://code.google.com/p/javachromiumembedded/</a></li>
</ul>
<p>如果你维护着一个不在这个列表中的项目，请到<a href="http://www.magpcss.org/ceforum/" rel="nofollow">CEF Forum</a>发贴或者直接联系Marshall。</p>
<h2><a name="Support"></a>支持</h2>
<p><a href="http://code.google.com/p/chromiumembedded/wiki/GeneralUsage" rel="nofollow">General Usage Wiki page</a>提供使用CEF的概览，CEF支持与相关讨论在<a href="http://www.magpcss.org/ceforum/" rel="nofollow">CEF Forum</a>中进行。</p>
<h2><a name="Helping_Out"></a>帮助</h2>
<p>CEF仍有大量工作需要开展，如果你想为CEF做出贡献请查看Open状态的Issue，或者在CEF的源代码中搜索TODO，我们还需要人为所有支持的功能编写测试用例。</p>
<h2><a name="Notable_Changes"></a>重大更改</h2>
<p>此处并未列出所有的版本,完整版本列表请查看 <a href="http://code.google.com/p/chromiumembedded/source/list" rel="nofollow">Changes list</a>。</p>
<p><strong>9月 23, 2011:</strong> 编译版本293，添加对VS2010的支持，并包含以下改进与Bug修复:</p>
<ul>
<li>将char16_t更名为char16修复VS2010因char16_t变成内建类型造成的编译错误 (<a title="CEF build broken with Visual Studio 2010" href="http://code.google.com/p/chromiumembedded/issues/detail?id=243"> issue #243 </a>).</li>
<li>自定义Sheme支持异步处理响应 (<a title="Support asynchronous continuation of custom scheme handler read requests" href="http://code.google.com/p/chromiumembedded/issues/detail?id=269"> issue #269 </a>).</li>
<li>添加CefDragHandler支持拖放数据与取消拖放请求的体验(<a title="Provide a way to examine the drop contents in JavaScript events" href="http://code.google.com/p/chromiumembedded/issues/detail?id=297"> issue #297 </a>).</li>
<li>添加CefBrowser::HasDocument()方法，用于测试document是否已完成加载 (<a title="Blank popups should be closed automatically" href="http://code.google.com/p/chromiumembedded/issues/detail?id=307"> issue #307 </a>).</li>
<li>CefBase类添加虚析构函数(<a title="Add virtual destructors for CEF base classes" href="http://code.google.com/p/chromiumembedded/issues/detail?id=321"> issue #321 </a>).</li>
<li>修复使用V8造成的内存泄漏 (<a title="Potential memory leak in V8 extension" href="http://code.google.com/p/chromiumembedded/issues/detail?id=323"> issue #323 </a>).</li>
<li>提升 V8 字符串转换效率 (<a title="Potential memory leak in V8 extension" href="http://code.google.com/p/chromiumembedded/issues/detail?id=323"> issue #323 </a>).</li>
<li>增加V8存取器的异常返回能力(<a title="CefV8Accessor doesn't allow return exception" href="http://code.google.com/p/chromiumembedded/issues/detail?id=327"> issue #327 </a>).</li>
<li>如果V8处理程序没有返回值，返回undefined取代返回null(<a title="CefV8Handler default return value is null, instead of undefined" href="http://code.google.com/p/chromiumembedded/issues/detail?id=329"> issue #329 </a>).</li>
<li>由于实现bug的问题，默认情况下关闭合成加速(<a title="Angle GL implementation does not composite text correctly with accelerated compositing enabled" href="http://code.google.com/p/chromiumembedded/issues/detail?id=334">issue #334</a>, <a title="Desktop GL implementation crashes using WebGL with accelerated compositing enabled" href="http://code.google.com/p/chromiumembedded/issues/detail?id=335">issue #335</a>, <a title="Command buffer GL implementation does not support accelerated compositing" href="http://code.google.com/p/chromiumembedded/issues/detail?id=337">issue #337</a>).</li>
</ul>
<p>&nbsp;</p>
<p><strong>August 9, 2011:</strong> Binary release 275 contains the following enhancements and bug fixes.</p>
<ul>
<li>关闭触摸屏的支持，以使Google Map API功能正常(<a title="Mouse zoom/pan not working with Google Map API" href="http://code.google.com/p/chromiumembedded/issues/detail?id=134"> issue #134 </a>).</li>
<li>修复一个执行大量同步加载请求时死循环的bug (<a title="deadlock with SyncRequestProxy" href="http://code.google.com/p/chromiumembedded/issues/detail?id=192"> issue #192 </a>).</li>
<li>修复OnResourceResponse拼写错误(<a title="Typo: CefRequestHandler.OnResourceReponse" href="http://code.google.com/p/chromiumembedded/issues/detail?id=270"> issue #270 </a>).</li>
<li>修复一个在某些情况下关机时会造成Crash的线程问题(<a title="CEF haphazardly crashes at CefShutdown" href="http://code.google.com/p/chromiumembedded/issues/detail?id=277"> issue #277 </a>).</li>
<li>增加accelerated_video_enabled, accelerated_drawing_enabled 和accelerated_plugins_enabled浏览器设置(<a title="enable additional WebPreferences accelerated features" href="http://code.google.com/p/chromiumembedded/issues/detail?id=278"> issue #278 </a>).</li>
<li>添加在某些windows机器上加速内容需要的d3dx9_43.dll和d3dcompiler_43.dll文件(<a title="Include d3dx9_43.dll and d3dcompiler_43.dll with binary release" href="http://code.google.com/p/chromiumembedded/issues/detail?id=280"> issue #280 </a>).</li>
<li>清理模态窗口回调实现 (<a title="Clean up the usage/meaning of UIT_GetMainWndHandle()" href="http://code.google.com/p/chromiumembedded/issues/detail?id=281"> issue #281 </a>).</li>
<li>关闭语音输入，避免在Google搜索页面点话筒图标会crash的问题。 (<a title="crash when clicking microphone icon for x-webkit-speech" href="http://code.google.com/p/chromiumembedded/issues/detail?id=282"> issue #282 </a>).</li>
<li>当将drag_drop_disabled 设为true时禁用HTML5 drag(<a title="drag_drop_disabled setting should disable dragging from browser to another window" href="http://code.google.com/p/chromiumembedded/issues/detail?id=284"> issue #284 </a>).</li>
<li>修复在取消popup窗口时crash的问题(<a title="ShowDevTools causes AV if OnBeforePopup cancel popup creation" href="http://code.google.com/p/chromiumembedded/issues/detail?id=285"> issue #285 </a>).</li>
</ul>
<p>&nbsp;</p>
<p><strong>June 14, 2011:</strong> Binary release 259 significantly revamps the CEF API and contains the following enhancements and bug fixes.</p>
<ul>
<li>使用angle库支持GL (<a title="enable WebGL once it works with Angle and accelerated compositing" href="http://code.google.com/p/chromiumembedded/issues/detail?id=136"> issue #136 </a>).</li>
<li>CefV8Value 添加Date类型支持(<a title="Add support for int64 &amp; Date V8 value type" href="http://code.google.com/p/chromiumembedded/issues/detail?id=190"> issue #190 </a>).</li>
<li>Add a workaround for the SyncRequestProxy deadlock problem (<a title="deadlock with SyncRequestProxy" href="http://code.google.com/p/chromiumembedded/issues/detail?id=192"> issue #192 </a>).</li>
<li>Replace CefHandler with a new CefClient interface and separate handler interfaces (<a title="Break CefHandler into separate Handler interfaces" href="http://code.google.com/p/chromiumembedded/issues/detail?id=218"> issue #218 </a>).</li>
<li>Add support for virtual inheritance to allow multiple CefBase parented interfaces to be implemented in the same class (<a title="Break CefHandler into separate Handler interfaces" href="http://code.google.com/p/chromiumembedded/issues/detail?id=218"> issue #218 </a>).</li>
<li>Replace CefThreadSafeBase with IMPLEMENT macros to support virtual inheritance and to only provide locking implementations when needed (<a title="Break CefHandler into separate Handler interfaces" href="http://code.google.com/p/chromiumembedded/issues/detail?id=218"> issue #218 </a>).</li>
<li>Move the CefBrowserSettings parameter from CefInitialize to CreateBrowser (<a title="Break CefHandler into separate Handler interfaces" href="http://code.google.com/p/chromiumembedded/issues/detail?id=218"> issue #218 </a>).</li>
<li>Add a new cef_build.h header that provides platform-specific and OS defines (<a title="Break CefHandler into separate Handler interfaces" href="http://code.google.com/p/chromiumembedded/issues/detail?id=218"> issue #218 </a>).</li>
<li>Introduce the use of OVERRIDE to generate compiler errors on Windows if a child virtual method declaration doesn&#8217;t match the parent declaration (<a title="Break CefHandler into separate Handler interfaces" href="http://code.google.com/p/chromiumembedded/issues/detail?id=218"> issue #218 </a>).</li>
<li>Move CEF header files that should not be directly included by the client to the &#8220;include/internal&#8221; folder (<a title="Break CefHandler into separate Handler interfaces" href="http://code.google.com/p/chromiumembedded/issues/detail?id=218"> issue #218 </a>).</li>
<li>Add support for navigator.onLine and online/offline window events (<a title="Proposed patch adds support for navigator.onLine and online/offline window events" href="http://code.google.com/p/chromiumembedded/issues/detail?id=234"> issue #234 </a>).</li>
<li>Use NDEBUG instead of <tt>_</tt>DEBUG because <tt>_</tt>DEBUG is not defined on Mac (<a title="Patch to fix Mac OSX compile" href="http://code.google.com/p/chromiumembedded/issues/detail?id=240"> issue #240 </a>).</li>
<li>Add OnResourceReponse and CefContentFilter for viewing and filtering response content (<a title="Filtering response content" href="http://code.google.com/p/chromiumembedded/issues/detail?id=241"> issue #241 </a>).</li>
<li>Add support for setting response header values (<a title="Allow cross-origin scripting for custom standard schemes" href="http://code.google.com/p/chromiumembedded/issues/detail?id=246"> issue #246 </a>).</li>
<li>Break CefRegisterScheme into separate CefRegisterCustomScheme and CefRegisterSchemeHandlerFactory functions (<a title="Allow cross-origin scripting for custom standard schemes" href="http://code.google.com/p/chromiumembedded/issues/detail?id=246"> issue #246 </a>).</li>
<li>Allow registration of handlers for built-in schemes (<a title="Allow cross-origin scripting for custom standard schemes" href="http://code.google.com/p/chromiumembedded/issues/detail?id=246"> issue #246 </a>).</li>
<li>Supply scheme and request information to CefSchemeHandlerFactory::Create (<a title="Allow cross-origin scripting for custom standard schemes" href="http://code.google.com/p/chromiumembedded/issues/detail?id=246"> issue #246 </a>).</li>
<li>Add CrossOriginWhitelist functions for bypassing the same-origin policy with both built-in and custom standard schemes (<a title="Allow cross-origin scripting for custom standard schemes" href="http://code.google.com/p/chromiumembedded/issues/detail?id=246"> issue #246 </a>).</li>
<li>Add support for modal dialogs (<a title="Add support for window.startModalDialog" href="http://code.google.com/p/chromiumembedded/issues/detail?id=250"> issue #250 </a>).</li>
<li>Add support for IME-aware applications (<a title="Enhance CEF to support IME-aware applications" href="http://code.google.com/p/chromiumembedded/issues/detail?id=254"> issue #254 </a>).</li>
<li>Restore keyboard focus on window activation (<a title="cefclient app - focus not always restored when window is activated" href="http://code.google.com/p/chromiumembedded/issues/detail?id=256"> issue #256 </a>).</li>
<li>Fix bug when dragging to a window before mouse events have been detected (<a title="Drag and drop accesses a NULL WebViewHost if client hasn't received mouse events yet" href="http://code.google.com/p/chromiumembedded/issues/detail?id=262"> issue #262 </a>).</li>
</ul>
<p>&nbsp;</p>
<p><strong>May 10, 2011:</strong> Binary release 231 contains the following enhancements and bug fixes.</p>
<ul>
<li>Add cookie get/set support (<a title="Added cookie support" href="http://code.google.com/p/chromiumembedded/issues/detail?id=88"> issue #88 </a>).</li>
<li>Allow custom schemes to cause redirects (<a title="Allow custom schemes to cause redirects" href="http://code.google.com/p/chromiumembedded/issues/detail?id=98"> issue #98 </a>).</li>
<li>Set the libcef.dll version number to the build revision number (<a title="Increment libcef.dll version info when source is changed" href="http://code.google.com/p/chromiumembedded/issues/detail?id=108"> issue #108 </a>).</li>
<li>Add support for returning an HTTP status code from HandleBeforeResourceLoad and custom scheme handlers via the CefResponse class (<a title="make custom schemes and HandleBeforeResourceLoad return HTTP status codes for jQuery XHR" href="http://code.google.com/p/chromiumembedded/issues/detail?id=202"> issue #202 </a>).</li>
<li>Add support for V8 accessors and entering a V8 context asynchronously (<a title="Can't create V8 Objects, Arrays, and Functions outside a V8 context" href="http://code.google.com/p/chromiumembedded/issues/detail?id=203"> issue #203 </a>).</li>
<li>Don&#8217;t load URLs twice for popup windows (<a title="HandleDownloadResponse being called multiple times on JS window.open call" href="http://code.google.com/p/chromiumembedded/issues/detail?id=215"> issue #215 </a>).</li>
<li>Make modal popup windows behave the same as non-modal popup windows (<a title="Popup windows doesn't react on clicks" href="http://code.google.com/p/chromiumembedded/issues/detail?id=216"> issue #216 </a>).</li>
<li>Force Flash and Silverlight plugins to use windowless mode when rendering off-screen (<a title="Youtube videos don't render in the Off-Screen Rendering Example" href="http://code.google.com/p/chromiumembedded/issues/detail?id=214"> issue #214 </a>).</li>
<li>Don&#8217;t download files that will be loaded by a plugin (<a title="handleDownloadResponse called for files that are handled by plugins" href="http://code.google.com/p/chromiumembedded/issues/detail?id=227"> issue #227 </a>).</li>
<li>Add a CefDOMNode::IsSame() method for comparing CefDOMNode objects.</li>
</ul>
<p>&nbsp;</p>
<p><strong>March 25, 2011:</strong> Binary release 212 contains the following enhancements and bug fixes.</p>
<ul>
<li>Add off-screen rendering support (<a title="Add support for off-screen rendering" href="http://code.google.com/p/chromiumembedded/issues/detail?id=100"> issue #100 </a>).</li>
<li>Add persistent storage support for cookie data (<a title="Unable to persist cookies / user data" href="http://code.google.com/p/chromiumembedded/issues/detail?id=193"> issue #193 </a>).</li>
<li>Allow registration of non-standard schemes (<a title="Custom schemes registered with CefRegisterScheme are treated as standard even when they aren't" href="http://code.google.com/p/chromiumembedded/issues/detail?id=195"> issue #195 </a>).</li>
<li>Improve the behavior of HandleAddressChange, HandleTitleChange, HandleLoadStart and HandleLoadEnd notifications (<a title="AddressChange &amp; TitleChange not called if window.location changed " href="http://code.google.com/p/chromiumembedded/issues/detail?id=200"> issue #200 </a>).</li>
<li>Respect the WS_VISIBLE flag when creating browser windows (<a title="UIT_CreateBrowser doesn't respect window's visibility setting" href="http://code.google.com/p/chromiumembedded/issues/detail?id=201"> issue #201 </a>).</li>
<li>Fix a bug in CefWebURLRequest that could result in inappropriate calls to CefHandler methods (<a title="The &quot;CefWebUrlRequest for a &quot;CefWebURLRequestClient&quot; sometimes accidentally matches to a CefBrowser." href="http://code.google.com/p/chromiumembedded/issues/detail?id=204"> issue #204 </a>).</li>
<li>Add a history entry when navigating to anchors within the same page (<a title="Navigating to an achor within the same page doesn't add a history entry" href="http://code.google.com/p/chromiumembedded/issues/detail?id=207"> issue #207 </a>).</li>
<li>Add a HandleNavStateChange notification for back/forward state changes (<a title="cefclient back/forward buttons don't properly reflect history state when navigating with anchors" href="http://code.google.com/p/chromiumembedded/issues/detail?id=208"> issue #208 </a>).</li>
<li>Fix crash when using WebKit inspector break points (<a title="Developer Tools - Breakpoints not working" href="http://code.google.com/p/chromiumembedded/issues/detail?id=210"> issue #210 </a>).</li>
<li>Add support for retrieving values from DOM form elements using CefDOMNode::GetValue.</li>
<li>Add the CefRunMessageLoop() function for efficient message loop processing in single-threaded message loop mode.</li>
</ul>
<p>&nbsp;</p>
<p><strong>February 28, 2011:</strong> Binary release 195 contains the following enhancements and bug fixes.</p>
<ul>
<li>Add the CefWebURLRequest class that supports direct loading of URL resources from client applications (<a title="Add URLFetcher support" href="http://code.google.com/p/chromiumembedded/issues/detail?id=51"> issue #51 </a>).</li>
<li>Add CefDOM classes and the CefFrame::VisitDOM method that allow direct access to and modification of the DOM (<a title="Add support for accessing the DOM" href="http://code.google.com/p/chromiumembedded/issues/detail?id=60"> issue #60 </a>).</li>
<li>Add support for the HTML5 drag and drop API and support for dragging content to other applications or the desktop (<a title="HTML5 drag &amp; drop support" href="http://code.google.com/p/chromiumembedded/issues/detail?id=140">issue #140</a>).</li>
<li>Add a CefV8Context object and CefV8Value::ExecuteFunctionWithContext method to support asynchronous V8 callbacks (<a title="Can't call ExecuteFuncton on a CefV8Value outside of an Execute callback." href="http://code.google.com/p/chromiumembedded/issues/detail?id=188"> issue #188 </a>).</li>
<li>CefRegisterPlugin now only supports a single mime type per registration.</li>
<li>Fix a bug where URL and title change notifications were not being sent for CefFrame::LoadString.</li>
</ul>
<p>&nbsp;</p>
<p><strong>February 1, 2011:</strong> Binary release 181 will be the last binary release that includes libraries for VS2005. It contains the following enhancements and bug fixes.</p>
<ul>
<li>Improve thread safety by making some methods only callable on the UI thread (<a title="Support thread-specific APIs" href="http://code.google.com/p/chromiumembedded/issues/detail?id=175"> issue #175 </a>).</li>
<li>Add NewCefRunnableMethod and NewCefRunnableFunction templates (in cef_runnable.h) that simplify task posting (<a title="Support thread-specific APIs" href="http://code.google.com/p/chromiumembedded/issues/detail?id=175"> issue #175 </a>).</li>
<li>Add a boolean argument to the HandleLoadStart and HandleLoadEnd events that will be true while the main content frame is loading (<a title="Titles from iframes are shown as the window title when they should not" href="http://code.google.com/p/chromiumembedded/issues/detail?id=166"> issue #166 </a>, <a title="isMainContent in handleLoadEnd seems inaccurate" href="http://code.google.com/p/chromiumembedded/issues/detail?id=183"> issue #183 </a>).</li>
<li>Add an HTTP status code argument to the HandleLoadEnd event (<a title="Add HTTP status code to handleLoadEnd" href="http://code.google.com/p/chromiumembedded/issues/detail?id=177"> issue #177 </a>).</li>
<li>Only call the HandleAddressChange and HandleTitleChange events for the main content frame load (<a title="Titles from iframes are shown as the window title when they should not" href="http://code.google.com/p/chromiumembedded/issues/detail?id=166"> issue #166 </a>)</li>
<li>Pass the URL for new popup windows to the HandleBeforeCreated event (<a title="HandleBeforeCreated didn't get URL to open" href="http://code.google.com/p/chromiumembedded/issues/detail?id=5">issue #5</a>).</li>
<li>Add members to the CefSettings structure for specifying log file location and severity level (<a title="Make debug logging configurable" href="http://code.google.com/p/chromiumembedded/issues/detail?id=172"> issue #172 </a>).</li>
<li>Add single sign-on support (<a title="Single sign-on (proposed patch)" href="http://code.google.com/p/chromiumembedded/issues/detail?id=148"> issue #148 </a>).</li>
<li>Add zooming support (<a title="Enhancement: Enable zoom support" href="http://code.google.com/p/chromiumembedded/issues/detail?id=116"> issue #116 </a>).</li>
<li>Add developer tools support (<a title="WebKit Inspector" href="http://code.google.com/p/chromiumembedded/issues/detail?id=127"> issue #127 </a>).</li>
<li>Add a HandleProtocolExecution event for handling unregistered protocols (<a title="general solution for handling external protocols" href="http://code.google.com/p/chromiumembedded/issues/detail?id=155"> issue #155 </a>).</li>
<li>Add a HandleStatus event for status messages, mouse over URLs and keyboard focus URLs (<a title="Add handlers for status, mouse over and tool tips" href="http://code.google.com/p/chromiumembedded/issues/detail?id=61"> issue #61 </a>).</li>
<li>Add support for creating and parsing URLs via CefCreateURL and CefParseURL (<a title="Add support for creating and parsing URLs" href="http://code.google.com/p/chromiumembedded/issues/detail?id=181"> issue #181 </a>).</li>
<li>Fix the problem with frame activation when displaying SELECT list popups (<a title="Activating of SELECT list do application frame inactive" href="http://code.google.com/p/chromiumembedded/issues/detail?id=169"> issue #169 </a>).</li>
<li>Accelerated compositing and HTML5 video now work together (<a title="HTML5 video does not display with accelerated compositing enabled" href="http://code.google.com/p/chromiumembedded/issues/detail?id=143"> issue #143 </a>).</li>
</ul>
<p>&nbsp;</p>
<p><strong>November 22, 2010:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=149">Revision 149</a> introduces a number of long-awaited features and a few important bug fixes.</p>
<ul>
<li>The API now uses CefString and cef_string_t types instead of std::wstring and wchar_t. The new types support conversion between ASCII, UTF-8, UTF-16 and UTF-32 character formats and the default character type can be changed by recompiling CEF (<a title="Introduce CefString for customization of CEF string type" href="http://code.google.com/p/chromiumembedded/issues/detail?id=146"> issue #146 </a>).</li>
<li>Allow customization of global and per-browser settings for everything from User-Agent and plugin search paths to specific WebKit features (<a title="Ability to customize global and per-browser settings on global/browser initialization." href="http://code.google.com/p/chromiumembedded/issues/detail?id=145"> issue #145 </a>).</li>
<li>Add support for accelerated compositing and fast WebGL (<a title="enable WebGL once it works with Angle and accelerated compositing" href="http://code.google.com/p/chromiumembedded/issues/detail?id=136"> issue #136 </a>). You will need to disable accelerated compositing to watch HTML5 video with this release (<a title="HTML5 video does not display with accelerated compositing enabled" href="http://code.google.com/p/chromiumembedded/issues/detail?id=143"> issue #143 </a>).</li>
<li>Expose popup window feature information via the CefPopupFeatures argument passed to CefHandler::HandleBeforeCreated (<a title="Enhancement for exposing popup features" href="http://code.google.com/p/chromiumembedded/issues/detail?id=135"> issue #135 </a>).</li>
<li>Fix a crash caused by Flash-related JavaScript (<a title="CEF crashes on certain flash related javascript" href="http://code.google.com/p/chromiumembedded/issues/detail?id=115"> issue #115 </a>).</li>
</ul>
<p>&nbsp;</p>
<p><strong>November 15, 2010:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=137">Revision 137</a> provides the first working build of CEF for the Mac OS X platform (<a title="MAC porting of CEF" href="http://code.google.com/p/chromiumembedded/issues/detail?id=68">issue #68</a>). There&#8217;s still a lot of work required to bring it up to par with the Windows port. Missing features are indicated by &#8220;TODO(port)&#8221; comments in the source code. Help with fixing bugs and implementing missing features is welcome.</p>
<p><strong>October 24, 2010:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=126">Revision 126</a> disables WebGL support due to performance problems with the default Chromium implementation. WebGL support will be re-enabled once a better-performing implementation is available (<a title="enable WebGL once it works with Angle and accelerated compositing" href="http://code.google.com/p/chromiumembedded/issues/detail?id=136"> issue #136 </a>).</p>
<ul>
<li>Add a CefHandler::HandleDownloadResponse() method for handling Content-Disposition initiated file downloads (<a title="Download attachment" href="http://code.google.com/p/chromiumembedded/issues/detail?id=6"> issue #6 </a>).</li>
<li>Add XML parsing support with CefXmlReader and CefXmlObject classes (<a title="Expose libxml2 functions from libcef" href="http://code.google.com/p/chromiumembedded/issues/detail?id=28"> issue #28 </a>).</li>
<li>Add Zip archive reading support with CefZipReader and CefZipArchive classes (<a title="Expose compression routines" href="http://code.google.com/p/chromiumembedded/issues/detail?id=30">issue #30</a>).</li>
<li>Add a new cef_wrapper.h header file that exposes helpful utility classes provided as part of the libcef_dll_wrapper target.</li>
</ul>
<p>&nbsp;</p>
<p><strong>October 15, 2010:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=116">Revision 116</a> causes CEF to ignore the &#8220;Automatically detect settings&#8221; option under LAN Settings in order to fix a problem with slow resource loading on Windows (<a title="Slow load with auto-detection of proxy settings" href="http://code.google.com/p/chromiumembedded/issues/detail?id=81"> issue #81 </a>). Manual configuration under LAN Settings is still respected.</p>
<ul>
<li>Add a CefBrowser::ReloadIgnoreCache() method and MENU_ID_NAV_RELOAD_NOCACHE menu support. (<a title="Enhancement: Reload ignoring cache" href="http://code.google.com/p/chromiumembedded/issues/detail?id=118"> issue #118 </a>).</li>
<li>Add support for audio playback with HTML5 video (<a title="No audio WebM video" href="http://code.google.com/p/chromiumembedded/issues/detail?id=121"> issue #121 </a>).</li>
<li>Fix back/forward navigation when the history contains pages that failed to load (<a title="Navigating history when the history contains a page that does not load properly" href="http://code.google.com/p/chromiumembedded/issues/detail?id=125"> issue #125 </a>).</li>
<li>Change the CEF User-Agent product version to &#8220;Chrome/7.0.517.0&#8243;</li>
</ul>
<p>&nbsp;</p>
<p><strong>August 31, 2010:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=100">Revision 100</a> re-introduces the CefHandler::HandleJSBinding method. The memory leaks that necessitated the elimination of this method have now been fixed (<a title="Window object binding causes memory leaks" href="http://code.google.com/p/chromiumembedded/issues/detail?id=72"> issue #72 </a>).</p>
<ul>
<li>The CefRequest argument to CefHandler::HandleBeforeResourceLoad can now be modified allowing the request to be changed on the fly (<a title="Carry over modifications to request object in CefHandler::HandleBeforeResourceLoad()" href="http://code.google.com/p/chromiumembedded/issues/detail?id=41"> issue #41 </a>).</li>
<li>A default tooltip implementation is now provided and tooltip text can be modified using CefHandler::HandleTooltip (<a title="Add handlers for status, mouse over and tool tips" href="http://code.google.com/p/chromiumembedded/issues/detail?id=61"> issue #61 </a>).</li>
<li>Printing paper size, orientation and margins can now be changed using CefHandler::HandlePrintOptions (<a title="Printing doesn't respect margins in print_settings.cc" href="http://code.google.com/p/chromiumembedded/issues/detail?id=112"> issue #112 </a>).</li>
<li>Find in page with result highlighting is now supported using CefBrowser::Find, CefBrowser::StopFinding and CefHandler::HandleFindResult.</li>
<li>The binary release of <a href="http://code.google.com/p/chromiumembedded/source/detail?r=100">revision 100</a> provides libraries for both Visual Studio 2005 and Visual Studio 2008. It can be downloaded from the project Downloads page.</li>
</ul>
<p>&nbsp;</p>
<p><strong>April 7, 2010:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=73">Revision 73</a> eliminates the CefHandler::HandleJSBinding method. This modification addresses memory leaks that many users have been reporting. For more information see <a title="Window object binding causes memory leaks" href="http://code.google.com/p/chromiumembedded/issues/detail?id=72"> issue #72 </a>.</p>
<p><strong>October 2, 2009:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=50">Revision 50</a> adds <a href="http://code.google.com/p/gyp/" rel="nofollow">GYP support</a> for generating the CEF project files. This makes it easy to build CEF with both VS2005 and VS2008. See the &#8220;Source Distributions&#8221; section above for additional details.</p>
<p><strong>August 21, 2009:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=37">Revision 37</a> adds support for custom scheme handlers. Use the new CefRegisterScheme() function in combination with the CefSchemeHandlerFactory and CefSchemeHandler classes to create handlers for requests using custom schemes such as myscheme://mydomain.</p>
<p><strong>July 24, 2009:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=32">Revision 32</a> helps to speed up the addition of new features and bug fixes to CEF. It adds the CEF Patch Application Tool and the &#8220;patch&#8221; project which together support automatic application of patches to the Chromium and WebKit source trees as part of the build process. See the README.txt file in the new patch directory for additional information.</p>
<p><strong>July 8, 2009:</strong> CEF now has a dedicated build bot thanks to Nicolas Sylvain and Darin Fisher over at Google. The build bot synchronizes to each Chromium revision and then builds CEF, reporting on any compile errors that occur. Having a build bot for CEF will help the Chromium developers avoid accidentally breaking API features required by CEF, and help the CEF developers keep up with the frequently changing Chromium HEAD revision. You can view the build bot output at <a href="http://build.chromium.org/buildbot/waterfall.fyi/waterfall?branch=&amp;builder=Chromium+Embedded" rel="nofollow">http://build.chromium.org/buildbot/waterfall.fyi/waterfall?branch=&amp;builder=Chromium+Embedded</a></p>
<p><strong>June 20, 2009:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=30">Revision 30</a> adds the CEF Translator Tool which facilitates automatic generation of the C API header file (cef_capi.h) and CToCpp/CppToC wrapper classes. See the translator.README.txt file in the new tools directory for additional information. Introduction of this tool required minor changes to the CEF C++ and C APIs.</p>
<ul>
<li>The C++ &#8216;arguments&#8217; attribute of CefV8Handler::Execute() and CefV8Value::ExecuteFunction() now has the &#8216;const&#8217; qualifier.</li>
<li>C API global function names that were previously in the cef_create_classname() format are now in the cef_classname_create() format.</li>
<li>The C API cef_frame_t::get_frame_names() member function now has return type &#8216;void&#8217; instead of &#8216;size_t&#8217;.</li>
<li>The C API cef_frame_t::execute_javascript() member function has been renamed to cef_frame_t::execute_java_script().</li>
</ul>
<p>&nbsp;</p>
<p><strong>May 27, 2009:</strong> <a href="http://code.google.com/p/chromiumembedded/source/detail?r=26">Revision 26</a> introduces two major changes to the CEF framework.</p>
<ul>
<li>Frame-dependent functions such as loading content and executing JavaScript have been moved to a new CefFrame class. Use the new CefBrowser::Get*Frame() methods to retrieve the appropriate CefFrame instance. A CefFrame instance will now also be passed to CefHandler callback methods as appropriate.</li>
<li>The CEF JavaScript API now uses the V8 framework directly instead of creating NPObjects. JavaScript object hierarchies can be written in native C++ code and exported to the JavaScript user-space, and user-space object hierarchies can be accessed from native C++ code. Furthermore, support for the V8 extension framework has been added via the new CefRegisterExtension() function. The CefJSHandler and CefVariant classes have been removed in favor of new CefV8Handler and CefV8Value classes. To attach values to the JavaScript &#8216;window&#8217; object you must now implement the CefHandler::HandleJSBinding() callback method instead of calling the (now removed) CefBrowser::AddJSHandler() method.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=745</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>嵌入Chrome cef到MFC CView</title>
		<link>https://www.softwareace.cn/?p=744</link>
		<comments>https://www.softwareace.cn/?p=744#comments</comments>
		<pubDate>Wed, 26 Mar 2014 08:17:33 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=744</guid>
		<description><![CDATA[公司项目中一直存在着一个CHtmlView模块来显示URL，但是随着web页面的更新（加入HTML5 and  [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>公司项目中一直存在着一个CHtmlView模块来显示URL，但是随着web页面的更新（加入HTML5 and 其它一些比较新的技术）越来越发现使用CHtmlView已经无法满足目前的需求。开始还是试着去修改一些东西去满足当前需要，不过好景不长终于有一天CHtmlView连我们目前的web页面都打不开了，于是决定采用Chrome来作为浏览器引擎。</p>
<h1><a name="t0"></a>嵌入到MFC</h1>
<h2><a name="t1"></a>使用CEF</h2>
<div>首先，需要下载CEF框架。其中包含了一个使用CEF的例子。目前的CEF共有3个版本（详情见：http://code.google.com/p/chromiumembedded/downloads/list）：</div>
<div>CEF1：单线程的浏览器框架</div>
<div>CEF2：已放弃开发</div>
<div>CEF3：多线程浏览器框架</div>
<div>在这里使用的是CEF1来构建我们的程序。</div>
<div>下载好CEF框架后，打开CEF工程文件找到并编译libcef_dll_wrapper项目（cefclient是一个可运行的例子，有兴趣的朋友可以研究研究）就可以了。</div>
<div></div>
<h2><a name="t2"></a>创建我们的CWebView</h2>
<div>创建好工程后我们需要连接下面这两个静态库：</div>
<div>\cef_binary\Debug\Lib\libcef_dll_wrapper.lib</div>
<div>\cef_binary\lib\Debug\libcef.lib</div>
<div></div>
<div>要与浏览器交互我们需要创建一个CefClient的子类，如下：</div>
<div>
<pre class="crayon-plain-tag">#pragma once
#include &lt;cef_client.h&gt;

class CWebClient 
	: public CefClient
	, public CefLifeSpanHandler
{
protected:
	CefRefPtr&lt;CefBrowser&gt; m_Browser;

public:
	CWebClient(void){};
	virtual ~CWebClient(void){};

	CefRefPtr&lt;CefBrowser&gt; GetBrowser() { return m_Browser; }

	virtual CefRefPtr&lt;CefLifeSpanHandler&gt; GetLifeSpanHandler() OVERRIDE
	{ return this; }

	virtual void OnAfterCreated(CefRefPtr&lt;CefBrowser&gt; browser) OVERRIDE;

	// 添加CEF的SP虚函数
	IMPLEMENT_REFCOUNTING(CWebClient);
	IMPLEMENT_LOCKING(CWebClient);
};</pre><br />
&nbsp;</p>
<div>接下来就开始修改我们的视图类了：</div>
<div>创建：</div>
<div>
<pre class="crayon-plain-tag">// CWebView message handlers
int CWebView::OnCreate( LPCREATESTRUCT lpCreateStruct )
{
 	if ( CView::OnCreate(lpCreateStruct) == -1)
 		return -1;

	CefRefPtr&lt;CWebClient&gt; client(new CWebClient());
	m_cWebClient = client;

	CefSettings cSettings;
	CefSettingsTraits::init( &amp;cSettings);
	cSettings.multi_threaded_message_loop = true;
	CefRefPtr&lt;CefApp&gt; spApp;
	CefInitialize( cSettings, spApp);

	CefWindowInfo info;
	info.SetAsChild( m_hWnd, CRect(0, 0, 800, 600));

	CefBrowserSettings browserSettings;
	CefBrowser::CreateBrowser( info, static_cast&lt;CefRefPtr&lt;CefClient&gt; &gt;(client), 
		"http://192.168.1.21:8080/dialysis/web/page/nav/content.jsp", browserSettings);

	return 0;
}</pre><br />
&nbsp;</p>
<div>调整大小：</div>
<div>
<pre class="crayon-plain-tag">void CWebView::OnSize( UINT nType, int cx, int cy )
{
	CView::OnSize(nType, cx, cy);

	if(m_cWebClient.get())
	{
		CefRefPtr&lt;CefBrowser&gt; browser = m_cWebClient-&gt;GetBrowser();
		if(browser)
		{
			CefWindowHandle hwnd = browser-&gt;GetWindowHandle();
			RECT rect;
			this-&gt;GetClientRect(&amp;rect);
			// ::SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, SWP_NOZORDER);
			::MoveWindow( hwnd, 0, 0, cx, cy, true);
		}
	}
}</pre><br />
&nbsp;</p>
<div>如果在编译CWebView出现连接错误可以把libcef_dll_wrapper工程的Runtime Library修改为Multi-threaded Debug DLL (/MDd) 并将Treat warnings as errors修改为No (/WX-)试试。</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=744</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++界面库</title>
		<link>https://www.softwareace.cn/?p=742</link>
		<comments>https://www.softwareace.cn/?p=742#comments</comments>
		<pubDate>Mon, 24 Mar 2014 10:29:32 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=742</guid>
		<description><![CDATA[刚开始用C++做界面的时候，根本不知道怎么用简陋的MFC控件做出比较美观的界面，后来就开始逐渐接触到BCG   [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>刚开始用C++做界面的时候，根本不知道怎么用简陋的MFC控件做出比较美观的界面，后来就开始逐渐接触到BCG  Xtreme ToolkitPro v15.0.1，Skin++,等界面库，以及一些网友自己写的界面库，开始对于C++软件界面美化有了一点点的心得。不敢藏私，希望和一些新手朋友们分享交流。</p>
<p>&nbsp;</p>
<p>一.  开源C++界面库</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903143759828?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>1.RingSdk</p>
<p>Ringsdk是CSDN上一个前辈自己写的界面库，这个界面库很轻而易举实现QQ2009的界面效果。链接见</p>
<p><a href="http://blog.csdn.net/ringphone/article/details/2911244" target="_blank">http://blog.csdn.net/ringphone/article/details/2911244</a>   貌似Ringsdk和MFC无法进行交互，但是 RingSdk其中有很多的图形处理的代码都非常有参考价值。</p>
<p>&nbsp;</p>
<p>2.redui的官方网站http://www.redui.org 已经打不开了。官方QQ群是 40729296</p>
<p>CSDN地址是<br />
<a href="http://blog.csdn.net/jameshooo/article/details/6677272" target="_blank">http://blog.csdn.net/jameshooo/article/details/6677272</a></p>
<p>这是官方的说明</p>
<p>REDUI，又名REDirectUI，全称是Rendering Engine for DirectUI，是一款基于XML描述的 DirectUI 渲染引擎，能将“控件”的交互和渲染过程分解成多种独立的要素，包括布局、视觉效果、样式、UI自动化、滤镜、脚本、事件、3D场景、3D模型、通用动画等。通过这些要素的排列组合，可以呈现出各种不同效果的控件，甚至能在XML中直接自定义控件类型。支持2D/3D无缝融合。<br />
• REDUI支持GDI/GDI+/DirectDraw/D3D等渲染方式，并有支持OPENGL/ES的愿望</p>
<p>&nbsp;</p>
<p>3.Duilib 这个就比较大名鼎鼎了，不用多说了吧。包括华为网盘在内的很多业内企业都在用这个界面库。我用Duilib做了一个小型的界面。贴出来献丑一个。</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903144639500?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>&nbsp;</p>
<p>4.WGI-1.0.7-Demo-Project-for-windows 。。额。。时间太长，忘记了这个代码是什么，姑且先忽略它。</p>
<p>&nbsp;</p>
<p>5.cj60lib 这个玩过Gh0st3.6木马的人都熟悉，是一款对MFC进行拓展的界面库</p>
<p>6.金山界面库 这个就不赘述了，可以直接上金山的论坛找源代码和资料</p>
<p>7.skinTK_V0.20 一款类似于Skin++的开源界面库</p>
<p>8.FreeCL_Skin2.3 一款不错的控件库 扩展了常用的MFC控件 。  这个是FreeCL_Skin提供的一个效果实例。</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903145802062?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>&nbsp;</p>
<p>9.GuiLib1.5 一个老外写的界面库 没有用过，没有调查，就没有发言权。大家自行百度。</p>
<p>&nbsp;</p>
<p>10.基于3D的界面库 MangoGUI_V0.1.5</p>
<p>&nbsp;</p>
<p>MangoGUI是猫仔在DXUT基础上修改得来的一个开源GUI系统。</p>
<p>目前来说基本上继承了DXUT里面绝大多数的功能和改进了使用方式，让DX学习爱好者更容易去使用GUI系统。</p>
<p>如果你也是一位对GUI有兴趣的同学，非常欢迎你一同来参与到MangoGUI的设计当中来！</p>
<p>作者博客</p>
<p><a href="http://m9551.blog.sohu.com/" target="_blank">http://m9551.blog.sohu.com/</a></p>
<p>&nbsp;</p>
<p>11.基于Skia的directui库metalbone</p>
<p>代码托管地址</p>
<p><a href="http://code.google.com/p/metalbone/" target="_blank">http://code.google.com/p/metalbone/</a></p>
<p>官方说明</p>
<p>MetalBone是一个C++ DirectUI库。接口、命名等借鉴Qt，而并非使用Windows风格。</p>
<p>MetalBone的特点是，使用CSS来定制样式（如果没有CSS的话，则什么也不显示，lol）。目前可以使用Direct2D或Google Skia来绘制界面。MetalBone使用的是 <a href="http://code.google.com/p/metalbone/wiki/WWM_License" target="_blank" rel="nofollow">WWM协议</a>（基于LGPL）</p>
<p>&nbsp;</p>
<p>12.SonicUI2011</p>
<p>效果比较不错的一款皮肤库</p>
<p>作者CSDN地址是</p>
<p><a href="http://my.csdn.net/akof1314" target="_blank">http://my.csdn.net/akof1314</a></p>
<p>&nbsp;</p>
<p>13 基于OpenGl的界面库 beGUI-0.1.3-src</p>
<p>代码托管地址</p>
<p><a href="http://code.google.com/p/begui/" target="_blank">http://code.google.com/p/begui/</a></p>
<p>&nbsp;</p>
<p>二 未开源或商业界面库</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903152040062?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>&nbsp;</p>
<p>1.Flash4UI</p>
<p>看命名就知道是将Flash嵌入到UI中。</p>
<p>官方网站是  <a href="http://www.flash4ui.com/" target="_blank">http://www.flash4ui.com/</a></p>
<p>效果图片</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903152154656?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>&nbsp;</p>
<p>2.bolt 迅雷7界面引擎</p>
<p>迅雷界面引擎，这个用过迅雷下载和迅雷看看的就有体会了，界面的确是做的非常的赞。而且流畅，CPU占用和内存各种都很棒。采用了脚本交互的方式，脚本语言采用了Lua.可惜的是迅雷只开放了接口SDK给个人使用。</p>
<p>官方网址 <a href="http://bolt.xunlei.com/" target="_blank">http://bolt.xunlei.com/</a></p>
<p>&nbsp;</p>
<p>3.clayui</p>
<p>百度百科说明   clayui是一个采用纯C++编写的界面框架，可以很方便的移植到各种系统上。现在支持的系统包括android，windows，wince，linux。clayui的特点是能实现各种2D，3D动画，一些WPF，FLEX才能实现的界面效果，通过clayui可以很方便的实现。 clayui的底层渲染支持纯软件渲染，d3d，opengl es硬件加速渲染，您可以根据自身的需求选择合适的渲染方式，使您界面的用户体验达到最佳效果</p>
<p>效果</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903152801515?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>4.DSkinLite</p>
<p>官方网址  <a href="http://www.uieasy.cn/dskinlite/" target="_blank">http://www.uieasy.cn/dskinlite/</a></p>
<p>官方Demo</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903153005312?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>&nbsp;</p>
<p>5.libuiDK</p>
<p>官方说明:LibUIDK是国际上顶尖的专业开发Windows平台下图形用户界面的开发包，也是国内第一款商业的高级界面开发工具。该开发包基于Microsoft的MFC库。使用此开发工具包可轻易把美工制作的精美界面用Visual C++实现，由于LibUIDK采用所见即所得的方式创建产品界面，所以极大的提高了产品的开发速度，并大大增强图形用户界面(GUI)的亲和力。LibUIDK还可以使您的软件轻松具有当今流行的换肤功能，以提高产品的竞争力。</p>
<p>官方网站</p>
<p><a href="http://www.iuishop.com/index.asp" target="_blank">http://www.iuishop.com/index.asp</a></p>
<p>实例</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903153528593?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>&nbsp;</p>
<p>6. SiteUi   SkinSE  都有官方网站。就不继续搬砖的工作了。</p>
<p>&nbsp;</p>
<p>7.（未开源）上海勇进UIPower</p>
<p>这个比较牛逼。一款界面库就是大几百万的。老总阙海忠还亲自录了20集的界面库相关的视频</p>
<p>官方网站 <a href="http://www.uipower.com/" target="_blank">http://www.uipower.com/</a></p>
<p>这是老阙的视频。</p>
<p><img alt="" src="http://img.blog.csdn.net/20130903154614921?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvV2l0Y2hfU295YQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" /></p>
<p>&nbsp;</p>
<p>8.炫彩界面库</p>
<p>炫彩界面库貌似是私人开发的一个界面库，可以用C++.c#易语言等来开发。炫彩库的作者貌似是湖北襄阳人哟。</p>
<p>官方网站 <a href="http://www.xcgui.com/" target="_blank">http://www.xcgui.com/</a><br />
9.魔方界面库</p>
<p>官方网站 <a href="http://www.muilib.com/" target="_blank">http://www.muilib.com/</a></p>
<p>MuiLib(Magic UI Library)Windows高级界面开发库是在国内首家免费开源的DuiLib界面开发库基础上经过针对性的扩展而发展起来的，他继承了DuiLib高度自由灵活的特点，并吸收了其他界面库的一些优点，针对Windows层窗口按像素透明技术而重点优化后形成的一个优秀界面开发库，是一个使用纯C++调用Windows API的开发库，无任何其他第三方依赖框架，您可以使用其提供的各种高级控件来创建更加炫酷的用户界面</p>
<p>&nbsp;</p>
<p>10 XtremeToolkit</p>
<p>由Codejock 公司出品的一款界面库。应用也是比较广泛的。在2013版的大灰狼远程操控中就采用了这款界面库。</p>
<p>&nbsp;</p>
<p>11.Sharpui</p>
<p>代码托管地址  <a href="https://github.com/china520/sharpui" target="_blank">https://github.com/china520/sharpui</a></p>
<p>Sharpui是居于现在流行的DUI思想的一套界面库，可以方便实现半透明和各种界面效果，采用纯c++实现，分为引擎和控件两个部分，这两个部分采用动态库的形式提供，引擎部分处理了事件、资源、渲染、控制逻辑，同时提供了各种应用层面控件的实现基类，包括：Visual、Element、FrameworkElement、Control、ContentControl、Window、Panel、Popup，这些类封装了基础控件的实现细则，所有用户实现的控件都必须继承自这些类，对于需要呈现的控件必须继承至FrameworkElement。<br />
控件部分提供的所有控件均采用DUI方式实现、分层绘制，实现各种常用的布局控件，可灵活实现界面的自动布局；Sharpui本身所有数据结构采用原生实现，内存自动管理，不依赖于std的任何容器，使得库的使用更加独立、编译更加简单，使用VS任意一个版本编译都可以用在其它版本里，不需要担心由于std版本原因而产生编译问题。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>以上都是我在工作和个人业余时间收集积累的开源或商业界面库，这些界面库各有各的特色和侧重点，也有不同的换肤思想，如果要用在项目中还是要进行适当的增删整改。</p>
<p>由于个人能力水平见识有限，也有些大神的作品没有被收录其中。表示遗憾。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=742</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CControlUI  Paint BkImage</title>
		<link>https://www.softwareace.cn/?p=673</link>
		<comments>https://www.softwareace.cn/?p=673#comments</comments>
		<pubDate>Tue, 31 Dec 2013 03:37:09 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=673</guid>
		<description><![CDATA[[crayon-6a0a04eb36e1f641007991/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">void CControlUI::PaintBkImage(HDC hDC)
{
	if (m_hIcon == NULL)
	{
		if( m_sBkImage.IsEmpty() ) return;
		if( !DrawImage(hDC, (LPCTSTR)m_sBkImage) ) m_sBkImage.Empty();
		}
	else
	{
		int iconSize = 0;
		// 因为icon宽和高都是一样的，所以取控件宽和高其中最小的值进行判断取多大的图标画出来。
		int minIcon = GetWidth() &lt; GetHeight() ? GetWidth() : GetHeight();
		int m_iconSize[7] = {16, 24, 32, 48, 64, 128, 256};
		bool flag = false; 
		for (int i=0; i&lt;6; ++i)
		{
			if (minIcon &gt;= m_iconSize[i] &amp;&amp; minIcon &lt; m_iconSize[i+1])
			{
				iconSize = m_iconSize[i];
				flag = true;
				break;
			}
		}
		if (!flag)
		{
			if (minIcon&lt;m_iconSize[0])
			iconSize = m_iconSize[0];
			else
			iconSize = m_iconSize[6];
		}

		int x = (GetWidth()-iconSize)/2;
		int y = (GetHeight()-iconSize)/2;
		::DrawIconEx(hDC, m_rcItem.left+x, m_rcItem.top+y, m_hIcon, iconSize, iconSize, 0, 0, DI_NORMAL);
	}

}

//m_hicon需要添加个方法设置，</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=673</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>duilib中使用CWebBrowserUI去掉IWebBrowser2的边框</title>
		<link>https://www.softwareace.cn/?p=547</link>
		<comments>https://www.softwareace.cn/?p=547#comments</comments>
		<pubDate>Mon, 26 Aug 2013 00:23:48 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=547</guid>
		<description><![CDATA[[crayon-6a0a04eb3711c355675941/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">STDMETHODIMP DuiLib::CWebBrowserUI::GetHostInfo( DOCHOSTUIINFO* pInfo ) { pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;//去掉3D边框 if (m_pWebBrowserEventHandler) { return m_pWebBrowserEventHandler-&gt;GetHostInfo(pInfo); } return S_OK; }
1.修改CWebBrowserUI的STDMETHOD(GetHostInfo)(DOCHOSTUIINFO* pInfo)函数，如下：

STDMETHODIMP DuiLib::CWebBrowserUI::GetHostInfo( DOCHOSTUIINFO* pInfo )
{
pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;//去掉3D边框
if (m_pWebBrowserEventHandler)
{
return m_pWebBrowserEventHandler-&gt;GetHostInfo(pInfo);
}
return S_OK;
}
注意：此种方法直接修改了库的源码，不建议。

2.建一个新类继承自CWebBrowserEventHandler覆盖HRESULT STDMETHODCALLTYPE GetHostInfo(DOCHOSTUIINFO __RPC_FAR *pInfo)如下：

virtual HRESULT STDMETHODCALLTYPE GetHostInfo( DOCHOSTUIINFO __RPC_FAR *pInfo)
{
if (pInfo != NULL)
{
pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;
}
return S_OK;
}
使用的时候

pWeb-&gt;SetWebBrowserEventHandler(你的子类);
建议此方法，不修改源库，继承的方法。</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=547</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duilib 使用IE</title>
		<link>https://www.softwareace.cn/?p=546</link>
		<comments>https://www.softwareace.cn/?p=546#comments</comments>
		<pubDate>Mon, 26 Aug 2013 00:22:25 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=546</guid>
		<description><![CDATA[[crayon-6a0a04eb3736b339516015/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">1.xml中配置&lt;ActiveX name="ie" clsid="{8856F961-340A-11D0-A96B-00C04FD705A2}" delaycreate="false"/&gt;

2.代码中实现：

CActiveXUI* pActiveXUI = static_cast&lt;CActiveXUI*&gt;(m_pm.FindControl(_T("ie")));
if( pActiveXUI ) 
 {
    IWebBrowser2* pWebBrowser = NULL;
    pActiveXUI-&gt;GetControl(IID_IWebBrowser2, (void**)&amp;pWebBrowser);
    if( pWebBrowser != NULL ) 
    {
     pWebBrowser-&gt;Navigate(L"http://www.duilib.com",NULL,NULL,NULL,NULL); 
     pWebBrowser-&gt;Release();
    }
  }

CWebBrowserUI 使用
1.XML配置&lt;WebBrowser name="ie" clsid="{8856F961-340A-11D0-A96B-00C04FD705A2}" delaycreate="false"/&gt;

2.创建CWebBrowserEventHandler* m_pWebBrowserEventHandler对象

3.如果不需要滚动条则需要在virtual HRESULT STDMETHODCALLTYPE GetHostInfo(/* [out][in] */ DOCHOSTUIINFO __RPC_FAR *pInfo)中设置pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_SCROLL_NO | DOCHOSTUIFLAG_NO3DBORDER;
4.如果不想要菜单则在virtual HRESULT STDMETHODCALLTYPE ShowContextMenu(
/* [in] */ DWORD dwID,
/* [in] */ POINT __RPC_FAR *ppt,
/* [in] */ IUnknown __RPC_FAR *pcmdtReserved,
/* [in] */ IDispatch __RPC_FAR *pdispReserved)
返回S_OK，如果想要显示菜单则返回S_FALSE

5.打开页面

CWebBrowserUI  * pWebBrowserUI = static_cast&lt;CWebBrowserUI *&gt;(m_pm.FindControl(_T("ie")));
 pWebBrowserUI -&gt;SetWebBrowserEventHandler(m_pWebBrowserEventHandler);
if(  pWebBrowserUI != NULL )  {
      pWebBrowserUI -&gt;Navigate2(_T("http://www.duilib.com")); 
 }</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=546</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duilib编译成静态库</title>
		<link>https://www.softwareace.cn/?p=538</link>
		<comments>https://www.softwareace.cn/?p=538#comments</comments>
		<pubDate>Fri, 23 Aug 2013 01:33:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=538</guid>
		<description><![CDATA[这套库做界面还是非常不错的，虽然官方团队开始了Lomox的研发，不再支持这套库了，但是它依然有它的价值。 感谢 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>这套库做界面还是非常不错的<del>，虽然官方团队开始了Lomox的研发，不再支持这套库了，但是它依然有它的价值。</del></p>
<p>感谢指正。</p>
<p>有很多人不知道如何编译成静态库，其实很简单的。</p>
<p><strong>首先在vs中设置duilib项目。如图：配置类型改为静态库。</strong></p>
<p><img alt="" src="http://my.csdn.net/uploads/201206/13/1339587585_2808.png" /></p>
<p><strong>第二步修改UIlib.h头文件上面的宏。如图：</strong></p>
<p><img alt="" src="http://my.csdn.net/uploads/201206/13/1339587688_8295.png" /></p>
<p><strong>第三步在这个头文件下面添加内容：</strong></p>
<p><strong>#pragma comment(lib,&#8221;oledlg.lib&#8221;)<br />
#pragma comment(lib,&#8221;winmm.lib&#8221;)<br />
#pragma comment(lib,&#8221;comctl32.lib&#8221;)<br />
#pragma comment(lib,&#8221;Riched20.lib&#8221;)</strong></p>
<p><strong>如图：</strong></p>
<p><img alt="" src="http://my.csdn.net/uploads/201206/13/1339587748_8785.png" /></p>
<p>&nbsp;</p>
<p>然后编译，看看它的生成目录是不是有个DuiLib.lib文件生成。注意不是bin目录。</p>
<p>修改第一个demo的链接项，编译后连同它需要的皮肤文件拷贝到任意一个地方，运行试试</p>
<p>from <a href="http://blog.csdn.net/tornodo/article/details/7660728">http://blog.csdn.net/tornodo/article/details/7660728</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=538</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
