RMChart

Projeto [x]Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

RMChart

Mensagem por JoséQuintas »

Só pra constar, no FOR/NEXT aceitou isto também, mas mesmo resultado

Código: Selecionar todos

   FOR nCont = 1 TO 3
      oGrafico:AddBarSeries( ID_CHART, 1, @aDados[ 1, 1 ], 12, RMC_BARGROUP, RMC_BAR_FLAT_GRADIENT2, .F., 0, .F., 1, RMC_VLABEL_NONE, nCont, RMC_HATCHBRUSH_ONPRINTING )
   NEXT
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

RMChart

Mensagem por JoséQuintas »

Passar de novo a definição do VB.

Código: Selecionar todos

Declare Function RMC_AddBarSeries Lib "RMCHART.DLL" Alias "RMC_ADDBARSERIES" ( _
                            ByVal nCtrlId As Long, _
                            ByVal nRegion As Long, _
                            Optional ByRef nFirstDataValue As Double, _
                            Optional ByVal nDataValuesCount As Long, _
                            Optional ByVal nType As BarSeriesType, _
                            Optional ByVal nStyle As BarSeriesStyle, _
                            Optional ByVal nIsLucent As Long, _
                            Optional ByVal nColor As RMC_Colors, _
                            Optional ByVal nIsHorizontal As Long, _
                            Optional ByVal nWhichDataAxis As Long, _
                            Optional ByVal nValueLabelOn As ValueLabels, _
                            Optional ByVal nPointsPerColumn As Long, _
                            Optional ByVal nHatchMode As Hatchmodes _
                            ) As RMCError
Declare Function RMC_AddBarSeriesI Lib "RMCHART.DLL" Alias "RMC_ADDBARSERIESI" ( _
                            ByVal nCtrlId As Long, _
                            ByVal nRegion As Long, _
                            ByRef nFirstDataValue As Double, _
                            ByVal nDataValuesCount As Long, _
                            T As tRMC_BARSERIES _
                            ) As RMCError
Pergunta simples:
Porque será que tem AddBarSeries, e AddBarSeriesI ?
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

Quintas,

A documentação está no arquivo rmchart.chm

Eu também vi essa função RMC_AddBarSeriesI , mas não consegui entender o seu funcionamento
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

No código é passado 3 valores por mês, só que aDadosGraf só contém so primeiros elementos da matriz aDados que tem 3 dimensões por 12 meses
Agora como exibir essas barras para os outros meses?? o primeiro valor do mês de janeiro tá ok, mas os outros valores, não pesquei ainda como configurar
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

RMChart

Mensagem por JoséQuintas »

Aqui o arquivo chm do rmchart não mostra texto nenhum.

O exemplo do vb, que chamando DLL é praticamente igual no Harbour:

Código: Selecionar todos

aData(0) = 60: aData(1) = 70: aData(2) = 40: aData(3) = 60: aData(4) = 30
    nRetVal = RMC_AddBarSeries(ID_RMC1, 1, aData(0), 5, RMC_BARSINGLE, RMC_BAR_FLAT_GRADIENT2, False, CornflowerBlue, False, 1, RMC_VLABEL_NONE, 1, RMC_HATCHBRUSH_OFF)
um array de 5 elementos, onde passa o primeiro elemento do array aData(0) (No VB por default o primeiro elemento é zero)

o gráfico
exemplovb.png
Ao que parece, o array do Harbour não é compatível.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

Quintas,

Não tem um loop para o array no vb?
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

RMChart

Mensagem por JoséQuintas »

O primeiro é do VB, é outro gráfico, mas segue os comandos.

Código: Selecionar todos

