rmchart na hwgui

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

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 na hwgui

Mensagem por JoséQuintas »

Para o RMChart é usado o hWnd.
Na hwgui não temos acesso à tabpage, ela não tem handle.
Alguma sugestão ?
Um panel em cada tabpage ?
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 na hwgui

Mensagem por JoséQuintas »

RMChart só precisa do hWnd.

Em GTWVG tudo bem, uso janelas, só usar o handle das janelas

Código: Selecionar todos

      CASE nOpc == nTemp++ ; Graphic10( oCrt1:hWnd )
Em fivewin ficou assim:

Código: Selecionar todos

   DEFINE DIALOG oDlg TITLE "Pruebas" SIZE 1024, 748 PIXEL

   @ 0,0 FOLDEREX oFld PROMPT "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" SIZE 900, 700 OF oDlg PIXEL

   ACTIVATE DIALOG oDlg CENTER ON INIT ( (Self), DrawAll( oFld ) )

   RETURN NIL

FUNCTION DrawAll( oFld )

   Graphic1(  oFld:aDialogs[1]:hWnd )
   Graphic2(  oFld:aDialogs[2]:hWnd )
   Graphic3(  oFld:aDialogs[3]:hWnd )
   Graphic4(  oFld:aDialogs[4]:hWnd )
   Graphic5(  oFld:aDialogs[5]:hWnd )
   Graphic6(  oFld:aDialogs[6]:hWnd )
   Graphic7(  oFld:aDialogs[7]:hWnd )
   Graphic8(  oFld:aDialogs[8]:hWnd )
   Graphic9(  oFld:aDialogs[9]:hWnd )
   Graphic10( oFld:aDialogs[10]:hWnd )

   RETURN Nil
Agora em HWGUI, sei lá, page não tem handle, pelo menos não dá pra saber
Alteração parcial, falta o handle

Código: Selecionar todos

   INIT DIALOG oDlg ;
      TITLE "hwgui" SIZE 1024, 748

   @ 5, 5 TAB oFld ;
      ITEMS {} ;
      OF oDlg ;
      SIZE 900, 700 ;
      STYLE WS_CHILD + WS_VISIBLE

   ACTIVATE DIALOG oDlg CENTER ON ACTIVATE { || DrawAll( oFld ) }

   RETURN NIL

