Fabrice asked me for a sample program in case he could VOXPort the HoverButtons Llib.
That sounded simple enough but guess what...I can't get any HoverButton visible in a newly created Standard MDI program. Tried it with everything unchecked and also once with XP Themes support but whatever I tried - no HoverButton is visible.
I know there was an issue on a dialogwindow but even importing my working Datawindow with multiple HoverButtons, stripping only some specific code, the buttons work (I can click them) but are totally invisible! I've searched all my notes, mails, NG messages and tried all kind of things. Everywhere else in my programs it works....I have no idea what I am missing.
Anyone who knows why?
Dick
HoverButtons not visible
HoverButtons not visible
Dick,
Mostly likely the WM_PAINT message is being intercepted in the Dispatch method and causing the drawing issue or the return value from the dispatch method is not correct.
You may try first to comment out the handling the of WM_PAINT message and see what happens. Does it draw?
Jamal
Mostly likely the WM_PAINT message is being intercepted in the Dispatch method and causing the drawing issue or the return value from the dispatch method is not correct.
You may try first to comment out the handling the of WM_PAINT message and see what happens. Does it draw?
Jamal
HoverButtons not visible
Hello Jamal,
Yes, that finally made me find what I have done to get this working, 18 years ago! Thanks for your suggestion.
I copied my:
METHOD Dispatch(oE) CLASS __FormDialogWindow
This contains somewhere:
IF oE:OwnerDraw() == 1L // 27-10-2003 for HoverButton
RETURN 1L
and then it works....
Dick
Yes, that finally made me find what I have done to get this working, 18 years ago! Thanks for your suggestion.
I copied my:
METHOD Dispatch(oE) CLASS __FormDialogWindow
This contains somewhere:
IF oE:OwnerDraw() == 1L // 27-10-2003 for HoverButton
RETURN 1L
and then it works....
Dick
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
HoverButtons not visible
Hi DIck,
almost two years ago I made some changes to the HoverButton lib, so Franz aka lagraf got it running with X# - at least the parts he´s using.
https://www.xsharp.eu/forum/german/1696 ... -x?start=0
- you no longer need the code from "Class HoverWindow (window).prg". There´s also no need to use a __FormDialogWindow Dispatcher, because in newer versions VO forwards ownerdraw messages to a ODDrawitem() control method, if such a method exists.
- this is how such a ODDrawItem() callback method can be used in the HoverButton class.
- are you aware of that the hoverbutton class doesn´t support Themes ?
regards
Karl-Heinz
almost two years ago I made some changes to the HoverButton lib, so Franz aka lagraf got it running with X# - at least the parts he´s using.
https://www.xsharp.eu/forum/german/1696 ... -x?start=0
- you no longer need the code from "Class HoverWindow (window).prg". There´s also no need to use a __FormDialogWindow Dispatcher, because in newer versions VO forwards ownerdraw messages to a ODDrawitem() control method, if such a method exists.
- this is how such a ODDrawItem() callback method can be used in the HoverButton class.
Code: Select all
METHOD ODDrawItem( oEvent AS Event ) AS VOID // KHR
LOCAL lpDis AS _winDRAWITEMSTRUCT
// METHOD OnDrawItem( lpDis ) CLASS HoverButton <------ replaces this method !
lpDis := PTR( _CAST , oEvent:lParam )
SELF:__Draw ( lpDis)
RETURN
- are you aware of that the hoverbutton class doesn´t support Themes ?
regards
Karl-Heinz
HoverButtons not visible
Hello Karl-Heinz,
Thanks, I'll forward your message to Fabrice who just informed me he had a transported HoverButtons compiling. I know it doesn't support Themes.
I do have a version with METHOD OwnerDraw() CLASS Event and a _DLL FUNCTION PointInRect in the mef you say one could do without. Not sure if removing that and adding your code influences the visibility of the buttons but after trying almost anything yesterday, the (current) version in of course the "newest" VO eventually only worked after adding the __FormDialogWindow Dispatcher.
Dick
Thanks, I'll forward your message to Fabrice who just informed me he had a transported HoverButtons compiling. I know it doesn't support Themes.
I do have a version with METHOD OwnerDraw() CLASS Event and a _DLL FUNCTION PointInRect in the mef you say one could do without. Not sure if removing that and adding your code influences the visibility of the buttons but after trying almost anything yesterday, the (current) version in of course the "newest" VO eventually only worked after adding the __FormDialogWindow Dispatcher.
Dick
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
HoverButtons not visible
Hi Dick,
>> METHOD OwnerDraw() CLASS Event
Doing something like this no longer makes sense. I´m sure that Fabrice knows the ODDrawItem() callback method.
regards
Karl-Heinz
>> METHOD OwnerDraw() CLASS Event
Doing something like this no longer makes sense. I´m sure that Fabrice knows the ODDrawItem() callback method.
regards
Karl-Heinz
HoverButtons not visible
Hello Karl-Heinz,
He already confirmed that to me. I leave it like it was in my VO programs as there it works fine for me this way as well.
Dick
He already confirmed that to me. I leave it like it was in my VO programs as there it works fine for me this way as well.
Dick