![]() |
StylerBrowser sample error! |
Post Reply ![]() |
Author | |
littleameng ![]() Groupie ![]() ![]() Joined: 22 June 2008 Location: China Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() Posted: 09 July 2008 at 2:17am |
After build the stylerbrowser.exe I run it, then I put mouse on the source DockingPane , then I will get an error!
So I debug the stylerbrowser, and find that when the program run to SetTextFormat(psz) the error will happen.
CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
|
|
___CSourceCtrl::Refresh(CHtmlView* pView, BOOL /*bForce*/)
|
|
-----CSourceCtrl::SetTextFormat(psz)
how to solve the problem? thanks
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
What error ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
littleameng ![]() Groupie ![]() ![]() Joined: 22 June 2008 Location: China Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
the error message:
![]() |
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Thanks, agree :-(
Sample's sources assumed length of ansi string is same as length of unicode. not for MBCS locale.
Please change code in CSourceCtrl::Refresh
replace
int nLength = SysStringLen(bstrHTMLText);
LPTSTR psz = new TCHAR[nLength + 1];
lstrcpy(psz, OLE2T(bstrHTMLText)); SetTextFormat(psz); to
SetTextFormat((LPTSTR)(LPCTSTR)str); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
littleameng ![]() Groupie ![]() ![]() Joined: 22 June 2008 Location: China Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
thank you for your answer!
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |