Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic Charting Library for QM2?
#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


Messages In This Thread
Basic Charting Library for QM2? - by ilcaa - 10-20-2020, 12:38 AM
RE: Basic Charting Library for QM2? - by ilcaa - 10-22-2020, 08:51 PM
RE: Basic Charting Library for QM2? - by Kevin - 10-23-2020, 02:43 PM
RE: Basic Charting Library for QM2? - by ilcaa - 10-23-2020, 04:31 PM
RE: Basic Charting Library for QM2? - by Kevin - 10-23-2020, 11:12 PM
RE: Basic Charting Library for QM2? - by ilcaa - 10-24-2020, 08:07 PM
RE: Basic Charting Library for QM2? - by ilcaa - 10-26-2020, 04:35 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)