Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic Charting Library for QM2?
#1
hello, i am trying to create a small app that i want to include basic charting, plotting of data.  is this possible with QM2?  can anyone recommend an extension, library that i can use?  thanks alot for any direction
#2
does anyone know if this would work within QM2?

https://www.codeproject.com/Articles/382...eX-Control
#3
Yes that will work in qm2. Control loads in smart dialog.
#4
Thanks Kevin.  And what would be the process?  im new to adding other libaraies so not sure what is proper process..

there are 2 downloads available.  1 with a gdiplus.dll and a GDIPlusPlot.ocx file and the other contains alot of .cpp and .h files.... which one do i work with and where would the files go... and what QM commands in my script do i need to customize and display the plots?

thanks for any help you can provide... here is a screenshot and a link to download without needing to sign up at website

[img][Image: DEERapE.png][/img]


Attached Files
.zip   GDIPlotting_forQM.zip (Size: 1.79 MB / Downloads: 137)
#5
you need the one with gdiplus.dll and GDIPlusPlot.ocx .
1. download them and unzip those two files to Qm program folder.
2. then create a new smart dialog
3. on the dialog editor window click Advanced
4. then click ActiveXcontrols...
   
it will open another window
COM Libraries (Type Libraries, ActiveX Controls
5. search for GDIPlusPlot Control
If you do not find it go to step 6
else goto step 10

6. click the register button on that window
7. navigate to qm program folder "C:\Program Files (x86)" or wherever qm was installed on your pc
8. find GDIPlusPlot.ocx select it and clock open and it will register it. 
9. make sure option button controls is selected
then try and search for GDIPlusPlot Control again
   

10. once it is selected click add control to dialog button
11. on the popup window click yes
   
you will then see the new control added to the dialog editor
12. while the control is selected in the qm dialog editor click the events button
   
it will insert the code needed to start using the control in the qm dialog

you should see code like this
Code:
Copy      Help
,case WM_INITDIALOG
,GDIPLUSPLOTLib.GDIPlusPlot gd3
,gd3._getcontrol(id(3 hDlg))
,gd3._setevents("sub.gd3")
13.  this line for now is not needed
Code:
Copy      Help
gd3._setevents("sub.gd3")
 
just comment it out  
Code:
Copy      Help
,;gd3._setevents("sub.gd3")

14. click save on the dialog editor window . now the control is setup for the dialog . will still need to add code for plotting.


so the basic code you just created will look something like this
Function DialogExampleCode
Code:
Copy      Help
typelib GDIPLUSPLOTLib {38FA7518-E1AC-4EC2-AAEF-8A7A7F567BE7} 1.0

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 ActiveX 0x54030000 0x0 12 16 96 48 "GDIPLUSPLOTLib.GDIPlusPlot {DCD24674-D4A1-4ECE-B6A0-D854DB5AD692}"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,GDIPLUSPLOTLib.GDIPlusPlot gd3
,gd3._getcontrol(id(3 hDlg))
,;gd3._setevents("sub.gd3")
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#6
wow super nice of you Kevin.  Ill test this weekend. thanks again
#7
thanks Kevin, i was able to get it to work. Now knowing how to call and use the methods/function for this control. would you suggest the source code files?


Forum Jump:


Users browsing this thread: 1 Guest(s)