User (Legacy) Posted February 16, 2004 Report Share Posted February 16, 2004 Hello Everyone, Does anyone have any documentation or know how to use the "DeleteDrawing" and "DeleteAllDrawing" methods of the financial extension? I can not make them work as I'd expect, all I am trying to do is use these methods to remove the last drawing added (regardless of type) and delete all drawings (again, regardless of type). Thanks in advance, Chase Gale Link to comment Share on other sites More sharing options...
Software FX Posted February 17, 2004 Report Share Posted February 17, 2004 Dear Mr. Gale, I have looked into the code and this is what I have found: The signature for DeleteAllDrawing is thus HRESULT CFinancialCharts::DeleteAllDrawing(cfxfeDrawingFeature nDraw) {} You must pass one parameter which can be one of two types: DF_ALL or for example DF_GANN_FAN DF_ALL will delete all of the drawings on the Analytical Gallery Any other will just delete all of the Gann_Fans So you either pass DF_ALL(-1) or one of the following Const DF_ALL = -1 Const DF_GANN_FAN = 0 Const DF_FIBONACCI_ARCS = 1 Const DF_FIBONACCI_FAN = 2 Const DF_FIBONACCI_RETRACEMENTS = 3 Const DF_FIBONACCI_TIMEZONES = 4 Const DF_MIDPOINT_TIRONE_LEVELS = 5 Const DF_MEAN_TIRONE_LEVELS = 6 Const DF_SPEED_RESISTANCE_LINES = 7 Const DF_QUADRANT_LINES = 8 Const DF_TREND_LINE = 9 Now DeleteDrawing is to delete just 1 drawing at a time and you must know what drawing you want to delete. The ID of a drawing is based on 2 numbers. The Signature for DeleteDrawing is thus: HRESULT CFinancialCharts::DeleteDrawing(cfxfeDrawingFeature nDraw, short nIndex) {} The KIND of drawing and the relative sequence/index of the drawing (ie.GANN_FAN, 1 or GANN_FAN, 2) and those are the 2 parameters of the method nDraw is the KIND of drawing, based on the above constants, to erase and nIndex is the index of that particular type. By the way you can use DrawingNumber([in] cfxfeDrawingFeature nDraw,[out, retval] short *pVal); to determine the number of drawings per kind. So you must keep a variable that contains the last drawn type and the index of the last drawn GannFAN for example in order to erase it. Or just keep the last drawn type and use DrawingNumber to get the count! Hope this helps! -CJS umber of drawings per KIND "Chase Gale" <cgale@fxsol.com> wrote in message news:UN95nDK9DHA.1816@webserver3.softwarefx.com... > Hello Everyone, > > Does anyone have any documentation or know how to use the "DeleteDrawing" > and "DeleteAllDrawing" methods of the financial extension? > > I can not make them work as I'd expect, all I am trying to do is use these > methods to remove the last drawing added (regardless of type) and delete all > drawings (again, regardless of type). > > Thanks in advance, > > Chase Gale > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 17, 2004 Author Report Share Posted February 17, 2004 Thank you for the quick reply! Your explanation was detailed and thourough and has helped me a great deal. Chase Gale "Software FX Support" <support@softwarefx.com> wrote in message news:1ESCK2W9DHA.196@webserver3.softwarefx.com... > Dear Mr. Gale, > > I have looked into the code and this is what I have found: > The signature for DeleteAllDrawing is thus > HRESULT CFinancialCharts::DeleteAllDrawing(cfxfeDrawingFeature nDraw) {} > You must pass one parameter which can be one of two types: > DF_ALL or for example DF_GANN_FAN > DF_ALL will delete all of the drawings on the Analytical Gallery > Any other will just delete all of the Gann_Fans > So you either pass DF_ALL(-1) or one of the following > > Const DF_ALL = -1 > Const DF_GANN_FAN = 0 > Const DF_FIBONACCI_ARCS = 1 > Const DF_FIBONACCI_FAN = 2 > Const DF_FIBONACCI_RETRACEMENTS = 3 > Const DF_FIBONACCI_TIMEZONES = 4 > Const DF_MIDPOINT_TIRONE_LEVELS = 5 > Const DF_MEAN_TIRONE_LEVELS = 6 > Const DF_SPEED_RESISTANCE_LINES = 7 > Const DF_QUADRANT_LINES = 8 > Const DF_TREND_LINE = 9 > > Now DeleteDrawing is to delete just 1 drawing at a time and you must know > what drawing you want to delete. > The ID of a drawing is based on 2 numbers. > The Signature for DeleteDrawing is thus: > HRESULT CFinancialCharts::DeleteDrawing(cfxfeDrawingFeature nDraw, short > nIndex) {} > > The KIND of drawing and the relative sequence/index of the drawing > (ie.GANN_FAN, 1 or GANN_FAN, 2) and those are the 2 parameters of the method > nDraw is the KIND of drawing, based on the above constants, to erase and > nIndex is the index of that particular type. > > By the way you can use DrawingNumber([in] cfxfeDrawingFeature nDraw,[out, > retval] short *pVal); to determine the number of drawings per kind. > > So you must keep a variable that contains the last drawn type and the index > of the last drawn GannFAN for example in order to erase it. Or just keep the > last drawn type and use DrawingNumber to get the count! > > Hope this helps! > -CJS > umber of drawings per KIND > > "Chase Gale" <cgale@fxsol.com> wrote in message > news:UN95nDK9DHA.1816@webserver3.softwarefx.com... > > Hello Everyone, > > > > Does anyone have any documentation or know how to use the "DeleteDrawing" > > and "DeleteAllDrawing" methods of the financial extension? > > > > I can not make them work as I'd expect, all I am trying to do is use these > > methods to remove the last drawing added (regardless of type) and delete > all > > drawings (again, regardless of type). > > > > Thanks in advance, > > > > Chase Gale > > > > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.