User (Legacy) Posted July 29, 2002 Report Share Posted July 29, 2002 Hi, I am very new to annotation objects of Cfx. I Link to comment Share on other sites More sharing options...
Software FX Posted July 29, 2002 Report Share Posted July 29, 2002 1) Using Annotation objects is the best way to do this, the only other alternative would be using the Paint events and draw that line yourself using the Windows API, but I think the annotation approach is better (easier). 2) You can use PaintInfo with CPI_MARKERTOPIXEL to find out about the position of each marker (bar) 3) You can use ValueToPixel to determine the position of a logical X,Y value. 4) ATTACH_ELASTIC will solve these conversions for you but you have to calculate the exact logical X and Y coordinates of each arrow. Because the Bars are Side-By-Side you will require to do some calculations based on the series index and the Volume property. I have not made this calculations but I'm sure is not that difficult to figure out. --- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted July 31, 2002 Author Report Share Posted July 31, 2002 Hi, "SoftwareFX Support" <support@softwarefx.com> wrote in message news:sBI9L3xNCHA.1984@webserver1.softwarefx.com... > 1) Using Annotation objects is the best way to do this, the only other > alternative would be using the Paint events and draw that line yourself > using the Windows API, but I think the annotation approach is better > (easier). [...] Thanks for the help. For my purpose, I did find easier to detect PostPaint event and to draw what I need (the line) using the Windows GDI functions. Anyway, your answer has lead me to PaintInfo() and to the things that I can do with it. Thanks again. As the side effect, I have two working examples (samples) written in VC++ 6.0 that use Cfx4032.dll and the sfxbar.dll via #import. The code uses ATL (no MFC) and GDI functions. The first example detects PostPaint event through notifications sent to the message queue, the second one uses ICfxEvents interface. Is anyone interested in the samples? (You can do anything you want with them.) If yes, I can post here the zip file (about 30KB). No licence string is used inside, so I hope that it would not be illegal Petr -- Petr Prikryl (prikrylp at skil dot cz) Link to comment Share on other sites More sharing options...
Software FX Posted July 31, 2002 Report Share Posted July 31, 2002 It is OK to post the sample if it does not contain licensing info. I think it may be helpful to others. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 2, 2002 Author Report Share Posted August 2, 2002 Sent to this group with subject "Samples attached: Custom painting with PostPaint event detection..." Petr "SoftwareFX Support" <support@softwarefx.com> wrote in message news:UwbGb3JOCHA.1280@webserver1.softwarefx.com... > It is OK to post the sample if it does not contain licensing info. I think > it may be helpful to others. > > -- > FP > Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.