Announcement

Collapse

Forum Guidelines

This forum is for finished source code that is working properly. If you have questions about this or any other source code, please post it in one of the Discussion Forums, not here.
See more
See less

"HoverButton" Custom Control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • "HoverButton" Custom Control

    Save the following as CTLBTN.INC

    Code:
    '________________________________________________________________________________________
    '
    ' HoverButton control
    ' ===================
    '
    ' Lightweight hover-style button control with check style and spin features.
    '
    '
    '        Changes:
    '        --------
    '
    '        14 May 2004: Fixed small bug under WM_ENABLE.
    '
    '        08 May 2004: Added checks for tab-to-control and new message - HBM_SETFOCUSCOLOR
    '                     The HBS_BORDER style has been renamed to HBS_ORIGINAL for old-style buttons
    '                     Updated the sample code to reflect these changes.
    '
    '        21 Feb 2004: Changed timer to only be activated/deactivated when mouse moves
    '                     Before it was creating a time for each button.
    '
    '
    ' This code is hereby placed in the public domain. Just don't claim it as your own work!
    '
    '
    ' By Kev G. Peel, KGP Software, Aug 2003. Updates: Feb 2004. May 2004.
    '________________________________________________________________________________________
     
    
    #If Not %Def(%FUNCTION_HOVERBTNCTL)
     
    %FUNCTION_HOVERBTNCTL = 1
     
    
    $HOVERBTNCLASS          = "HoverBtn32"          ' Control class
     
                                                    ' Some messages are based on the BUTTON class for compatibility
    %HBM_GETCHECK           = &HF0                  ' Return check state
    %HBM_SETCHECK           = &HF1                  ' Set check state (if lParam <> 0 then send HBM_CLICK message)
    %HBM_CLICK              = &HF5                  ' Button pressed
    %HBM_SPINTIME           = %WM_USER + 401        ' Set delay spin actions on mouse down
    %HBM_SETCOLORS          = %WM_USER + 402        ' Set control colors
    %HBM_SETHOVERCOLORS     = %WM_USER + 403        ' Set control hover colors
    %HBM_SETFOCUSCOLOR      = %WM_USER + 404        ' Set control focus border color
     
    %HBS_DEFAULT            = &H10000000&           ' Button is default button (for enter key)
    %HBS_CHECKBOX           = &H02000000&           ' Button is a checkbox style button
    %HBS_SPIN               = &H04000000&           ' Button has repeat actions on mouse down
    %HBS_ORIGINAL           = &H00000001&           ' Button is old style (no effects enabled with this style)
    %HBS_LEFT               = &H00000100&           ' Text aligned to the left
    %HBS_RIGHT              = &H00000200&           ' Text aligned to the right
    %HBS_CENTER             = &H00000400&           ' Text aligned to the center (default)
     
    
    %HBS_NORMAL = %WS_CHILD Or %WS_TABSTOP Or %WS_VISIBLE Or %HBS_CENTER
     
    
     
    Type HB_DATA                            ' Custom data for the control
         zText        As Asciiz * 250       ' Display text
         cText        As Dword              ' Text color
         cBack        As Dword              ' Back color
         cHovTxt      As Dword              ' Mouse over text color
         cHovBk       As Dword              ' Mouse over back color
         cFocus       As Dword              ' Focus rectangle color
         bHasTxtClr   As Byte               ' Nonzero if text color is valid
         bHasBkClr    As Byte               ' Nonzero if back color is valid
         bIsOver      As Byte               ' Mouse is hovering over
         bIsDown      As Byte               ' Mouse button is down
         bTimer       As Byte               ' Nonzero for timer
         bCheck       As Byte               ' Nonzero if checked
         lfFont       As LOGFONT            ' Font style
    End Type
     
    
    Declare Function HoverBtn_Initialize(Optional ByVal nUninitialize As Long) As Long
    Declare Function HoverBtn_WndProc(ByVal hWnd As Dword, ByVal wMsg As Dword, ByVal wParam As Dword, ByVal lParam As Long) As Long
     
    
     
    '------------------------------------------------------------------------------
    ' Initialize the control class (specify nonzero as parameter to unregister)
    '------------------------------------------------------------------------------
    Function HoverBtn_Initialize(Optional ByVal nUninitialize As Long) As Long
      Local wc As WNDCLASS, zClass As Asciiz * 128
      If nUninitialize = 0 Then
         zClass           = $HOVERBTNCLASS
         wc.lpfnWndProc   = CodePtr(HoverBtn_WndProc)
         wc.hInstance     = GetModuleHandle(ByVal 0)
         wc.cbWndExtra    = 4
         wc.hCursor       = LoadCursor(0, ByVal %IDC_ARROW)
         wc.hbrBackground = 0
         wc.lpszClassName = VarPtr(zClass)
         Function = RegisterClass(wc)
      Else
         Function = UnregisterClass($HOVERBTNCLASS, GetModuleHandle(ByVal 0))
      End If
    End Function
     
    
     
    '------------------------------------------------------------------------------
    ' Window procedure for the hover button control
    '------------------------------------------------------------------------------
    Function HoverBtn_WndProc(ByVal hWnd As Dword, ByVal wMsg As Dword, ByVal wParam As Dword, ByVal lParam As Long) As Long
     
      Local ps As PAINTSTRUCT, hBack As Dword, rc As RECT, dwAlign As Dword
      Local gwl As Dword, pt As POINTAPI, fnt As Dword, fd As HB_DATA Ptr, i As Long
      Local hPen As Dword, clrBack As Dword
     
      Select Case wMsg
     
            Case %WM_CREATE
                 SetWindowLong hWnd, 0, HeapAlloc(GetProcessHeap, %HEAP_ZERO_MEMORY, SizeOf(@fd))
                 fd = GetWindowLong(hWnd, 0)
                 SystemParametersInfo %SPI_GETICONTITLELOGFONT, SizeOf(LOGFONT), @fd.lfFont, 0
                 GetWindowText hWnd, @fd.zText, SizeOf(@fd.zText)
                 ' Set defaults
                 @fd.cHovBk = %Black
                 @fd.cHovTxt = %White
                 @fd.cFocus = %White
                 Exit Function
     
            Case %WM_SETTEXT
                 Local pStr As Asciiz Ptr
                 fd = GetWindowLong(hWnd, 0)
                 If lParam Then
                    pStr = lParam
                    @fd.zText = @pStr
                 Else
                    @fd.zText = ""
                 End If
                 RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
                 Exit Function
     
            Case %WM_SETFONT
                 ' Save new font
                 fd = GetWindowLong(hWnd, 0)
                 GetObject wParam, SizeOf(LOGFONT), @fd.lfFont
                 If lParam Then RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
                 Exit Function
     
            Case %WM_PAINT
                 ' Draw text and style...
                 fd = GetWindowLong(hWnd, 0)
                 gwl = GetWindowLong(hWnd, %GWL_STYLE)
                 BeginPaint hWnd, ps
                 GetClientRect hWnd, rc
                 ' Draw control background...
                 If (gwl And %HBS_ORIGINAL) Then
                    If (@fd.bHasBkClr) Then
                       clrBack = @fd.cBack
                    Else
                       clrBack = GetSysColor(%COLOR_BTNFACE)
                    End If
                 Else
                    If (@fd.bHasBkClr) Then
                       clrBack = IIf&(@fd.bIsOver, @fd.cHovBk, @fd.cBack)
                    Else
                       clrBack = GetSysColor(IIf&(@fd.bIsOver, %COLOR_BTNHIGHLIGHT, %COLOR_BTNFACE))
                    End If
                 End If
     
                 ' Set back color (this is chosen above)...
                 hBack = SelectObject(ps.hDC, CreateSolidBrush(clrBack))
     
                 ' Set border color (white for focussed control)...
                 ' Note: Focus border is not used with HBS_ORIGINAL,
                 ' we use DrawFocusRect instead...
                 If (GetFocus = hWnd) And ((gwl And %HBS_ORIGINAL) = 0) Then clrBack = @fd.cFocus
                 
                 ' Increase border pen width for checked or hovered
                 ' items (it is obscured otherwise)...
                 If (@fd.bCheck) Or (@fd.bIsDown) Or (@fd.bIsOver) Then i = 3 Else i = 1
                 hPen = SelectObject(ps.hDC, CreatePen(%PS_INSIDEFRAME, i, clrBack))
     
                 ' Draw the control...
                 Rectangle ps.hDc, ps.rcPaint.nLeft, ps.rcPaint.nTop, ps.rcPaint.nRight, ps.rcPaint.nBottom
     
                 ' Clear up GDI objects...
                 DeleteObject SelectObject(ps.hDC, hBack)
                 DeleteObject SelectObject(ps.hDC, hPen)
                 
                 ' Draw border...
                 If (@fd.bCheck) Or (@fd.bIsDown) Then
                    ' Always sunken if checked or mouse down...
                    DrawEdge ps.hdc, rc, %EDGE_SUNKEN, %BF_RECT
                 Else
                    ' Determine from mousemovements and style...
                    If (gwl And %HBS_ORIGINAL) Then
                       DrawEdge ps.hdc, rc, %EDGE_RAISED, %BF_RECT
                    Else
                       If @fd.bIsOver Then DrawEdge ps.hdc, rc, %BDR_RAISEDOUTER, %BF_RECT
                    End If
                 End If
                 
                 ' Draw text if the control has text...
                 If Len(@fd.zText) Then
                    ' Only trap this if no border and not a checkbox...
                    If @fd.bIsDown = 0 Then
                       If ((gwl And %HBS_CHECKBOX) <> %HBS_CHECKBOX) And ((gwl And %HBS_ORIGINAL) <> %HBS_ORIGINAL) And (@fd.bIsOver <> 0) Then
                          rc.nLeft = rc.nLeft - 2: rc.ntop = rc.nTop - 2
                       End If
                    End If
                    ' Only track if not in checkbox mode...
                    If @fd.bIsDown Then rc.nLeft = rc.nLeft + 3: rc.ntop = rc.nTop + 3
                    fnt = SelectObject(ps.hDc, CreateFontIndirect(@fd.lfFont))
                    SetBkMode ps.hDc, %Transparent
                    If IsWindowEnabled(hWnd) Then
                       If (gwl And %HBS_ORIGINAL) Then
                          SetTextColor ps.hDc, IIf&(@fd.bHasTxtClr, @fd.cText, GetSysColor(%COLOR_BTNTEXT))
                       Else
                          SetTextColor ps.hDc, IIf&(@fd.bHasTxtClr, IIf&(@fd.bIsOver, @fd.cHovTxt, @fd.cText), GetSysColor(IIf&(@fd.bIsOver, %COLOR_HIGHLIGHTTEXT, %COLOR_BTNTEXT)))
                       End If
                    Else
                       SetTextColor ps.hDc, GetSysColor(%COLOR_GRAYTEXT)
                    End If
                    If (gwl And %HBS_LEFT) = %HBS_LEFT Then
                       dwAlign = %DT_LEFT
                       rc.nLeft = rc.nLeft + 4
                    ElseIf (gwl And %HBS_RIGHT) = %HBS_RIGHT Then
                       dwAlign = %DT_RIGHT
                       rc.nRight = rc.nRight - 4
                    Else
                       dwAlign = %DT_CENTER
                    End If
                    DrawText ps.hDc, @fd.zText, Len(@fd.zText), rc, %DT_NOPREFIX Or %DT_SINGLELINE Or %DT_VCENTER Or dwAlign
                    DeleteObject SelectObject(ps.hDc, fnt)
                 End If
                 
                 ' Special case for HBS_ORIGINAL style, draw focus rect?...
                 If (GetFocus = hWnd) And (gwl And %HBS_ORIGINAL) Then
                    GetClientRect hWnd, rc
                    InflateRect rc, -3, -3
                    DrawFocusRect ps.hDC, rc
                 End If
     
                 EndPaint hWnd, ps
                 Exit Function
     
            Case %WM_ERASEBKGND
                 Exit Function
     
            Case %WM_KEYDOWN
                 fd = GetWindowLong(hWnd, 0)
                 If (wParam = %VK_SPACE) Then
                    SendMessage hWnd, %HBM_CLICK, 0, 0
                 ElseIf (wParam = %VK_RETURN) Then
                     gwl = GetWindowLong(hWnd, %GWL_STYLE)
                     If (gwl And %HBS_DEFAULT) Then SendMessage hWnd, %HBM_CLICK, 0, 0
                 End If
                 Exit Function
     
            Case %WM_GETDLGCODE
                 If IsWindowEnabled(hWnd) = %False Then Exit Function
                 fd = GetWindowLong(hWnd, 0)
                 gwl = GetWindowLong(hWnd, %GWL_STYLE)
                 Function = %DLGC_BUTTON Or IIf&(gwl And %HBS_DEFAULT, %DLGC_DEFPUSHBUTTON, %DLGC_UNDEFPUSHBUTTON)
                 Exit Function
     
            Case %WM_ENABLE
                 ' In case mouse is over control...
                 fd = GetWindowLong(hWnd, 0)
                 @fd.bIsDown = %FALSE
                 RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
     
            Case %WM_SETFOCUS, %WM_KILLFOCUS
                 ' Redraw window on focus...
                 RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
     
            Case %WM_LBUTTONDOWN
                 If IsWindowEnabled(hWnd) = %False Then Exit Function
                 fd = GetWindowLong(hWnd, 0)
                 SetFocus hWnd
                 SetCapture hWnd
                 @fd.bIsDown = %True
                 RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
     
            Case %WM_LBUTTONUP
                 If IsWindowEnabled(hWnd) = %False Then Exit Function
                 Function = DefWindowProc(hWnd, wMsg, wParam, lParam)
                 ReleaseCapture
                 fd = GetWindowLong(hWnd, 0)
                 gwl = GetWindowLong(hWnd, %GWL_STYLE)
                 GetCursorPos pt
                 GetWindowRect hWnd, rc
                 @fd.bIsOver = %False
                 ' Only signal mouse up if over control...
                 If (@fd.bIsDown <> 0) And (PtInRect(rc, pt.x, pt.y) <> 0) Then
                    @fd.bIsDown = %False
                    ' Toggle check state if we have the style...
                    If (gwl And %HBS_CHECKBOX) = %HBS_CHECKBOX Then @fd.bCheck = IIf&(@fd.bCheck, %False, %True)
                    RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
                    If (gwl And %HBS_SPIN) <> %HBS_SPIN Then SendMessage hWnd, %HBM_CLICK, 0, 0
                 Else
                    @fd.bIsDown = %False
                    RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
                 End If
                Exit Function
     
            Case %WM_MOUSEMOVE
                 ' Activate temporary timer...
                 fd = GetWindowLong(hWnd, 0)
                 If @fd.bTimer = 0 Then
                    @fd.bTimer = 1
                    SetTimer hWnd, 100, 10, 0
                 End If
                 Exit Function
     
            Case %WM_TIMER
                 ' This timer is temporarily set when the mouse moves over the control
                 ' If the mouse moves off, the timer is destroyed. It is done this way for performance reasons...
                 If IsWindowEnabled(hWnd) = %False Then Exit Function
                 If IsWindowEnabled(GetParent(hWnd)) = %False Then Exit Function
                 fd = GetWindowLong(hWnd, 0)
                 GetCursorPos pt
                 GetWindowRect hWnd, rc
                 ' Send multiple signals to parent if button has spin style...
                 gwl = GetWindowLong(hWnd, %GWL_STYLE)
                 If (@fd.bIsDown <> 0) And ((gwl And %HBS_SPIN) = %HBS_SPIN) Then SendMessage hWnd, %HBM_CLICK, 0, 0
                 i = PtInRect(rc, pt.x, pt.y)
                 If (i = 0) And (@fd.bTimer = 1) Then
                    KillTimer hWnd, 100
                    @fd.bTimer = 0
                 End If
                 If (i <> @fd.bIsOver) Then
                    @fd.bIsOver = IIf&(@fd.bIsOver, 0, 1)
                    RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
                 End If
                 Exit Function
     
            Case %WM_DESTROY
                 fd = GetWindowLong(hWnd, 0)
                 If @fd.bTimer Then KillTimer hWnd, 100
                 HeapFree GetProcessHeap, 0, fd
                 Exit Function
     
          ' <---- Beginning of custom control messages ---->
     
            Case %HBM_SETCOLORS
                 ' Set main colors for the control...
                 fd = GetWindowLong(hWnd, 0)
                 If (wParam <> CDwd(-1)) Then @fd.cText = wParam: @fd.bHasTxtClr = %True Else @fd.bHasTxtClr = %False
                 If (lParam <> -1) Then @fd.cBack = lParam: @fd.bHasBkClr = %True Else @fd.bHasBkClr = %False
                 Exit Function
     
            Case %HBM_SETHOVERCOLORS
                 ' Set special mouse over colors...
                 fd = GetWindowLong(hWnd, 0)
                 If (wParam <> CDwd(-1)) Then @fd.cHovTxt = wParam Else @fd.cHovTxt = @fd.cText
                 If (lParam <> CDwd(-1)) Then @fd.cHovBk = lParam Else @fd.cHovBk = @fd.cBack
                 Exit Function
     
            Case %HBM_SETFOCUSCOLOR
                 ' Set focus color (value of wParam)...
                 fd = GetWindowLong(hWnd, 0)
                 @fd.cFocus = wParam
                 Exit Function
     
            Case %HBM_SETCHECK
                 ' Set check state...
                 fd = GetWindowLong(hWnd, 0)
                 @fd.bCheck = IIf&(wParam, %True, %False)
                 RedrawWindow hWnd, ByVal 0, 0, %RDW_ERASE Or %RDW_INVALIDATE
                 ' Send notification if lParam says so...
                 If (lParam <> 0) Then SendMessage hWnd, %HBM_CLICK, 0, 0
                 Exit Function
     
            Case %HBM_GETCHECK
                 ' Set check state
                 fd = GetWindowLong(hWnd, 0)
                 Function = @fd.bCheck
                 Exit Function
     
            Case %HBM_CLICK
                 ' Send message to parent...
                 fd = GetWindowLong(hWnd, 0)
                 SendMessage GetParent(hWnd), %WM_COMMAND, MakDwd(GetDlgCtrlID(hWnd), %BN_CLICKED), hWnd
     
      End Select
     
      Function = DefWindowProc(hWnd, wMsg, wParam, lParam)
    End Function
     
    #EndIf
    [This message has been edited by Kev Peel (edited May 26, 2004).]
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

  • #2
    Save the following as BTNTEST.BAS

    Code:
    '________________________________________________________________________________________
    '
    ' HoverButton test program
    ' ========================
    '
    ' Simple program testing the HoverButton's capabilities
    ' Uses standard button messages/notifications for compatibility.
    '
    ' If you find any bugs then please e-mail (mailATkgpsoftware.com) or post a message.
    '
    ' By Kev G. Peel, KGP Software, August 2003. Updated May 2004.
    '________________________________________________________________________________________
     
    #Compile Exe
    #Dim All
    #Register All
     
    
    %USEMACROS = 1
    #Include "WIN32API.INC"         ' Win32API functions
    #Include "CTLBTN.INC"           ' HoverButton control functions
     
    
    %IDC_BUTTON1    = 100           ' Control identifier #1
    %IDC_BUTTON2    = 200           ' Control identifier #2
    %IDC_BUTTON3    = 300           ' Control identifier #3
    %IDC_BUTTON4    = 400           ' Control identifier #4
    %IDC_BUTTON5    = 500           ' Control identifier #5
    %IDC_BUTTON6    = 600           ' Control identifier #6
     
    
    '------------------------------------------------------------------------------
    ' Callback function for main dialog
    '------------------------------------------------------------------------------
    CallBack Function dlgMain
     
      Select Case CbMsg
     
             Case %WM_COMMAND
                  If (CbCtlMsg <> %BN_CLICKED) Then Exit Function
                  Select Case CbCtl
     
                         Case %IDC_BUTTON1
                              MessageBox CbHndl, "You clicked the first button, this button is marked as default.", "HoverButton", %MB_ICONINFORMATION
     
                         Case %IDC_BUTTON2
                              ' This button is a "spin" button with multiple messages on mousedown...
                              Static siAmount As Long
                              Incr siAmount
                              Control Set Text CbHndl, %IDC_BUTTON2, "Spin #" + Format$(siAmount)
                              Control Redraw CbHndl, %IDC_BUTTON2
     
                         Case %IDC_BUTTON3
                              MessageBox CbHndl, "You checked the third button", "HoverButton", %MB_ICONINFORMATION
     
                         Case %IDC_BUTTON4
                              ' Set some random colors for the button...
                              Local ct As Dword, cb As Dword, cf As Dword
                              Randomize Timer
                              ct = Rnd(0, %White)
                              cb = Rnd(0, %White)
                              cf = Rnd(0, %White)
                              Control Send CbHndl, %IDC_BUTTON4, %HBM_SETCOLORS, ct, cb
                              Control Send CbHndl, %IDC_BUTTON4, %HBM_SETHOVERCOLORS, -1, cb
                              Control Send CbHndl, %IDC_BUTTON4, %HBM_SETFOCUSCOLOR, cf, 0
                              Control Redraw CbHndl, %IDC_BUTTON4
     
                         Case %IDC_BUTTON5
                              MessageBox CbHndl, "You clicked the old style (HBS_ORIGINAL) button", "HoverButton", %MB_ICONINFORMATION
     
                         Case %IDC_BUTTON6
                              ' This button is disabled so this message isn't "fired"
     
                  End Select
     
      End Select
     
    End Function
     
    
    '------------------------------------------------------------------------------
    ' Program Start Point
    '------------------------------------------------------------------------------
    Function PBMain
      Local hDlg As Dword
     
      ' Must initialize the control...
      HoverBtn_Initialize
     
      Dialog New 0, "HoverButton Test", , , 210, 100, %DS_MODALFRAME Or %WS_CAPTION Or %WS_POPUP Or %WS_SYSMENU Or %WS_MINIMIZEBOX To hDlg
      Dialog Set Color hDlg, %White, %Black
     
      Control Add $HOVERBTNCLASS, hDlg, %IDC_BUTTON1, "Click Me!", 10, 10, 80, 20, %HBS_NORMAL Or %HBS_DEFAULT
      Control Send hDlg, %IDC_BUTTON1, %HBM_SETCOLORS, %Green, %Black
      Control Send hDlg, %IDC_BUTTON1, %HBM_SETHOVERCOLORS, %White, %Black
     
      Control Add $HOVERBTNCLASS, hDlg, %IDC_BUTTON2, "Hold Down Mouse", 10, 40, 80, 20, %HBS_NORMAL Or %HBS_SPIN
      Control Send hDlg, %IDC_BUTTON2, %HBM_SETCOLORS, %Blue, %Black
      Control Send hDlg, %IDC_BUTTON2, %HBM_SETHOVERCOLORS, %White, %Black
     
      Control Add $HOVERBTNCLASS, hDlg, %IDC_BUTTON3, "Check Button", 10, 70, 80, 20, %HBS_NORMAL Or %HBS_CHECKBOX
      Control Send hDlg, %IDC_BUTTON3, %HBM_SETCOLORS, %Red, %Black
      Control Send hDlg, %IDC_BUTTON3, %HBM_SETHOVERCOLORS, %White, %Black
     
      Control Add $HOVERBTNCLASS, hDlg, %IDC_BUTTON4, "Change Color", 120, 10, 80, 20, %HBS_NORMAL
      Control Send hDlg, %IDC_BUTTON4, %HBM_SETCOLORS, %Gray, %Black
      Control Send hDlg, %IDC_BUTTON4, %HBM_SETHOVERCOLORS, %White, %Black
     
      Control Add $HOVERBTNCLASS, hDlg, %IDC_BUTTON5, "Old Style", 120, 40, 80, 20, %HBS_NORMAL Or %HBS_ORIGINAL
     
      Control Add $HOVERBTNCLASS, hDlg, %IDC_BUTTON6, "Disabled", 120, 70, 80, 20, %HBS_NORMAL Or %WS_DISABLED
      Control Send hDlg, %IDC_BUTTON6, %HBM_SETCOLORS, %Gray, %Black
     
      Dialog Show Modal hDlg Call dlgMain
     
      ' Remember to do this before your app finishes...
      HoverBtn_Initialize %True
     
    End Function
    [This message has been edited by Kev Peel (edited May 26, 2004).]
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Made a few changes to the control and example code. Please see top post for details.

      ------------------
      Kev Peel
      http://www.kgpsoftware.com
      kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

      Comment

      Working...
      X