Menu with Gradient Color

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Menu with Gradient Color

Post 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 2674 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 138 times
---

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

Jimmy
have fun
Jimmy
chrisjx2002
Posts: 192
Joined: Wed Jan 06, 2010 5:39 pm

Re: Menu with Gradient Color

Post by chrisjx2002 »

Thanks for the share. Very interesting!
Post Reply