Parentless TRichView control
Posted: Fri Sep 13, 2013 4:17 am
I have an invisible TRichView control with no parent that I use to convert HTMLto RTF.
When RTF is saved, TRVWinGraphicInterface.GetDeviceCaps is called and accesses the Canvas property. The control has no parent, so the handle cannot be created and the calls fails with the following call stack.
Shouldn't the control be using the screen canvas in this case?
Thanks you!
Vcl.Controls.TWinControl.CreateWnd
RVScroll.TRVScroller.CreateWnd
Vcl.Controls.TWinControl.CreateHandle
Vcl.Controls.TWinControl.HandleNeeded
Vcl.Controls.TControlCanvas.CreateHandle
Vcl.Graphics.TCanvas.RequiredState([csHandleValid,csFontValid,csPenValid,csBrushValid])
Vcl.Graphics.TCanvas.GetHandle
RVWinGrIn.TRVWinGraphicInterface.GetDeviceCaps($17DB8660,88)
RVFuncs.RV_InfoAboutSaD($13E498,$17DB8660,$17E01210)
CRVFData.TCustomRVFormattedData.GetSADForFormatting($17DB8660,$13E498)
CRVFData.TCustomRVFormattedData.Format_(False,True,False,0,$17DB8660,False,False,False,False,False)
CRVFData.TCustomRVFormattedData.Format(False,False)
RVTable.TRVTableItemInfo.UpdateCellXCoords($17E0A0B0,False,False,False)
RVTable.TRVTableItemInfo.InternalOnDocWidthChange(600,$17E0A0B0,nil,False,False,False,$17E01210)
RVTable.TRVTableItemInfo.OnDocWidthChange(600,nil,False,nil,$188A8DB0,nil,0,0,False,False,False)
RVTable.TRVTableItemInfo.SaveRTF($17DF4A20,'',$188A8DB0,26,0,$17DFB1E8,$17DFADF8,$17DFB098,$17DFB518,False)
CRVData.TCustomRVData.SaveRTFToStream($17DF4A20,'',False,0,536870911,$17DFABD0,$17DFB1E8,$17DFADF8,$17DFB098,$17DFB518,True,False,nil,nil,nil,nil,nil,nil)
RichView.TCustomRichView.SaveRTFToStream($17DF4A20,False)
When RTF is saved, TRVWinGraphicInterface.GetDeviceCaps is called and accesses the Canvas property. The control has no parent, so the handle cannot be created and the calls fails with the following call stack.
Shouldn't the control be using the screen canvas in this case?
Thanks you!
Vcl.Controls.TWinControl.CreateWnd
RVScroll.TRVScroller.CreateWnd
Vcl.Controls.TWinControl.CreateHandle
Vcl.Controls.TWinControl.HandleNeeded
Vcl.Controls.TControlCanvas.CreateHandle
Vcl.Graphics.TCanvas.RequiredState([csHandleValid,csFontValid,csPenValid,csBrushValid])
Vcl.Graphics.TCanvas.GetHandle
RVWinGrIn.TRVWinGraphicInterface.GetDeviceCaps($17DB8660,88)
RVFuncs.RV_InfoAboutSaD($13E498,$17DB8660,$17E01210)
CRVFData.TCustomRVFormattedData.GetSADForFormatting($17DB8660,$13E498)
CRVFData.TCustomRVFormattedData.Format_(False,True,False,0,$17DB8660,False,False,False,False,False)
CRVFData.TCustomRVFormattedData.Format(False,False)
RVTable.TRVTableItemInfo.UpdateCellXCoords($17E0A0B0,False,False,False)
RVTable.TRVTableItemInfo.InternalOnDocWidthChange(600,$17E0A0B0,nil,False,False,False,$17E01210)
RVTable.TRVTableItemInfo.OnDocWidthChange(600,nil,False,nil,$188A8DB0,nil,0,0,False,False,False)
RVTable.TRVTableItemInfo.SaveRTF($17DF4A20,'',$188A8DB0,26,0,$17DFB1E8,$17DFADF8,$17DFB098,$17DFB518,False)
CRVData.TCustomRVData.SaveRTFToStream($17DF4A20,'',False,0,536870911,$17DFABD0,$17DFB1E8,$17DFADF8,$17DFB098,$17DFB518,True,False,nil,nil,nil,nil,nil,nil)
RichView.TCustomRichView.SaveRTFToStream($17DF4A20,False)