Página 1 de 1

Problemas com ButtonEx na Hwgui 2.19 (anteriores Ok)

Enviado: 24 Jul 2016 22:32
por Cezar
Boa noite,

Preciso alterar um sistema (funcionando ) , cheio de Buttonex, não tenho mais a hwgui da época, com o Hgwui 2.19 aparentemente compilaria, mas o botão Buttonex e sua Hwg_Extctrl.ch não deixa compilar.

Fiz um prg de teste :
1. usando os botões ButtonEx e Hwg_Extcrtl.ch; não compila, dá erros !
2. Substitui os botões ButtonEx e Hwg_Extctrl.ch, trocando pelo botão Button comum; compila e funciona !
3. Deixandor só com os botões Buttom comum e #include "Hwg_Extctrl.ch" ativo; não compila, dá erros !

Parece uma inconsistência na Hwg_Extctrl.ch ==> HSTATICEX do comando SAY

Agradeço a orientação de voces.
v_cez@yahoo.com.br

Programa de teste:
#include "hwgui.ch"
#include "hwg_extctrl.ch" //Se deixar ativo dá erro, se bloquear funciona.
//#include "hwgcompat.ch"

Function Main
Local oMainWindow

INIT WINDOW oMainWindow MAIN TITLE "Example" ;
AT 200,0 SIZE 800,600

MENU OF oMainWindow
MENUITEM "&Exit" ACTION hwg_EndWindow()
MENUITEM "&Buttonex" ACTION DlgGet()
ENDMENU

ACTIVATE WINDOW oMainWindow
Return Nil

Function DlgGet
Local oModDlg
local oFont := HFont():Add( "MS Sans Serif",0,-13 )
Local oGet
Local e1 := "Dialog from prg"

//local aBtn1, aBtn2
//LOCAL oBmp_1 := hBitmap():AddFile("Find_b.bmp")
//LOCAL oBmp_2 := hBitmap():AddFile("Sair.bmp")


INIT DIALOG oModDlg TITLE "Get a value" ;
AT 210,10 SIZE 300,300 ;
FONT oFont NOEXIT

@ 20,10 SAY "Input something:" SIZE 260, 22
@ 20,35 GET oGet VAR e1 ;
STYLE WS_DLGFRAME ;
SIZE 260, 26 COLOR hwg_ColorC2N("FF0000")

@ 20,240 BUTTON "Ok" ID IDOK SIZE 100, 32
@ 180,240 BUTTON "Cancel" ID IDCANCEL SIZE 100, 32

/*
@ 200,240 BUTTONEX aBtn1 CAPTION "Pesquisar" ;
OF oModDlg ;
SIZE 28,26 ;
STYLE WS_TABSTOP + WS_DLGFRAME ;
ON CLICK {|| Psq_Cli() }*/

// BITMAP oBmp_1:Handle ;
// TOOLTIP "Pesquisar Cliente" ;

/* @ 180,240 BUTTONEX aBtn2 CAPTION "Sair" ;
OF oModDlg ;
SIZE 28,26 ;
STYLE WS_TABSTOP + WS_DLGFRAME ;
ON CLICK {|| hwg_EndDialog() }*/

// BITMAP oBmp_2:Handle ;
// TOOLTIP "Sair" ;

ACTIVATE DIALOG oModDlg
oFont:Release()

Return Nil


//static function Psq_Cli()
// return .T.
Erros do programa teste:

Código: Selecionar todos

C:\samples>rem set path=c:\hb30\bin;c:\hb30\comp\mingw\bin

C:\samples>rem set path=c:\hb30\bin;c:\borland\bcc55\bin

C:\samples>hbmk2 buttonex.prg hwgui_xp.rc xhb.hbc -i..\hwgui\include -L..\hwgui\
lib -lhwgui -lprocmisc -lhbxml -lhwgdebug -gui
Harbour 3.4.0dev () (2015-12-14 15:23)
Copyright (c) 1999-2016, https://github.com/vszakats/harbour-core/
Compiling 'buttonex.prg'...
Lines 3736, Functions/Procedures 2
Generating C source output to 'C:\Users\Cezar\AppData\Local\Temp\hbmk_gxy37t.dir
\buttonex.c'... Done.
C:/Users/Cezar/AppData/Local/Temp/hbmk_gxy37t.dir/buttonex.o:buttonex.c:(.data+0
xe8): undefined reference to `_HB_FUN_HSTATICEX'
collect2.exe: error: ld returned 1 exit status
hbmk2: Erro: Executando linkeditor. 1
gcc.exe C:/Users/Cezar/AppData/Local/Temp/hbmk_gxy37t.dir/buttonex.o C:/Users/Ce
zar/AppData/Local/Temp/hbmk_gxy37t.dir/hbmk_y9c6qg.o  C:/Users/Cezar/AppData/Loc
al/Temp/hbmk_gxy37t.dir/hwgui_xp.reso  -m32 -Wl,--no-demangle -Wl,--nxcompat -Wl
,--dynamicbase -mwindows -Wl,--start-group -lxhb -lhbct -lhbtip -lhbfship -lhbxp
p -lhbwin -lpng -lhwgui -lprocmisc -lhbxml -lhwgdebug -lhbextern -lhbdebug -lhbv
m -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtstd -lgtpca -lgtwin -lgtwvt -lgtgui -lh
brdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -
lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgd
i32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -l
uuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbp
cre -lhbzlib   -Wl,--end-group -obuttonex.exe  -LC:/HB34/lib/win/mingw -L../hwgu
i/lib

hbmk2: Error: Referenced, missing, but unrecognized Harbour function(s):
       HSTATICEX()

C:\samples>

Problemas com ButtonEx na Hwgui 2.19 (anteriores Ok)

Enviado: 25 Jul 2016 08:05
por Toledo
Amigo, tente incluir a LIB hwg_extctrl na compilação ( -lhwg_extctrl ).

Abraços,

Problemas com ButtonEx na Hwgui 2.19 (anteriores Ok)

Enviado: 25 Jul 2016 12:52
por Cezar
Boa tarde Toledo!

Entendi o conceito, funcionou!


grato
v_ceza@terra.com.br