O acesso as DLL's do windows via Harbour está totalmente funcional.
Código: Selecionar todos
If File("bemafi32.dll")
hDll:=DllLoad("bemafi32.dll")
Else
MsgStop("Falha carregando bemafi32.dll")
return .f.
EndIf
Código: Selecionar todos
nRetVal := DllCall(hDll,DLL_OSAPI,"Bematech_FI_VendeItem",;
pd->cod_mercad,;
substr(pd->mercadoria,1,29),;
eq->situa_trib,;
"F",;
Zero_Esq(pd->quantidade,7,3),;
2,;
zero_esq(pd->preco_unit,8,2),;
SD,;
Desc)
If nRetVal <> 1
MsgStop("Bematech_FI_VendeItem: "+str(nRetVal))
EndIf
Código: Selecionar todos
******************************
Function Grafico(sTemp,lPrint)
******************************
*
*
Local oMainWindow, oFont, hDll
hDll:=DllLoad("rmchart.dll")
PREPARE FONT oFont NAME "Times New Roman" WIDTH 0 HEIGHT -17 CHARSET 4
INIT DIALOG oMainWindow TITLE "GRÁFICO" Font oFont AT 0,0 SIZE 910,620 STYLE DS_CENTER+WS_OVERLAPPEDWINDOW+WS_VISIBLE ;
On Init {|| Chart(hDll,oMainWindow,sTemp) }
@ 820,020 ButtonEx oBtPrint Caption '' TRANSPARENT of oMainWindow Style WS_TABSTOP Size 70,70 BITMAP (HBitmap():AddFile(cImageDir+'impressora.bmp')):handle BSTYLE 1 ON CLICK {||PrintChart(hDll,oMainWindow)}
oMainWindow:Activate()
Return nil
**************************************
Function Chart(hDll,oMainWindow,sTemp)
**************************************
*
*
Local nRetVal:=0
nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_CREATECHARTFROMFILE",oMainWindow:Handle,1001,10,10,0,sTemp)
nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_DRAW",1001)
return ""
Saudações,
Itamar M. Lins Jr.



