Atualização Hwgui 26-08-2026

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 8280
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 7 vezes
Curtiram: 2 vezes

Atualização Hwgui 26-08-2026

Mensagem por Itamar M. Lins Jr. »

Olá!
Lib de controles estendidos OK!
É a parte do Luis Basso(?) São temas do windows, mãozinha no cabeçalho do browse e outros "penduricalhos" interessantes.
Colocar no inicio do PRG:

Código: Selecionar todos

#include 'hwg_extctrl.ch'
#include 'hwgui.ch'
Function XYZ
...
//E no browse e colunas
@ 5,80 BrowseEx oBrw DataBase of oDlg Size 470,320
Add columnEx FieldBlock("fabcod") to oBrw Header 'Código' Type 'C' Length 08 ;
   Justify Line DT_LEFT  Justify Head DT_LEFT
Add columnEx FieldBlock("fabricante") to oBrw Header 'Fabricante' type 'C' length 60 
...
Return NIL
Não esquecer de adicionar a lib!
No caso, no arquivo hbmk.hbm

Código: Selecionar todos

{win}-lhwg_extctrl
São controles à parte! BROWSE, BOTÃO, COMBOBOX, GRIDE, RECTE.

Código: Selecionar todos

2026-08-26 10:30 UTC-0300 Itamar Lins  <itamarlins at gmail.com>
  ### Fixed files into dir contrib\ext_controls
  - **theme.c**: replaced 32-bit `hb_parnl`/`hb_retnl` with `hb_parnint`/`hb_retnint` in
    `HWG_ONNOTIFYCUSTOMDRAW` and `HWG_BUTTONEXONSETSTYLE` to avoid truncating
    `LPARAM`, `WPARAM` and `LRESULT` values on 64-bit builds.
  - **theme.c**: changed `HWG_GETTHEMESYSCOLOR` from `HB_RETHANDLE` to `hb_retnint`
    to return `COLORREF` as integer instead of an invalid handle pointer.
  - **theme.c**: removed double release of the returned array item in
    `HWG_PREPAREIMAGERECT` (eliminated `hb_itemRelease` after `hb_itemReturn`),
    preventing potential memory corruption.
  - **theme.c**: initialized all local `RECT` structures with `{0}` in functions
    that fill them from optional array parameters (`HWG_DRAWTHEMEBACKGROUND`,
    `HWG_DRAWTHEICON`, `HWG_PREPAREIMAGERECT`, `HWG_DRAWTHEMETEXT`,
    `HWG_DRAWTHEMEPARENTBACKGROUND`) to avoid using uninitialized stack memory.
  - **theme.c**: added `FPROC` macro using `HB_PTRUINT` intermediate cast to safely
    convert function pointers to `FARPROC`, eliminating `-Wcast-function-type-mismatch`
    warnings in Clang/GCC while preserving 64-bit pointer integrity.
  - **draw_icon**: fixed typo in comment ("singel" -> "single").
Saudações,
Itamar M. Lins Jr.
Responder