Page 1 of 1

Menu with Gradient Color

Posted: Fri Sep 03, 2021 5:44 am
by AUGE_OHR
hi,

this Demo show how to set Background Color of App Menu with Gradient Color
HB_FUNC ( SETMENUBKGRADIENT )
Gradient_Menu.jpg
Gradient_Menu.jpg (15.42 KiB) Viewed 2868 times
is based on

Code: Select all

HB_FUNC ( SETMENUBKCOLOR )
in c:\hmg.3.4.4\SOURCE\c_menu.C where i have add "LinearGradientBrush" from MiniGUI h_gradient.prg

---

Syntax : SetMenuBkGradient(hWnd, lSubMenu, RGB1, RGB2, nDirection, Wide, Height)

Code: Select all

hWnd		-> Handle of Form e.n. GetFormhandle("Win_1")
lSubMenu	-> include SibMenu .T. / .F.
RGB1		-> 1st Colorm[r.g.b}
RGB2		-> 2nd Colorm[r.g.b}	
nDirection	-> Horizontal = 1 / Vertical = 2
Wide 		-> ... about Wide
Height		-> ... about Height
i do not know how to get Size of 1 x MenuItem so you have to try Wide, Height
GRADMENU.ZIP
Source, *.HBP
(3.13 KiB) Downloaded 158 times
---

todo : it does not work with CONTEXT MENU ... i try to figure out how that work

Jimmy

Re: Menu with Gradient Color

Posted: Fri Sep 03, 2021 8:17 am
by chrisjx2002
Thanks for the share. Very interesting!