Click here to Skip to main content
15,889,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Specifying unicode strings Pin
Michael Schubert17-Jul-09 3:12
Michael Schubert17-Jul-09 3:12 
GeneralRe: Specifying unicode strings Pin
Jon17-Jul-09 3:30
Jon17-Jul-09 3:30 
AnswerRe: Specifying unicode strings Pin
Michael Schubert17-Jul-09 0:41
Michael Schubert17-Jul-09 0:41 
GeneralRe: Specifying unicode strings Pin
Jon17-Jul-09 1:11
Jon17-Jul-09 1:11 
AnswerRe: Specifying unicode strings Pin
Adam Roderick J17-Jul-09 0:56
Adam Roderick J17-Jul-09 0:56 
GeneralRe: Specifying unicode strings Pin
Jon17-Jul-09 1:10
Jon17-Jul-09 1:10 
AnswerRe: Specifying unicode strings Pin
Nemanja Trifunovic17-Jul-09 3:46
Nemanja Trifunovic17-Jul-09 3:46 
QuestionIHTMLTxtRange::pasteHTML crash, any idea??? Pin
Ram-Murthi17-Jul-09 0:02
Ram-Murthi17-Jul-09 0:02 
i am working in a code, in which they have used DHTML Edit Control(Dhtmled.ocx) to implement IE HTML editor sort of application. pasteHTML method is crashing when it get some strange HTML text. this is not happening at all the time. i have added the code below.
but i cannot add the HTML code which is causing the problem ,since it is too huge text. this is happening at client's place only.

this happens with Windows XP , IE6-SP3

it is working fine in Windows 2003 server with IE 7.


I am passing HTML text as 1'st argument.

i have searched all over the place in the net, but nobody discussed about the problem.
i know microsoft dropped supporting DHTML Edit for long time before, but we can not migrate it to MSHTML, , because it will take long time for me to rewrite exact the code to simulate DHTML Edit control wrapper class in MSHTML, i have to give a fix for time being,

Please throw me a clue if anybody have an idea, if

1. is there any way to find out a HTML tag which is causing the crash,

2. any workaround for pasteHTML method , .



void CDHTMLEdit::ReplaceSel(LPCTSTR lpszNewText,bool bHTML/* = true */)
{
try
{
CHTMLSelectionObject SelObj = GetDom().GetSelection();

CString strText = SelObj.GetType();

LPDISPATCH lpIDispatch= SelObj.createRange();

IHTMLTxtRange * lpTxtRange;
if(S_OK != lpIDispatch->QueryInterface(IID_IHTMLTxtRange,(void **)&lpTxtRange))
{
lpIDispatch->Release();
return;
}

if(bHTML)
{
CComBSTR bstrReplaceText = lpszNewText;
lpTxtRange->pasteHTML(bstrReplaceText);


}
else
{
CComBSTR bstrReplaceText = lpszNewText;
lpTxtRange->put_text(bstrReplaceText);
}

lpTxtRange->collapse(false);
lpTxtRange->select();

lpTxtRange->Release();
lpIDispatch->Release();
}
catch(COleDispatchException * pDE)
{
FILETRACE(_T(" COleDispatchException caught in CDHTMLEdit::ReplaceSel."));
pDE->Delete();
ASSERT(FALSE);
}
catch(...)
{
FILETRACE(_T("CDHTMLEdit::ReplaceSel - Unhandled exception caught"));
ASSERT(FALSE);
}
}
QuestionVS 2008, error C4430 Pin
Nandu_77b16-Jul-09 23:40
Nandu_77b16-Jul-09 23:40 
AnswerRe: VS 2008, error C4430 [modified] Pin
Rajesh R Subramanian16-Jul-09 23:51
professionalRajesh R Subramanian16-Jul-09 23:51 
QuestionRe: VS 2008, error C4430 Pin
Nandu_77b16-Jul-09 23:58
Nandu_77b16-Jul-09 23:58 
AnswerRe: VS 2008, error C4430 Pin
Rajesh R Subramanian17-Jul-09 0:05
professionalRajesh R Subramanian17-Jul-09 0:05 
GeneralRe: VS 2008, error C4430 Pin
Nandu_77b17-Jul-09 0:22
Nandu_77b17-Jul-09 0:22 
GeneralRe: VS 2008, error C4430 Pin
Rajesh R Subramanian17-Jul-09 0:28
professionalRajesh R Subramanian17-Jul-09 0:28 
AnswerRe: VS 2008, error C4430 Pin
Stuart Dootson17-Jul-09 1:02
professionalStuart Dootson17-Jul-09 1:02 
GeneralRe: VS 2008, error C4430 Pin
Rajesh R Subramanian17-Jul-09 1:03
professionalRajesh R Subramanian17-Jul-09 1:03 
GeneralRe: VS 2008, error C4430 Pin
Stuart Dootson17-Jul-09 3:55
professionalStuart Dootson17-Jul-09 3:55 
AnswerRe: VS 2008, error C4430 Pin
S p k 52117-Jul-09 1:54
S p k 52117-Jul-09 1:54 
QuestionCab file installation failed in IE 64bit [modified] Pin
hareshel16-Jul-09 22:36
hareshel16-Jul-09 22:36 
Questionwhich version of crystal reports to use on Windows 2000 professional OS? Pin
kokilag16-Jul-09 21:50
kokilag16-Jul-09 21:50 
QuestionHow to catch the Exceptions in edit control,MFC? Pin
DevelopmentNoob16-Jul-09 21:31
DevelopmentNoob16-Jul-09 21:31 
AnswerRe: How to catch the Exceptions in edit control,MFC? Pin
«_Superman_»16-Jul-09 21:42
professional«_Superman_»16-Jul-09 21:42 
AnswerRe: How to catch the Exceptions in edit control,MFC? Pin
SandipG 16-Jul-09 21:50
SandipG 16-Jul-09 21:50 
AnswerRe: How to catch the Exceptions in edit control,MFC? Pin
Cedric Moonen16-Jul-09 22:07
Cedric Moonen16-Jul-09 22:07 
GeneralRe: How to catch the Exceptions in edit control,MFC? Pin
DevelopmentNoob16-Jul-09 23:25
DevelopmentNoob16-Jul-09 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.