开发者

lightweight html control for desktop apps (C++/Windows) [closed]

开发者 https://www.devze.com 2023-01-07 16:37 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

开发者_开发技巧 Improve this question

I am currently using RichText control in my program. It creates several instances of RichText control (hundreds) because it’s a sticky notes program.

I wish to replace it with a lightweight HTML control which will have functionality similar to RichText control (text formatting, bullets, links, images etc)

Do you know if any free/commercial lightweight HTML control that I can use in my C++/MFC program?

Thanks.


There is the free HTMLayout engine by Terra Informatica: http://www.terrainformatica.com/htmlayout/main.whtm

It's mostly used as a skinning engine for applications, but there might be an editing mode, too, since they built a WYSIWYG editor with their own library.


Since you're on Windows, is there any reason you don't want to use the MSHTML control? It's available in MFC through CHtmlView. Since it is used by so much of the other parts of the O/S, the DLLs are likely already loaded, so instantiating it is going to be pretty quick.

We use it in our projects and it has a comprehensive COM API (IWebBrowser) with events feedback too.

I don't know the per-instance memory/CPU cost, so you may need to take some measurements.

There's always WebKit, as used by Apple Safari, Google Chrome and lots of others.


I hesitate suggesting this because it's essentially a whole framework for one component, but wxWidgets has a very simple and lightweight implementation, wxHTML.

The library can be built with as little or as much as you need, so you should be able to build with just wxHTML and whatever dependencies it requires. As far as I know it can be mixed with MFC without consequence. (Although, if you felt like it, rewriting your whole app in wx would make it cross platform.)

I would stress that it's a very basic implementation, so if you need something more robust it might not be the best. wxWebConnect wraps WebKit in wx if you need a full browser, but at that point there's probably a better, more MFC-centric solution.

If you're feeling especially adventurous and don't want any wxWidgets dependencies but like the lightweight wxHTML, you could always dive into the wxWidgets source and extract the windows-specific code for that control.

(I attempted to link to both the wxWidgets site and wxWebConnect for your reference, but it appears I can only add one link to my post. Google them if you like.)


There's XStandard.

0

精彩评论

暂无评论...
验证码 换一张
取 消