Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC:

HoverButtons not visible 03 Nov 2021 18:51 #20230

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1661
  • 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

    Please Log in or Create an account to join the conversation.

    HoverButtons not visible 03 Nov 2021 20:11 #20231

    • Jamal
    • Jamal's Avatar


  • Posts: 309
  • 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

    Please Log in or Create an account to join the conversation.

    HoverButtons not visible 03 Nov 2021 21:04 #20233

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1661
  • 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

    Please Log in or Create an account to join the conversation.

    HoverButtons not visible 04 Nov 2021 13:12 #20242

    • Karl-Heinz
    • Karl-Heinz's Avatar


  • Posts: 774
  • 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.

    www.xsharp.eu/forum/german/1696-vo-tools-fuer-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.
    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

    Please Log in or Create an account to join the conversation.

    HoverButtons not visible 04 Nov 2021 13:26 #20243

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1661
  • 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

    Please Log in or Create an account to join the conversation.

    HoverButtons not visible 04 Nov 2021 14:32 #20244

    • Karl-Heinz
    • Karl-Heinz's Avatar


  • Posts: 774
  • 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

    Please Log in or Create an account to join the conversation.

    HoverButtons not visible 04 Nov 2021 16:41 #20251

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1661
  • 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

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1