nRetVal = RMC_CreateChartOnDC(Picture1.hDC, ID_RMC1, 0, 0, 600, 450, Azure, RMC_CTRLSTYLEFLAT, False, "")
    nRetVal = RMC_AddRegion(ID_RMC1, 5, 5, -5, -5, "", False)
    nRetVal = RMC_AddCaption(ID_RMC1, 1, "This is the chart's caption", Blue, Yellow, 11, True)
    nRetVal = RMC_AddGrid(ID_RMC1, 1, Beige, False, 0, 0, 0, 0, RMC_BICOLOR_LABELAXIS)
    nRetVal = RMC_AddDataAxis(ID_RMC1, 1, RMC_DATAAXISLEFT, 0, 100, 11, 8, Black, Black, RMC_LINESTYLEDOT, 0, "", "")
    sTemp = "Label 1*Label 2*Label 3*Label 4*Label 5"
    nRetVal = RMC_AddLabelAxis(ID_RMC1, 1, sTemp, 1, 5, RMC_LABELAXISBOTTOM, 8, Black, RMC_TEXTCENTER, Black, RMC_LINESTYLENONE, "")
    ReDim aData(4)
    aData(0) = 60: aData(1) = 70: aData(2) = 40: aData(3) = 60: aData(4) = 30
    nRetVal = RMC_AddBarSeries(ID_RMC1, 1, aData(0), 5, RMC_BARSINGLE, RMC_BAR_FLAT_GRADIENT2, False, CornflowerBlue, False, 1, RMC_VLABEL_NONE, 1, RMC_HATCHBRUSH_OFF)

Código: Selecionar todos

   oGrafico:CreateChart( hb_gtInfo( HB_GTI_WINHANDLE ), ID_CHART, 0, 0, 770, 400, Azure, RMC_CTRLSTYLE3DLIGHT, .F., cImagem, "", 0, 0 )
   oGrafico:AddRegion( ID_CHART, 0, 0, 760, 400, "RmChart", .F. )
   oGrafico:AddCaption( ID_CHART, 1, cTitulo, Transparent, Red, 9, .T. )
   oGrafico:AddGrid( ID_CHART, 1, LightBlue, .F., 20, 20, 685, 330, RMC_BICOLOR_LABELAXIS )
   oGrafico:AddLabelAxis( ID_CHART, 1, cLabels, 1, Len( aDados[ 1 ] ), RMC_LABELAXISBOTTOM, 8, Black, RMC_TEXTCENTER, Black, RMC_LINESTYLENONE, "" )
   oGrafico:AddDataAxis( ID_CHART, 1, RMC_DATAAXISRIGHT, 0.0, nMax, Len( aDados[ 1 ] ), 8, Black, Black, RMC_LINESTYLESOLID, 0, cUnidade, cTextoVert, "", RMC_TEXTCENTER )
   oGrafico:AddLegend( ID_CHART, 1, cLegenda, RMC_LEGEND_BOTTOM, Transparent, RMC_LEGENDNORECT, Red, 8, .T. )

   FOR nCont = 1 TO 3
      oGrafico:AddBarSeries( ID_CHART, 1, @aDados[ 1, 1 ], 12, RMC_BARGROUP, RMC_BAR_FLAT_GRADIENT2, .F., 0, .F., 1, RMC_VLABEL_NONE, nCont, RMC_HATCHBRUSH_ONPRINTING )
   NEXT
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

Quintas,

Conseguiu descobrir como montar as barras de janeiro a dezembro?
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

Pesquei essa informação no fórum fivewin
http://forums.fivetechsupport.com/viewtopic.php?p=49894
Só resta saber como implentar isso: typedef struct { DOUBLE nDouble[5] } MyStructure com o harbour
It seems someone else using xHarbour (but not FWH) also had the problem passing arrays to the RMchart.dll functions - the problem I'm wrestling with - and he found a solution. However, I can't seem to get his solution to work in FWH. Can someone show me how?

Here's an exerpt of the discussion from the Rmchart forum...

*------------
I have a problem with RM_ADDBARSERIES .... I can't get the data array in ??? - ChrisG

aData := { 10.0, 20.0, 30.0, 40.0, 50.0 } // define my array of data

nResult := DLLCall( ;
hDll, ; // DLL to call
DC_CALL_STD, ; // calling convention
"RMC_ADDBARSERIES", ; // the function to call
nCtrlId, ;
1, ; //region
aData, ;
5, ; // length of data
0,0,0,0,0,0,0,0,0 )
I have tried it with aData, aData[1]

*------------
(LATER, HIS SOLUTION...)
A clever person on the xHarbour NG has given me some code that allowed me to do this...

typedef struct { DOUBLE nDouble[5] } MyStructure

PROCEDURE MakeData
LOCAL o IS MyStructure

o:nDouble[1] := 1.0
o:nDouble[2] := 2.0
o:nDouble[3] := 3.0
o:nDouble[4] := 4.0
o:nDouble[5] := 5.0

