compartilhando com a galera
codigo para rmchart dll e hwgui usando harbour 2.1 onde as chamadas dlls sao diferentes
#include "windows.ch"
#include "guilib.ch"
#include "hbdyn.ch"
#define ID_CHART 5001
#define ID_CHART2 5002
Function Main
hDll:= hb_LibLoad("rmchart.dll")
PREPARE FONT oFont NAME "Times New Roman" WIDTH 0 HEIGHT -17 CHARSET 4
INIT WINDOW oMainWindow MAIN MDI TITLE "Example RMCHART";
AT 0,0 SIZE 1300,650 ;
FONT oFont
MENU OF oMainWindow
MENU TITLE "Charts"
MENUITEM "Charts" ID 1100 ACTION Chart()
ENDMENU
ENDMENU
oMainWindow:activate()
hb_LibFree( hDll )
Return nil
function chart
cLabel1 := "Coluna 1"
cLabel2 := "Coluna 2"
cLabel3 := "Coluna 3"
cLabel4 := "Coluna 4"
cLabel5 := "Coluna 5"
sTemp1 := "00003600|00004450|000051|000061|00008-984833|00009310|00011Tahoma|100011|100035|100045|";
+"10005-5|10006-5|1000911|100101|100111|100131|100181|100200|10021100|1002211|100238|100331|";
+"100341|100355|100378|100481|100491|10051-16776961|10052-256|10053-1|100541|100558|";
+"10056-16777216|10057-16777216|10060-16777216|10061-16777216|100626|10181This is the chart's caption|";
+"10187Label 1*Label 2*Label 3*Label 4*Label 5|110011|110021|110031|110043|110053|11006-1|";
+"110091|110131|11014-1|110171|1102111|110221|110235|1105350*70*40*60*30"
nSize1X := VAL( SUBS( sTemp1, AT("00003",sTemp1)+5 , 3 ) )
nSize1Y := VAL( SUBS( sTemp1, AT("00004",sTemp1)+5 , 3 ) )
sTemp1 := STRTRAN( sTemp1, "Label 1", cLabel1 )
sTemp1 := STRTRAN( sTemp1, "Label 2", cLabel2 )
sTemp1 := STRTRAN( sTemp1, "Label 3", cLabel3 )
sTemp1 := STRTRAN( sTemp1, "Label 4", cLabel4 )
sTemp1 := STRTRAN( sTemp1, "Label 5", cLabel5 )
sTemp2 := "00003650|00004450|000051|000061|000071|00008-6697831|00009412|00011Tahoma|100011";
+ "|1000310|1000410|10005-5|10006-5|1000910|100101|100111|100121|100131|100181|1002";
+ "00|100217|1002215|100238|100272|100331|100341|100358|100378|100411|100482|100492";
+ "|10051-6751336|10052-15132304|10053-983041|100541|100558|10056-16777077|10057-16";
+ "777077|100586|10060-16777077|10061-1468806|100622|10180data source: www.federalr";
+ "eserve.gov + www.ecb.int|10181Prime Rates in USA und Euroland|10183 %|101871999*";
+ "2000*2001*2002*2003*2004*2005*2006|110011|1100221|110035|1100434|110052|110063|1";
+ "10073|1100970|1101312|110171|11019-16744448|1102115|110221|1102396|110262|110521";
+ "2|110534.75*4.75*4.75*4.75*4.75*5*5*5.25*5.25*5.25*5.5*5.5*5.5*5.75*6*6*6.5*6.5*";
+ "6.5*6.5*6.5*6.5*6.5*6.5*5.5*5.5*5*4.5*4*3.75*3.75*3.5*3*2.5*2*1.75*1.75*1.75*1.7";
+ "5*1.75*1.75*1.75*1.75*1.75*1.75*1.75*1.25*1.25*1.25*1.25*1.25*1.25*1.25*1*1*1*1*";
+ "1*1*1*1*1*1*1*1*1*1*1.25*1.5*1.75*2*2.25*2.25*2.5*2.75*2.75*3*3.25*3.25*3.5*3.75";
+ "*3.75*4*4.25*4.5*4.5*4.75*4.75*5*5.25*5.25*5.25*5.25*5.25*5.25*5.25|120011|12002";
+ "21|120035|1200434|120052|120063|120073|1200950|1201312|120171|12019-2448096|1202";
+ "115|120221|1202396|120262|1205212|120533*3*3*2.5*2.5*2.5*2.5*2.5*2.5*2.5*3*3*3*3";
+ ".25*3.5*3.75*3.75*4.25*4.25*4.5*4.5*4.75*4.75*4.75*4.75*4.75*4.75*4.75*4.5*4.5*4";
+ ".5*4.25*3.75*3.75*3.25*3.25*3.25*3.25*3.25*3.25*3.25*3.25*3.25*3.25*3.25*3.25*3.";
+ "25*2.75*2.75*2.75*2.5*2.5*2.5*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*";
+ "2*2*2*2*2*2.25*2.25*2.25*2.5*2.5*2.5*2.75*2.75*3*3*3.25*3.25*3.5|010011|010054|0";
+ "100721|01014-16744448|010222|01024216*287|01025109*109|010272|010283|010012|0100";
+ "51|01010295|01011102|010191|01026USA (Federal Funds Rate)|010013|010054|0100721|";
+ "01014-10496|010222|01024260*287|01025192*192|010272|010283|010014|010051|0101029";
+ "5|01011185|010191|01026Euroland (Prime Rate)"
nSize2X := VAL( SUBS( sTemp2, AT("00003",sTemp2)+5 , 3 ) )
nSize2Y := VAL( SUBS( sTemp2, AT("00004",sTemp2)+5 , 3 ) )
INIT WINDOW oFormChart1 MDICHILD ;
TITLE "teste 1" ;
STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW;
AT 0,0;
SIZE nSize1X+20,nSize1Y+30;
FONT oFont;
ON INIT {|o| initForm_Chart1(o) };
oFormChart1:Activate(.T.)
INIT WINDOW oFormChart2 MDICHILD ;
TITLE "teste 2" ;
STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW;
AT nSize2X,0;
SIZE nSize2X+20,nSize2Y+30;
FONT oFont;
ON INIT {|o| initForm_Chart2(o) };
ON EXIT {|o| exitForm_Chart2(o) }
oFormChart2:Activate(.T.)
return .T.
function initForm_Chart1(o)
nRetVal := HB_DYNCALL( {"RMC_CREATECHARTFROMFILE", hDll, HB_DYN_CALLCONV_STDCALL },o:handle,ID_CHART,0,0,0,sTemp1)
nRetVal := HB_DYNCALL( {"RMC_DRAW", hDll, HB_DYN_CALLCONV_STDCALL },ID_CHART)
return(.t.)
function exitForm_Chart1(o)
nRetVal = HB_DYNCALL( {"RMC_DELETECHART", hDll, HB_DYN_CALLCONV_STDCALL },ID_CHART)
return(.t.)
function initForm_Chart2(o)
nRetVal := HB_DYNCALL( {"RMC_CREATECHARTFROMFILE", hDll, HB_DYN_CALLCONV_STDCALL },o:handle,ID_CHART2,0,0,0,sTemp2)
nRetVal := HB_DYNCALL( {"RMC_DRAW", hDll, HB_DYN_CALLCONV_STDCALL },ID_CHART2)
return(.t.)
function exitForm_Chart2(o)
nRetVal = HB_DYNCALL( {"RMC_DELETECHART", hDll, HB_DYN_CALLCONV_STDCALL },ID_CHART2)
return(.t.)
[]s
Fernando