PlanetSquires Forums

Support Forums => General Board => Topic started by: Douglas McDonald on February 04, 2013, 01:44:33 PM

Title: wMsg ??
Post by: Douglas McDonald on February 04, 2013, 01:44:33 PM
I'm trying tell id the mouse is over a button hovering. I assume the code would be something like
this:

Function ASTRCU_ASRELAYSOFFBNT_CUSTOM ( _
                                      ControlIndex  As Long,  _  ' index in Control Array
                                      hWndForm      As Dword, _  ' handle of Form
                                      hWndControl   As Dword, _  ' handle of Control
                                      wMsg          As Long,  _  ' type of message
                                      wParam        As Dword, _  ' first message parameter
                                      lParam        As Long   _  ' second message parameter
                                      ) As Long
Select Case wMsg
      Case wparam
            %WM_NOTIFY
             If lparam = %nm_hover Then mousptr = 2     'I'm sure this is not correct
End Select 


I guess what I'm really asking is how do I use CallBacks like PB's CB.MSG and the rest of CB.xxxxxx

Thanks
Doug
Title: Re: wMsg ??
Post by: Rudolf Furstauer on February 05, 2013, 08:30:37 AM
I'm not sure whether you receive this message from a button.
I think you only get it from a ListView, but i'm not sure.

You could use this code in mousemove or in a timerevent.

    Local Pt                As PointApi
    Local hWnd              As Dword
'----------------------------------------

    'query Handler under the mouse
    Pt.x = LoInt(GetMessagePos())
    Pt.y = HiInt(GetMessagePos())
    hWnd = WindowFromPoint(Pt)
   
    'Is it my button?
    Select Case hWnd
   
        Case HWND_FORM1_CMD(0)
            MousePtr 11
       
        Case HWND_FORM1_CMD(1)
            MousePtr 5
   
        Case Else
            MousePtr 1
   
    End Select


Rudolf Fuerstauer
Title: Re: wMsg ??
Post by: Robert Eaton on February 05, 2013, 08:59:47 AM
You may need to look at the WM_NCHITTEST message.
Title: Re: wMsg ??
Post by: Douglas McDonald on February 09, 2013, 01:22:23 PM
I guess my main question is how to use PB's call backs in FF3. Do they go in the custom sections. Can I use CB.xxxx messages like in PB?

As you can see I'm stupid abut this. I'd guess it's simple, I just don't know how to use them with FF3

Doug
Title: Re: wMsg ??
Post by: Paul Squires on February 09, 2013, 05:07:00 PM
You can't use the CB.xxxx style messages in FireFly. PB's callbacks are tied to the DDT engine that PB decided to use. It is not compatible with how the WinAPI / SDK style of programming works. Check out my source code for custom controls like the FireLink and you will see how I handle situations where a mouse cursor hovers over a control.
Title: Re: wMsg ??
Post by: Douglas McDonald on February 13, 2013, 01:29:06 PM
Ok thank you Paul

Doug