Search

CHtmlEditCtrl destructor is protected for no good reason by BongoVR

Closed
as Fixed Help for as Fixed

1
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 170481
Opened: 7/25/2006 1:44:24 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
First, usage of CHtmlEditCtrl is poorly documented, to say the least. It is hard to figure out what can be done with that control and what not. Calling SetDocumentHTML in OnInitDialog does not seem to work at all. Calling GetDocumentHTML right afterwards does not give the expected result. The documentation does not say anything at all.
The destructor is protected so you have to derive from CHtmlEditCtrl. Why? And if it is required, what must the derived class perform to be usable? No useful information in MSDN and via Google. Does anybody use that control at all?

Second, documented functions do not compile. Try to call SetBackColor for a CHtmlEditCtrl object. There is an ambiguity in QueryStatus of CHtmlEditCtrlBase.
Details (expand)
Product Language
German
Version
Visual Studio 2005 Professional Edition
Operating System
Windows XP Professional
Operating System Language
German
Category
\Frameworks
Subcategory 1
\C++ Libraries
Subcategory 2
\
Subcategory 3
 
Steps to Reproduce
Try to actually use CHtmlEditCtrl in a dialogue box.
Put a member variable into your dialogue class, call Create and try to call a few member functions.
Actual Results
n:\visual studio 8\vc\atlmfc\include\afxhtml.h(555) : error C4928: Unzulässige Kopierinitialisierung. Mehrere benutzerdefinierte Konvertierungen wurden implizit übernommen.
beim Aufrufen des Konstruktors 'ATL::CComQIPtr<T>::CComQIPtr(IUnknown *) throw()'
with
[
T=IOleCommandTarget
]
n:\visual studio 8\vc\atlmfc\include\atlcomcli.h(489): Siehe Deklaration von 'ATL::CComQIPtr<T>::CComQIPtr'
with
[
T=IOleCommandTarget
]
n:\visual studio 8\vc\atlmfc\include\afxhtml.h(549): Bei der Kompilierung der Klassen-template der long CHtmlEditCtrlBase<T>::QueryStatus(long) const-Memberfunktion
with
[
T=CHtmlEditCtrl
]
n:\visual studio 8\vc\atlmfc\include\afxhtml.h(1545): Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "CHtmlEditCtrlBase<T>".
with
[
T=CHtmlEditCtrl
]
Expected Results
Should compile.

And a documentation on how to use this control would be nice.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 8/1/2006 at 11:14 AM
Hi,

Sorry you're having problems with CHtmlEditCtrl. You've raised several issues here, and to allow them to be tracked right and passed to the appropriate people, I'd appreciate if you could open one bug for each of these specific problems. I've also put a brief comment below each

- poor documentation of CHtmlEditCtrl [no samples, overview, example, snippet]

I agree that the docs for this class are not good. It has low usage and hasn't gotten much doc attention.

- Calling SetDocumentHTML in OnInitDialog does not seem to work at all. Calling GetDocumentHTML right afterwards does not give the expected result. The documentation does not say anything at all.

When you reopen this as a separate issue, can you provide a code sample? I would like to see exactly what you're doing here to work out whether this is a bug or not.

- The destructor is protected so you have to derive from CHtmlEditCtrl. Why?

This is definitely a bug. No need to open a separate issue for this; we'll use this issue to cover this bug. I am not sure why this protected destructor exists, but it is wrong.

- Second, documented functions do not compile. Try to call SetBackColor for a CHtmlEditCtrl object. There is an ambiguity in QueryStatus of CHtmlEditCtrlBase.

Again, if you could open a separate issue for this with a code sample showing what code you wrote and the compile error you got, that'd be great.

Thanks for following up and sorry you've had so many problems.

Martyn Lovell
Development Lead
Visual C++ Libraries
Posted by Microsoft on 11/15/2006 at 1:41 PM
Hi,

Thank you for report. This issue has been fixed and the fix is going to be available in the next major release of Visual Studio codename-Orcas.

Thanks,
Nikola Dudar
Visual C++