FUNCTION OnMouseHover( hWnd, cFormName )
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: FUNCTION OnMouseHover( hWnd, cFormName )
hi,
the Code "just" disable visual Style of Control with GetControlHandle(), not hole App or OS
so when have 10 Button you have to use it 10 x times while default all Controls, using Manifest, have visual Style.
---
under Xbase++ we have Property "UseVisualStyle" for each Control.
when set to .F. it just do Code which i have shown
the Code "just" disable visual Style of Control with GetControlHandle(), not hole App or OS
so when have 10 Button you have to use it 10 x times while default all Controls, using Manifest, have visual Style.
---
under Xbase++ we have Property "UseVisualStyle" for each Control.
when set to .F. it just do Code which i have shown
have fun
Jimmy
Jimmy
Re: FUNCTION OnMouseHover( hWnd, cFormName )
Tienes algún ejemplo que nos pudieras compartir para poderlo probar ?
*---------------------------------------------------------------------------------------
Do you have an example that you could share with us to try it out?
*---------------------------------------------------------------------------------------
Do you have an example that you could share with us to try it out?
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: FUNCTION OnMouseHover( hWnd, cFormName )
I've tried, not working...AUGE_OHR wrote: ↑Tue Mar 31, 2020 4:41 am hithis is true when have visual Style on (default)
you can disable Visual Style withnow you can use Color for ButtonCode: Select all
hwnd:= GetControlHandle( "Button_1", cForm) SetWindowTheme( hwnd, 0, 0 )
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: FUNCTION OnMouseHover( hWnd, cFormName )
hi,
it "just" disable visual Style so how do you "Paint" Color
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: FUNCTION OnMouseHover( hWnd, cFormName )
hi,
it work that Way with Label as it have BACKCOLOR but using "CREATE EVENT" seem me "limited"
we have
but it is not the same like
those Windows Message are not used in h_windows.prg of HMG LIB.
when next Release of HMG include the Event and we must not work with a Workaround.
next Step would be to include WM_MEASUREITEM and WM_DRAWITEM with MEASUREITEM- and DRAWITEM-Structure and a "DrawItem" Codeblock Slot so User can "paint" what he want.
this is a Xbase++ Sample ( have no HMG Sample yet) p.s. also WS_EX_ACCEPTFILES -> "DropZone" for each Control would be fine so we need no DragAcceptFiles()
it work that Way with Label as it have BACKCOLOR but using "CREATE EVENT" seem me "limited"
we have
Code: Select all
ON LOSTFOCUS -> WM_KILLFOCUS
ON GOTFOCUS -> WM_SETFOCUS
Code: Select all
WM_MOUSELEAVE
WM_MOUSEMOVE
WM_MOUSEHOVER
when next Release of HMG include the Event and we must not work with a Workaround.
next Step would be to include WM_MEASUREITEM and WM_DRAWITEM with MEASUREITEM- and DRAWITEM-Structure and a "DrawItem" Codeblock Slot so User can "paint" what he want.
this is a Xbase++ Sample ( have no HMG Sample yet) p.s. also WS_EX_ACCEPTFILES -> "DropZone" for each Control would be fine so we need no DragAcceptFiles()
have fun
Jimmy
Jimmy
Re: FUNCTION OnMouseHover( hWnd, cFormName )
Hi,
Please be so kind to review the following Minigui sample also: The source code is attached here (along with the compiled application)
HTH
- Attachments
-
- ButtonHover.zip
- (744.68 KiB) Downloaded 153 times
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: FUNCTION OnMouseHover( hWnd, cFormName )
hi,
YES, MiniGUI use much more Events than HMG
i´m still a harbour Newbie and have made my 1st Step with HMG.
now i can "walk" with HMG but to "run" with MiniGUI i still need time.
YES, MiniGUI use much more Events than HMG
Code: Select all
ONMOUSEHOVER
ONMOUSELEAVE
now i can "walk" with HMG but to "run" with MiniGUI i still need time.
have fun
Jimmy
Jimmy
Re: FUNCTION OnMouseHover( hWnd, cFormName )
I'm trying for one button in this way:
SetWindowTheme( OknoPartieProd.P_RozliczeniePartii.Handle, 0, 0 )
SetProperty("OknoPartieProd","P_RozliczeniePartii","FontColor", {255,0,0}) // colorize to red
- AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: FUNCTION OnMouseHover( hWnd, cFormName )
hi,
i don´t "see" in Help that Button have any Color Option so i ask for it.
---
HMG Syntax only work if API is behind.
under Xbase++ i use DLLCALL under harbour HB_FUNC()
this Sample i use to "paint" Darkmode (some Control have no Color Option)
we talk about Button
i don´t "see" in Help that Button have any Color Option so i ask for it.
---
HMG Syntax only work if API is behind.
under Xbase++ i use DLLCALL under harbour HB_FUNC()
this Sample i use to "paint" Darkmode (some Control have no Color Option)
Code: Select all
SetWindowTheme( OknoPartieProd.P_RozliczeniePartii.Handle, 0, 0 )
CONTROLBACKGROUND( OknoPartieProd.P_RozliczeniePartii.Handle, {255,0,0} )
HB_FUNC(CONTROLBACKGROUND)
{
HWND hWnd;
HDC hDC;
RECT rect;
HBRUSH hbrush;
PAINTSTRUCT ps;
hWnd = (HWND) hb_parnl (1);
GetClientRect(hWnd, &rect);
hbrush = CreateSolidBrush( (COLORREF) RGB(hb_parvni(2, 1),
hb_parvni(2, 2),
hb_parvni(2, 3)) );
hDC = BeginPaint (hWnd, &ps);
FillRect(hDC,&rect,(HBRUSH) hbrush );
ReleaseDC(hWnd, hDC);
}
have fun
Jimmy
Jimmy
Re: FUNCTION OnMouseHover( hWnd, cFormName )
helo this is perfect!! but how to make it work in hmg without using buttonex? would have how to create a buttonex function in hmg to use