分析QQ的框框,你会发现,字体等格式编辑其实都是网页。

1.xml配置 
 
 2.加载控件 
void CMailDialog::Init() {
       
         SetIcon(IDR_MAINFRAME); //   Set   big   icon
         
        
         m_pCloseBtn = static_cast(paint_manager_.FindControl(_T("closebtn")));
         
         CActiveXUI* pActiveXUI = static_cast(paint_manager_.FindControl(_T("ie")));
        if( pActiveXUI ) {
            IWebBrowser2* pWebBrowser = NULL;
            pActiveXUI->GetControl(IID_IWebBrowser2, (void**)&pWebBrowser);
            if( pWebBrowser != NULL ) {
                std::string strPath=ConfigManager::instance()->getSkinPath()+"MailEditorindex.html";
 
                int Len=::MultiByteToWideChar (CP_ACP, 0, strPath.c_str(), -1, NULL, 0);
                wchar_t *buf=new wchar_t [Len];
                MultiByteToWideChar(CP_ACP,0,strPath.c_str(),-1,buf,Len);
                std::wstring wstrFilePath=std::wstring(buf);
                delete[] buf;
 
                pWebBrowser->Navigate((BSTR)(wstrFilePath.c_str()),NULL,NULL,NULL,NULL); 
                pWebBrowser->Release();
            }
        }
          
    } index.html 
邮件编辑器
  本文链接:http://it72.com/3336.htm