FUNCTION DrawAll( oFld )

   BEGIN PAGE "A" OF oFld
      Graphic1(  oFld:aDialogs[1]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic2(  oFld:aDialogs[2]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic3(  oFld:aDialogs[3]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic4(  oFld:aDialogs[4]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic5(  oFld:aDialogs[5]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic6(  oFld:aDialogs[6]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic7(  oFld:aDialogs[7]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic8(  oFld:aDialogs[8]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic9(  oFld:aDialogs[9]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      Graphic10( oFld:aDialogs[10]:hWnd )
   END PAGE

   RETURN Nil
Só resta criar um panel, se tiver handle, ou usar várias dialogs igual GTWVG.
O handle vai ser a localização exata da janela usada pelo controle, handle da tab não é handle da page.
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 na hwgui

Mensagem por JoséQuintas »

Deu erro de IF/ENDIF kkkkkkkk

Código: Selecionar todos

FUNCTION DrawAll( oFld )

   LOCAL oPanel

   oPanel := Array(10)

   BEGIN PAGE "A" OF oFld
      @ 10, 10 PANEL oPanel[1] OF oFld SIZE 900, 600
      Graphic1(  oPanel[1]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[2] OF oFld SIZE 900, 600
      Graphic2(  oPanel[2]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[3] OF oFld SIZE 900, 600
      Graphic3(  oPanel[3]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[4] OF oFld SIZE 900, 600
      Graphic4(  oPanel[4]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[5] OF oFld SIZE 900, 600
      Graphic5(  oPanel[5]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[6] OF oFld SIZE 900, 600
      Graphic6(  oPanel[6]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[7] OF oFld SIZE 900, 600
      Graphic7(  oPanel[7]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[8] OF oFld SIZE 900, 600
      Graphic8(  oPanel[8]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[9] OF oFld SIZE 900, 600
      Graphic9(  oPanel[9]:hWnd )
   END PAGE
   BEGIN PAGE "B" OF oFld
      @ 10, 10 PANEL oPanel[10] OF oFld SIZE 900, 600
      Graphic10( oPanel[10]:hWnd )
   END PAGE

   RETURN Nil
Harbour 3.2.0dev (r2405310955)
Copyright (c) 1999-2021, https://harbour.github.io/

testhwgui.prg:33: error E0010 ENDIF does not match IF
testhwgui.prg:37: error E0010 ENDIF does not match IF
testhwgui.prg:41: error E0010 ENDIF does not match IF
testhwgui.prg:45: error E0010 ENDIF does not match IF
testhwgui.prg:49: error E0010 ENDIF does not match IF
testhwgui.prg:53: error E0010 ENDIF does not match IF
testhwgui.prg:57: error E0010 ENDIF does not match IF
testhwgui.prg:61: error E0010 ENDIF does not match IF
testhwgui.prg:65: error E0010 ENDIF does not match IF
testhwgui.prg:69: error E0010 ENDIF does not match IF
10 errors
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 na hwgui

Mensagem por JoséQuintas »

telahwgui.png
Pronto, funcional em hwgui também, movimentando entre tabpages.
Usando um PANEL em cada tabpage.
Sou péssimo de visual, e ainda não gosto de GUI, posições e tamanhos de qualquer jeito.

Código: Selecionar todos

FUNCTION DrawAll( oFld )

   LOCAL oPanel

   oPanel := Array(10)

   BEGIN PAGE "A" OF oFld
      @ 40, 40 PANEL oPanel[1] OF oFld SIZE 900, 600
      Graphic1(  oPanel[1]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "B" OF oFld
      @ 40, 40 PANEL oPanel[2] OF oFld SIZE 900, 600
      Graphic2(  oPanel[2]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "C" OF oFld
      @ 40, 40 PANEL oPanel[3] OF oFld SIZE 900, 600
      Graphic3(  oPanel[3]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "D" OF oFld
      @ 40, 40 PANEL oPanel[4] OF oFld SIZE 900, 600
      Graphic4(  oPanel[4]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "E" OF oFld
      @ 40, 40 PANEL oPanel[5] OF oFld SIZE 900, 600
      Graphic5(  oPanel[5]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "F" OF oFld
      @ 40, 40 PANEL oPanel[6] OF oFld SIZE 900, 600
      Graphic6(  oPanel[6]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "G" OF oFld
      @ 40, 40 PANEL oPanel[7] OF oFld SIZE 900, 600
      Graphic7(  oPanel[7]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "H" OF oFld
      @ 40, 40 PANEL oPanel[8] OF oFld SIZE 900, 600
      Graphic8(  oPanel[8]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "I" OF oFld
      @ 40, 40 PANEL oPanel[9] OF oFld SIZE 900, 600
      Graphic9(  oPanel[9]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "J" OF oFld
      @ 40, 40 PANEL oPanel[10] OF oFld SIZE 900, 600
      Graphic10( oPanel[10]:Handle )
   END PAGE OF oFld

   RETURN Nil
Se alguém tiver dica pra melhorar isso, seria bom.
Foi o jeito que encontrei de fazer.
São 10 gráficos diferentes, um em cada tabpage.
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/
SOSSOFT
Usuário Nível 3
Usuário Nível 3
Mensagens: 118
Registrado em: 23 Out 2024 10:04

rmchart na hwgui

Mensagem por SOSSOFT »

Fica um visual muito bom
Avatar do usuário
alaminojunior
Colaborador
Colaborador
Mensagens: 1717
Registrado em: 16 Dez 2005 21:26
Localização: Ubatuba - SP

rmchart na hwgui

Mensagem por alaminojunior »

JoséQuintas escreveu:
telahwgui.png
Pronto, funcional em hwgui também, movimentando entre tabpages.
Usando um PANEL em cada tabpage.
Sou péssimo de visual, e ainda não gosto de GUI, posições e tamanhos de qualquer jeito.

Código: Selecionar todos

FUNCTION DrawAll( oFld )

   LOCAL oPanel

   oPanel := Array(10)

   BEGIN PAGE "A" OF oFld
      @ 40, 40 PANEL oPanel[1] OF oFld SIZE 900, 600
      Graphic1(  oPanel[1]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "B" OF oFld
      @ 40, 40 PANEL oPanel[2] OF oFld SIZE 900, 600
      Graphic2(  oPanel[2]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "C" OF oFld
      @ 40, 40 PANEL oPanel[3] OF oFld SIZE 900, 600
      Graphic3(  oPanel[3]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "D" OF oFld
      @ 40, 40 PANEL oPanel[4] OF oFld SIZE 900, 600
      Graphic4(  oPanel[4]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "E" OF oFld
      @ 40, 40 PANEL oPanel[5] OF oFld SIZE 900, 600
      Graphic5(  oPanel[5]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "F" OF oFld
      @ 40, 40 PANEL oPanel[6] OF oFld SIZE 900, 600
      Graphic6(  oPanel[6]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "G" OF oFld
      @ 40, 40 PANEL oPanel[7] OF oFld SIZE 900, 600
      Graphic7(  oPanel[7]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "H" OF oFld
      @ 40, 40 PANEL oPanel[8] OF oFld SIZE 900, 600
      Graphic8(  oPanel[8]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "I" OF oFld
      @ 40, 40 PANEL oPanel[9] OF oFld SIZE 900, 600
      Graphic9(  oPanel[9]:Handle )
   END PAGE OF oFld
   BEGIN PAGE "J" OF oFld
      @ 40, 40 PANEL oPanel[10] OF oFld SIZE 900, 600
      Graphic10( oPanel[10]:Handle )
   END PAGE OF oFld

   RETURN Nil
Se alguém tiver dica pra melhorar isso, seria bom.
Foi o jeito que encontrei de fazer.
São 10 gráficos diferentes, um em cada tabpage.
Não é exatamente para a mesma coisa, mas numa rotina aqui com TAB´s não consigo acesso a uma determinada TAB, a não ser que esteja nela.
E por isso uso:

Código: Selecionar todos

oPage1:SetTab(1) // 2,3,4,5,6 ...
Quem sabe ...
Compilador xHarbour 1.2.3 + Embarcadero C++ 7.30
MySQL c/ SQLRDD
HwGui + GTWVG
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

rmchart na hwgui

Mensagem por JoséQuintas »

Não, isso não dá.
RMChart usa o handle da janela, seria uma referência direta para a janela usada pelo controle.
Nem faz diferença se o foco estiver em outro lugar.
Teria que ser o handle da página mesmo.
No caso do panel, ele fica na page, e o panel tem um handle direto.

O que vi pelos fontes é que "parece", pelo menos pelo nome, que dá pra indicar uma dialog pra ser a page.
Se isso for realmente possível, aí a dialog teria o handle.
Não testei, pode ser que apenas o nome seja oDlg, e não o conteúdo ser dialog.
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