RETURN( o )
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

Quintas,

typedef está definido no arquivo cstruct.ch, este arquivo tem no harbour

Exemplo que está no fórum fivewin:

Código: Selecionar todos


    #include "FiveWin.Ch"
    #include "cstruct.ch"
    #include "RMCHART.Ch"

    #define DLL_OSAPI 0x20

    typedef struct { CTYPE_DOUBLE nDouble[12] } DataStructD12

    FUNCTION TesteGrafico()
    LOCAL aDados := { { 225.25, 100.00, 100.00, 150.00, 250.00, 300.00, 25.00, 75.00, 300.00, 200.00, 325.00, 300.00 } , { 220.00, 100.00, 125.00, 300.00, 150.00, 125.00, 85.00, 50.00, 285.00, 275.00, 295.00, 280.00 }, { 125.25, 100.00, 100.00, 150.00, 250.00, 300.00, 25.00, 75.00, 300.00, 200.00, 325.00, 300.00 } }
    LOCAL cLegenda := "Entradas*Saidas*Mais Um"
    LOCAL cLabels := "Janeiro*Fevereiro*Março*Abril*Maio*Junho*Julho*Agosto*Setembro*Outubro*Novembro*Dezembro"
    LOCAL cTitulo := "Grafico de Teste Grafico"
    PRIVATE hDll := DllLoad("rmchart.dll")

        DEFINE DIALOG oDlgGra1 FROM 0,0 TO 400,770 PIXEL FONT oClassVar:oFntB COLOR oClassVar:nCorDlgT,oClassVar:nCorDlgJ
            oDlgGra1:lHelpIcon := .F.

            oChart := TActiveX():New( oDlgGra1, "RMChart.RMChartX", 0, 0, 0, 0 )

       ACTIVATE DIALOG oDlgGra1 CENTER ON INIT GeraRmc( oDlgGra1, oChart, aDados, cTitulo, cLabels, cLegenda )

        DllUnload( hDLL )

    RETURN NIL

    FUNCTION GeraRmc( oDlgGra, oChart, aDados, cTitulo, cLabels, cLegenda )
    LOCAL nRetVal := nMax := 0
    LOCAL cImagem := "" //"C:\SIG32new\Bitmaps\Paper.jpg"
    LOCAL cUnidade := "R$ "
    LOCAL cTextoVert := ""
    LOCAL aDadosGraf:={}
    LOCAL oData1 IS DataStructD12
    LOCAL oData2 IS DataStructD12
    LOCAL oData3 IS DataStructD12

    FOR cTrGra1:=1 TO LEN( aDados )

        nMax := MAX( nMax, Amax( aDados[cTrGra1] ) )

        FOR cTrGra2:=1 TO LEN( aDados[cTrGra1] )

            IF cTrGra1 == 1
                oData1:nDouble[cTrGra2] := aDados[cTrGra1,cTrGra2]
            ELSEIF cTrGra1 == 2
                oData2:nDouble[cTrGra2] := aDados[cTrGra1,cTrGra2]
            ELSEIF cTrGra1 == 3
                oData3:nDouble[cTrGra2] := aDados[cTrGra1,cTrGra2]
            ENDIF

        NEXT

        IF cTrGra1 == 1
            AADD( aDadosGraf, oData1[1] )
        ELSEIF cTrGra1 == 2
            AADD( aDadosGraf, oData2[1] )
        ELSEIF cTrGra1 == 3
            AADD( aDadosGraf, oData3[1] )
        ENDIF

    NEXT

    nMax := ROUND( ( INT( nMax/10 ) * 10 ) + 10 , 2 )

    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_CREATECHART", oDlgGra:hWnd, 1001, 0, 0, 770, 400, ColorAzure, RMC_CTRLSTYLE3DLIGHT, .F., cImagem, "", 0, 0 )
    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_ADDREGION", 1001, 0, 0, 760, 400, "Sig SoftWare", .F. )
    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_ADDCAPTION", 1001, 1, cTitulo, ColorTransparent, ColorRed, 9, .T. )
    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_ADDGRID", 1001, 1, ColorLightBlue, .F., 20, 20, 685, 330, RMC_BICOLOR_LABELAXIS )
    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_ADDLABELAXIS", 1001, 1, cLabels, 1, LEN( aDados[1] ), RMC_LABELAXISBOTTOM, 8, ColorBlack, RMC_TEXTCENTER, ColorBlack, RMC_LINESTYLENONE, "" )
    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_ADDDATAAXIS", 1001, 1, RMC_DATAAXISRIGHT, 0.0, nMax, LEN( aDados[1] ), 8, ColorBlack, ColorBlack, RMC_LINESTYLESOLID, 0, cUnidade, cTextoVert, "", RMC_TEXTCENTER )

    FOR x:=1 TO LEN(aDadosGraf)
        nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_ADDBARSERIES", 1001, 1, aDadosGraf[x], 12, RMC_BARGROUP, RMC_BAR_FLAT_GRADIENT2, .F., 0, .F., 1, RMC_VLABEL_NONE, x, RMC_HATCHBRUSH_ONPRINTING )
    NEXT

    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_ADDLEGEND", 1001, 1, cLegenda, RMC_LEGEND_BOTTOM, ColorTransparent, RMC_LEGENDNORECT, ColorRed, 8, .T. )
    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_DRAW", 1001 )

    RETURN NIL
    ///////////////////////////////////////////////////////////////////////////////////////
    //                                                                                   //
    ///////////////////////////////////////////////////////////////////////////////////////
    FUNCTION ImprimeGrafico( oDlgGra )

    nRetVal := DllCall(hDll,DLL_OSAPI,"RMC_DRAW2PRINTER", 1001, oDlgGra:hWnd, 0, 0, 0, 0, RMC_EMF )
    ?nRetVal

    RETURN NIL

    ////////////////////////////DADOS DA FUNCAO////////////////////////////////////////////
    // NOME       : aMax                                                                 //
    // SINTESE    : Retornar o maior valor de um vetor                                   //
    // PARAMETROS : <1> aVetor                                                           //
    //              <2> nElemento (para vetores multimensionais)                         //
    // RETORNO    : xMaior elemento do vetor                                             //
    ///////////////////////////////////////////////////////////////////////////////////////
    function aMax( aVetor, nElem )

    local aNovoVet
    local xMaxElem

    DEFAULT nElem:=0

    aNovoVet:=aclone( aVetor )
    if nElem=0
            aNovoVet:=asort( aNovoVet )
            xMaxElem:=aNovoVet[len(aNovoVet)]
    else
            aNovoVet:=aasort( aNovoVet, nElem )
            xMaxElem:=aNovoVet[nElem, len(aNovoVet)]
    endif

    return xMaxElem

    ////////////////////////////DADOS DA FUNCAO////////////////////////////////////////////
    // NOME       : AaSort                                                               //
    // FINALIDADE : ordenar os elementos de um vetor muldimensional                      //
    // PARAMETROS : <1> aVetor a ser ordenado                                            //
    //              [2] nElemento do vetor a ser ordenado (default=1)                    //
    //              [3] cOrdem Crescente ou Decrescente (default='C')                    //
    // RETORNO    : aVetor ordenado                                                      //
    ///////////////////////////////////////////////////////////////////////////////////////
    function AaSort( aVetor, nElem, cOrdem )

    local aRetorno, x, y

    DEFAULT nElem:=1
    DEFAULT cOrdem:='C'
    if cOrdem='C'
            aRetorno:= asort( aVetor,,, { |x, y| x[nElem] < y[nElem] } )
    else
            aRetorno:= asort( aVetor,,, { |x, y| x[nElem] > y[nElem] } )
    endif

    return aRetorno
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

