hey, thanks for the great info everyone
RMC_Draw2File() - save your chart to an image
i havent seen any mention of this, but i'm finding it useful for outputting the chart resulting chart onto a pdf (using libHaru), or could save a history of charts, use for webpages, etc... i'm surprised no one wanted this
requires gdi+, which may already be needed
From RMChart documentation:
Quote:
RMC_Draw2File function.
Draws a chart into a *.jpg, *.png or *.emf file
--------------------------------------------------------------------------------
Syntax
nResult (LONG) = RMC_Draw2File(
ByVal nCtrlId (LONG),
ByRef sFileName (ASCIIZ),
Optional ByVal nWidth (LONG),
Optional ByVal nHeight (LONG),
Optional ByVal nJPGQualityLevel (LONG)
)
my quick and dirty function:
Code:
#singleinstance force
hModule := DllCall("LoadLibrary", "str", "rmchart.dll")
Gui +LastFound
file = %A_ScriptDir%\bars.png
;msgbox, % file
hGui := WinExist()
result := DllCall("rmchart.dll\RMC_CREATECHARTFROMFILE"
, "UInt", hGui ; Parent
, "UInt", 1001 ; CtrlId
, "UInt", 5 ; X
, "UInt", 5 ; Y
, "UInt", 0 ; ExportOnly
, "Str", "bars.rmc" ) ; RMCFile
result := DllCall("rmchart.dll\RMC_DRAW"
, "UInt", 1001) ; CtrlId
result := DllCall("rmchart.dll\RMC_DRAW2FILE"
, "UInt", 1001 ; CtrlId
, "Str", file ;) ; pictureFile
, "UInt", 0 ; X
, "UInt", 0 ; Y
, "UInt", 0 ) ; quality
Gui, Show, w700 h500, RM Chart
Return
GuiClose:
GuiEscape:
ExitApp
Return
hope someone finds it useful
- gwarble