OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 31-03-2011, 13:17
Harry Harry is offline
Join Date: Apr 2007
Location: London UK
Posts: 58

Yes, that solves the date-order problem. Thanks for the quick fix.

One other thing I've noticed though -- when a file is selected, the large preview always shows its date as 12/Dec/2007 (the date of recentfiles) instead of the date of the file.

Also I'm still (mostly) seeing those square thumbnails of http://forum.oberonplace.com/showpos...&postcount=181
Reply With Quote
Old 01-04-2011, 13:43
Posts: n/a

Am I to believe that recent files is still in the works? I have X5 and want to install it but I cannot access the beta because the bandwith allocation limit has been reached.
Reply With Quote
Old 01-04-2011, 15:10
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe

I posted and updated version for X5. Check back a few pages. Os updated this for me.
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
Old 06-04-2011, 10:27
buga buga is offline
Senior Member
Join Date: Jan 2011
Posts: 114

Hello such.

Forgive my ignorance, but this post is so long and has so many messages ...
Also do not understand English very well.

which links I have to find it, that I have to make changes in the codes?

Please could someone upload the updated macro for the X5? or installer, a *. gms ...

I would be very grateful

thanks in advance

Reply With Quote
Old 20-12-2012, 09:18
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811

HI Os.
Did you ever get the scroll list box API working for 64 bit.
I managed to translate it to the best of my ability but it seems to crash after a few scrolls. I think it is corrupting the stack somehow but I'm not sure how to fix.

Option Explicit

#If VBA7 Then

Private Type POINTAPI2
    XY As LongLong
End Type

     pt As POINTAPI2
     hwnd As LongPtr
     wHitTestCode As Long
     dwExtraInfo As LongPtr
End Type

Private Declare PtrSafe Function FindWindow Lib "user32" _
                     Alias "FindWindowA" ( _
                             ByVal lpClassName As String, _
                             ByVal lpWindowName As String) As LongPtr

Private Declare PtrSafe Function GetWindowLong Lib "user32.dll" _
                     Alias "GetWindowLongA" ( _
                             ByVal hwnd As LongPtr, _
                             ByVal nIndex As Long) As Long

Private Declare PtrSafe Function SetWindowsHookEx Lib "user32" _
                     Alias "SetWindowsHookExA" ( _
                             ByVal idHook As Long, _
                             ByVal lpfn As LongPtr, _
                             ByVal hmod As LongPtr, _
                             ByVal dwThreadId As Long) As LongPtr

Private Declare PtrSafe Function CallNextHookEx Lib "user32" ( _
                             ByVal hHook As LongPtr, _
                             ByVal nCode As Long, _
                             ByVal wParam As LongPtr, _
                             lParam As Any) As LongPtr

Private Declare PtrSafe Function UnhookWindowsHookEx Lib "user32" ( _
                             ByVal hHook As LongPtr) As Long

Private Declare PtrSafe Function PostMessage Lib "user32.dll" _
                     Alias "PostMessageA" ( _
                             ByVal hwnd As LongPtr, _
                             ByVal wMsg As Long, _
                             ByVal wParam As LongPtr, _
                             ByVal lParam As LongPtr) As Long

Private Declare PtrSafe Function GetCursorPos Lib "user32.dll" ( _
                             ByRef lpPoint As POINTAPI2) As Long

Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As LongPtr)

Private Const WH_MOUSE_LL As Long = 14
Private Const WM_MOUSEWHEEL As Long = &H20A
Private Const HC_ACTION As Long = 0
Private Const GWL_HINSTANCE As Long = (-6)

Private Const WM_KEYDOWN As Long = &H100
Private Const WM_KEYUP As Long = &H101
Private Const VK_UP As Long = &H26
Private Const VK_DOWN As Long = &H28
Private Const WM_LBUTTONDOWN As Long = &H201

Private mLngMouseHook As LongPtr
Private mListBoxHwnd As LongPtr
Private mbHook As Boolean
Private lngConverted As LongLong

Declare PtrSafe Function WindowFromPoint Lib "user32" (ByVal point As LongLong) As LongPtr

#End If

' Copies a POINTAPI into a LongLong.  For an API requiring a ByVal POINTAPI parameter,
' this LongLong can be passed in instead.  Example API's include WindowFromPoint,
' ChildWindowFromPoint, ChildWindowFromPointEx, DragDetect, and MenuItemFromPoint.
'    Function PointToLongLong(point As POINTAPI) As LongLong
'        Dim ll As LongLong
'        Dim cbLongLong As LongPtr
'        cbLongLong = LenB(ll)
'        ' make sure the contents will fit
'        If LenB(point) = cbLongLong Then
'            CopyMemory ll, point, cbLongLong
'        End If
'        PointToLongLong = ll
'    End Function

Sub HookListBoxScroll()
Dim lngAppInst As Long
#If VBA7 Then
    Dim hwndUnderCursor As LongPtr
    Dim hwndUnderCursor As Long
#End If


        GetCursorPos tPt2

        hwndUnderCursor = WindowFromPoint(tPt2.XY)
        If mListBoxHwnd <> hwndUnderCursor Then
             mListBoxHwnd = hwndUnderCursor
                lngAppInst = GetWindowLong(mListBoxHwnd, GWL_HINSTANCE)
                PostMessage mListBoxHwnd, WM_LBUTTONDOWN, 0&, 0&
             If Not mbHook Then
                     mLngMouseHook = SetWindowsHookEx( _
                                                     WH_MOUSE_LL, AddressOf MouseProc, lngAppInst, 0)
                     mbHook = mLngMouseHook <> 0
             End If
     End If
End Sub

Sub UnhookListBoxScroll()
     If mbHook Then
             UnhookWindowsHookEx mLngMouseHook
             mLngMouseHook = 0
             mListBoxHwnd = 0
             mbHook = False
     End If
End Sub

Private Function MouseProc( _
        ByVal nCode As Long, ByVal wParam As LongPtr, _
             ByRef lParam As MOUSEHOOKSTRUCT) As LongPtr

        On Error GoTo errH 'Resume Next
        If (nCode = HC_ACTION) Then

             If WindowFromPoint(lParam.pt.XY) = mListBoxHwnd Then
                     If wParam = WM_MOUSEWHEEL Then
                             MouseProc = True

                             If lParam.hwnd > 7864320 Then 'change 0 to 7864320 for 64 bit
                                     PostMessage mListBoxHwnd, WM_KEYDOWN, VK_UP, 0
                                     PostMessage mListBoxHwnd, WM_KEYDOWN, VK_DOWN, 0
                             End If

                             PostMessage mListBoxHwnd, WM_KEYUP, VK_UP, 0
                             'PostMessage mListBoxHwnd, WM_KEYDOWN, VK_DOWN, 0
                             Exit Function
                     End If
             End If
     End If
        MouseProc = CallNextHookEx( _
                             mLngMouseHook, nCode, wParam, ByVal lParam)
     Exit Function
End Function
Reply With Quote
Old 29-12-2012, 05:15
FaneDuru FaneDuru is offline
Join Date: May 2012
Posts: 35

May I know where I can find this nice stuff gms/installer file?
All links are old and not working...

Thanks in advance,
Reply With Quote
Old 18-01-2013, 14:51
FaneDuru FaneDuru is offline
Join Date: May 2012
Posts: 35

Does anybody have this gms/installer or can guide me to find it?

Thanks in advance!
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 05:50.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com