RMChart

Mensagem por JoséQuintas »

Isso é parecido com o que acontece ao mexer com certas APIs do Windows.
No final a gente fica dependendo de alguém que conheça linguagem C pra uma bostinha de conversão.
Provavelmente alguns travamentos do RMChart seja por algum detalhe desse tipo.

Também andei tentando ver a outra questão do activex.
Sem solução aparente.
Abri o aplicativo e movi a janela uma vez:
18:38:20 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:20 wvgPartHandler WVGCRT 2 WM_DESTROY
18:38:20 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:20 wvgPartHandler WVGCRT 13 WM_GETTEXT
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 13 WM_GETTEXT
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:23 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:24 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:24 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:24 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:24 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:24 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:24 wvgPartHandler WVGCRT 6 WM_ACTIVATE
18:38:25 wvgPartHandler WVGCRT 7 WM_SETFOCUS
18:38:25 wvgPartHandler WVGCRT 3 WM_MOVE
18:38:25 wvgPartHandler WVGCRT 3 WM_MOVE
Como dá pra ver aí, nem sinal do activex ter recebido a mensagem.
Já pensou pegar um evento desses e repassar aos controles?
O aplicativo vai ficar só atualizando tela e nada mais.

Segundo o MSDN, o WM_MOVE é somente quando a tela TERMINA de ser movida.
Também tem um comentário lá de que WM_MOVE é recebido antes do WM_RESIZE, quando termina de redimensionar a janela.
Mas essa lista é muito grande pra só uma "movida".

Só pra aumentar a vontade:
Que tal abrir coisas num activex (PDF, JPG, pasta de arquivo, endereço de internet, etc)?
Parece que a janela de activex tem mil e uma utilidades.
Vi isso aqui: https://support.microsoft.com/pt-br/kb/192560

Código: Selecionar todos

PROCEDURE Main
   LOCAL xParam := NIL, oCom, nKey := 0
   SetMode(40,100)
   CLS
   oCom := WvgActiveXControl():New( wvgSetAppWindow(), , { 0, 0 }, { 800, 600 }, , .T. )
   oCom:CLSID := "http://github.com"
   oCom:create()
   Inkey(0)
   RETURN
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

RMChart

Mensagem por JoséQuintas »

fivewin não tem muito a ver com Harbour.
Tem bastante coisa que geralmente seria só na linguagem C, que ele faz normalmente.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

Quintas, eu consegui executar

No inicio do prg
#include "cstruct.ch"
typedef struct { CTYPE_DOUBLE nDouble[12] } DataStructD12

Na function
oData1 IS DataStructD12
oData2 IS DataStructD12
oData3 IS DataStructD12

Código: Selecionar todos

   FOR cTrGra1:=1 TO LEN( aDados )
       nMax := MAX( nMax, Amax( aDados[cTrGra1] ) )

       FOR cTrGra2:=1 TO LEN( aDados[cTrGra1] )

           IF cTrGra1 == 1
              oData1:nDouble[cTrGra2] := aDados[cTrGra1, cTrGra2]
           ELSEIF cTrGra1 == 2
              oData2:nDouble[cTrGra2] := aDados[cTrGra1, cTrGra2]
           ELSEIF cTrGra1 == 3
              oData3:nDouble[cTrGra2] := aDados[cTrGra1, cTrGra2]
           ENDIF
      NEXT
      IF cTrGra1 == 1
         AADD( aDadosGraf, oData1[1] )
      ELSEIF cTrGra1 == 2
         AADD( aDadosGraf, oData2[1] )
      ELSEIF cTrGra1 == 3
         AADD( aDadosGraf, oData3[1] )
      ENDIF
   NEXT
Só que dá erro em:

Código: Selecionar todos

   FOR x:=1 TO LEN(aDadosGraf)
       oChart:AddBarSeries(ID_CHART, 1, @aDadosGraf[x], 12, RMC_BARGROUP, RMC_BAR_FLAT_GRADIENT2, .F., 0, .F., 1, RMC_VLABEL_NONE, x, RMC_HATCHBRUSH_ONPRINTING )
NEXT
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

RMChart

Mensagem por asimoes »

Vou parar um pouco com rmchart, to queimando muitos neurônios rs.
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

RMChart

Mensagem por JoséQuintas »

Nessas horas é que lembro do Visual Basic 6.
Olha só, como se fazia há quase 20 (VINTE) anos atrás.
Detalhe: não sei se há 20 anos atrás existia esse RMChart, mas é com ele.

Clique da direita, adicionar componentes
vb6-1.png
Selecionar RMChart
vb6-2.png
Colocar no formulário
vb6-3.png
Ao digitar rmchart. já abrem as opções
vb6-4.png
vb6-4.png (6.37 KiB) Exibido 9722 vezes
E ao abrir a opção, vém um "mini-manual"
vb6-5.png
vb6-5.png (3.4 KiB) Exibido 9722 vezes
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Responder