Results 1 to 15 of 15

Thread: [RESOLVED] Missing CURSOR_RESOURCE?

  1. #1

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Resolved [RESOLVED] Missing CURSOR_RESOURCE?

    from the below

    Code:
    Private Enum CURSOR_RESOURCE
        OCR_NORMAL = 32512&
        OCR_IBEAM = 32513&
        OCR_WAIT = 32514&
        OCR_CROSS = 32515&
        OCR_UP = 32516&
        OCR_SIZE = 32640&
        OCR_ICON = 32641&
        OCR_SIZENWSE = 32642&
        OCR_SIZENESW = 32643&
        OCR_SIZEWE = 32644&
        OCR_SIZENS = 32645&
        OCR_SIZEALL = 32646&
        OCR_ICOCUR = 32647&
        OCR_NO = 32648&
        OCR_HAND = 32649&
        OCR_APPSTARTING = 32650&
    End Enum
    where is the Cursor_V_Split
    Name:  Cursor_V_Split.svg.med.png
Views: 181
Size:  1.4 KB

    ,and Cursor_H_Split
    Name:  Cursor_H_Split.svg.thumb.png
Views: 230
Size:  815 Bytes

    while at that, why are my threads not bolded?

    LucasMKG
    ?
    Last edited by LucasMKG; Apr 25th, 2022 at 01:37 AM.

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: Missing CURSOR_RESOURCE?

    Where did you get those resources? And what are bolded threads?

  3. #3

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: Missing CURSOR_RESOURCE?

    Swinkels,

    Quote Originally Posted by Peter Swinkels View Post
    Where did you get those resources?...
    from vhGrid...clsSkinHeader

    Quote Originally Posted by Peter Swinkels View Post
    ...And what are bolded threads?
    check out other theads, their title is in bold

    LucasMKG
    ..feel interrogated
    Last edited by LucasMKG; Mar 16th, 2022 at 03:46 AM.

  4. #4
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: Missing CURSOR_RESOURCE?

    My apologies, I am sometimes a little too direct, but unfortunately there are a lot of posters who ask equally short questions leaving others guessing at the details.

    I have no idea what vhgrid is and as to the bolding issue, I haven't really noticed it. Possibly a bug or browser issue.

  5. #5

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: Missing CURSOR_RESOURCE?

    i get it, as for vhGrid you can get a copy thereof here https://vbcoders.com/code/final-vhgrid-1.7-update-july-07-67906.html

    LucasMKG
    ..
    Last edited by LucasMKG; Apr 25th, 2022 at 01:41 AM.

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Missing CURSOR_RESOURCE?

    while at that, why are my threads not bolded?
    Because you created them.
    Threads with their description in bold contain unread posts, but because you created your own thread it's per definition read by you.

  7. #7
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: Missing CURSOR_RESOURCE?

    I am glad you understand. I am afraid your question is about something I can't readily help you with. Sorry.

  8. #8

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: Missing CURSOR_RESOURCE?

    Quote Originally Posted by Peter Swinkels View Post
    I am glad you understand. I am afraid your question is about something I can't readily help you with. Sorry.
    no worries



    LucasMKG
    .

  9. #9

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: Missing CURSOR_RESOURCE?

    Arnoutdv,

    Quote Originally Posted by Arnoutdv View Post
    Because you created them.
    Threads with their description in bold contain unread posts, but because you created your own thread it's per definition read by you.
    thanks, now I get it

    LucasMKG

  10. #10
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,651

    Re: Missing CURSOR_RESOURCE?

    The vsplit and hsplit aren't default cursors. If you want them, you'll have to add them to your app yourself or load them from somewhere that has them.

  11. #11

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: Missing CURSOR_RESOURCE?

    Quote Originally Posted by fafalone View Post
    The vsplit and hsplit aren't default cursors. If you want them, you'll have to add them to your app yourself or load them from somewhere that has them.
    I found a bunch of vsplit and hsplit cursors in 'MSDN Disk 1' folder 'SAMPLES\VC98\SDK\COM\COM\BTTNCUR\RES'

    In Declaration:
    Code:
    Private Enum EHdrHitTest
        HdrOffColumn = 0&
        HdrHitColumn = 1&
        HdrHitHorzSizer = 2&
        HdrHitVertSizer = 3&
        HdrHitFilter = 4&
        HdrHitCheckboxes = 5&               'Seal.added.ColumnCheckboxes adopted from ColumnFilter
        HdrHitCheckboxes_Buffer = 6&        'Seal.added [ColumnCheckboxes-Buffer] HdrHitHorzSizer
    End Enum

    In vhGrid - clsSkinHeader:
    Code:
    Private Sub CreateCursors()
    
    On Error GoTo Handler
    
        DestroyCursors
        If m_bCustomCursors Then
            '/* why does this work in c++, but not in vb? poor vb6 res implementation..
            'm_lhNormalCursor = LoadCursorEx(App.hInstance, "CURSOR-ARROW")
            Set m_pArrowCursor = LoadResPicture("CURSOR-ARROW", vbResCursor)
            m_lhNormalCursor = m_pArrowCursor.handle
            Set m_pLockedCursor = LoadResPicture("CURSOR-LOCKED", vbResCursor)
            m_lhLockedCursor = m_pLockedCursor.handle
            Set m_pNSSizeCursor = LoadResPicture("CURSOR-SIZENS", vbResCursor)
            m_lhNSSizeCursor = m_pNSSizeCursor.handle
            
            's...Seal.rem m_pWESizeCursor: replaced by "CURSOR_V_SPLIT_XL"......
            'rem.Seal Set m_pWESizeCursor = LoadResPicture("CURSOR-SIZEWE", vbResCursor)
            'rem.Seal m_lhWESizeCursor = m_pWESizeCursor.handle
            'e...Seal.rem m_pWESizeCursor: replaced by "CURSOR_V_SPLIT_XL"......
            
            Set m_pDragCursor = LoadResPicture("CURSOR-DRAG", vbResCursor)
            m_lhDragCursor = m_pDragCursor.handle
    
            's...Seal.added "CURSOR_V_SPLIT_XL"...................................
            Set m_pVSPLITCursor = LoadResPicture("CURSOR_V_SPLIT_XL", vbResCursor)
            m_lhVSPLITCursor = m_pVSPLITCursor.handle
            'e...Seal.added "CURSOR_V_SPLIT_XL"...................................
        Else
            m_lhNormalCursor = LoadCursor(0&, OCR_NORMAL)
            m_lhLockedCursor = LoadCursor(0&, OCR_NO)
            m_lhNSSizeCursor = LoadCursor(0&, OCR_SIZENS)
            'rem.Seal m_lhWESizeCursor = LoadCursor(0&, OCR_SIZEWE)       'rem.Seal m_lhWESizeCursor: replaced by "CURSOR_V_SPLIT_XL"
            
    '#rem.Seal        m_lhVSPLITCursor = LoadCursor(0&, OCR_SIZEWE)       'Seal.added "CURSOR_V_SPLIT_XL"
            's...Seal.added "CURSOR_V_SPLIT_XL"...................................
            Set m_pVSPLITCursor = LoadResPicture("CURSOR_V_SPLIT_XL", vbResCursor)
            m_lhVSPLITCursor = m_pVSPLITCursor.handle
            'e...Seal.added "CURSOR_V_SPLIT_XL"...................................
        End If
    
    On Error GoTo 0
    Exit Sub
    
    Handler:
        m_bCustomCursors = False
    
    End Sub
    In the GXISubclass_WndProc:
    Code:
        Case WM_SETCURSOR
            If LeftKeyState And (m_eHeaderLastHitState = HdrOffColumn) Then
                SetNormalCursor
                bHandled = True
            Else
                Select Case HeaderHitTest
                Case HdrHitVertSizer
                    If m_bHeaderSizable Then
                        'rem.Seal SetNSSizingCursor     'Seal: Replaced with SetHSPLITCursor
                        SetHSPLITCursor     'Seal.added "CURSOR_H_SPLIT_XL"
                    Else
                        SetNormalCursor
                    End If
                Case HdrHitHorzSizer
                    If ColumnLocked(m_lSelectedColumn) Then
    'rem.Seal                    SetLockedCursor
    '............................
                          '          Dim tRect       As RECT         'Seal.added
                          '          Dim tPnt        As POINTAPI     'Seal.added
                          '          Dim lX          As Long         'Seal.added
    
                                    GetCursorPos tPnt
                          '          Dim tLVH        As HD_HITTESTINFO
                            'TODO.Seal adjust mousepointer resizer icon on column header
                                    ScreenToClient m_lHdrHwnd, tPnt
                                    If m_bIsNt Then
                                        SendMessageW m_lHdrHwnd, HDM_GETITEMRECT, m_lSelectedColumn, tRect
                                    Else
                                        SendMessageA m_lHdrHwnd, HDM_GETITEMRECT, m_lSelectedColumn, tRect
                                    End If
                                    With tRect
                                        lX = (.Right - 3)
                                        .left = lX
                                        .Right = (lX + 4)
                                    End With
    
                                    If Not (PtInRect(tRect, tPnt.x, tPnt.y) = 0) Then
                                        SetLockedCursor
                                    Else
                                        SetNormalCursor
                                    End If
    '............................
                    ElseIf m_bHeaderFixedWidth Then
                        SetNormalCursor
                    Else
    'rem.Seal                    SetWESizingCursor  'Seal.rem SetWESizingCursor: replaced by "CURSOR_V_SPLIT_XL"
    '............................
                          '          Dim tRect       As RECT         'Seal.added
                          '          Dim tPnt        As POINTAPI     'Seal.added
                          '          Dim lX          As Long         'Seal.added
    
                                    GetCursorPos tPnt
                          '          Dim tLVH        As HD_HITTESTINFO
                            'TODO.Seal adjust mousepointer resizer icon on column header
                                    ScreenToClient m_lHdrHwnd, tPnt
                                    If m_bIsNt Then
                                        SendMessageW m_lHdrHwnd, HDM_GETITEMRECT, m_lSelectedColumn, tRect
                                    Else
                                        SendMessageA m_lHdrHwnd, HDM_GETITEMRECT, m_lSelectedColumn, tRect
                                    End If
                                    With tRect
                                        lX = (.Right - 3)
                                        .left = lX
                                        .Right = (lX + 4)
                                    End With
    
                                    If Not (PtInRect(tRect, tPnt.x, tPnt.y) = 0) Then
                                        'rem.Seal SetWESizingCursor     'Seal: Replaced with SetVSPLITCursor
                                        SetVSPLITCursor     'Seal.added "CURSOR_V_SPLIT_XL"
                                    Else
                                        SetNormalCursor
                                    End If
    '............................
                    End If
                Case Else
                    SetNormalCursor
                End Select
                bHandled = True
            End If
    ... Somewhere else:
    Code:
    Friend Function HeaderHitTest() As EHdrHitTest
    
    Dim lColumn     As Long
    Dim lHzOffset   As Long
    Dim tPnt        As POINTAPI
    Dim tRect       As RECT
    Dim tRcpy       As RECT
    Dim tRcpyChkBox As RECT         'Seal.added ColumnCheckboxes
    Dim tRBtn       As RECT
    Dim tRBtnChkBox As RECT         'Seal.added ColumnCheckboxes
    Dim tHdHit      As HD_HITTESTINFO
    
        GetCursorPos tPnt
        ScreenToClient m_lHdrHwnd, tPnt
        With tHdHit
            .pt = tPnt
            SendMessageA m_lHdrHwnd, HDM_HITTEST, 0&, tHdHit
            lColumn = .iItem
    
                    's.......Seal.relocated
                    If m_bIsNt Then
                        SendMessageW m_lHdrHwnd, HDM_GETITEMRECT, lColumn, tRect
                    Else
                        SendMessageA m_lHdrHwnd, HDM_GETITEMRECT, lColumn, tRect
                    End If
                    CopyRect tRcpy, tRect
                    'e.......Seal.relocated
     
            If Not (lColumn = -1) Then
                m_lSelectedColumn = lColumn
                Select Case .flags
                Case HHT_ONITEMSTATEICON
    
                    's.......Seal.added: 1st Column - ColumnCheckboxes-Buffer
                    If (lColumn = 0) Then
                        If m_bColumnCheckboxes(lColumn) Then
                            Dim tRBtnChkBox_ONITEMSTATEICON As RECT         'Seal.added ColumnCheckboxes
                            CopyRect tRBtnChkBox_ONITEMSTATEICON, tRect
                            
                            With tRBtnChkBox_ONITEMSTATEICON
                                .Right = .left + 4                                      'Seal.added [ColumnCheckboxes-Buffer] HdrHitHorzSizer
                            End With
                            
                            If Not (PtInRect(tRBtnChkBox_ONITEMSTATEICON, tPnt.x, tPnt.y) = 0) Then
                          '.      Debug.Print "HHT_ONITEMSTATEICON: .x " & tPnt.x & " .y: " & tPnt.y
                                HeaderHitTest = HdrHitColumn
                            ''''    Debug.Print "... HeaderHitTest = HdrHitColumn"
                            End If
                        Else
                         '.   Debug.Print "If (lColumn = 0) Then ... HeaderHitTest = HdrHitColumn"
                            HeaderHitTest = HdrHitColumn
                        End If
                    End If
                Case HHT_NOWHERE
                    HeaderHitTest = HdrOffColumn
                Case HHT_ONDIVIDER, HHT_ONDIVOPEN
                    's.......Seal.added: ColumnCheckboxes-Buffer
                    If Not (lColumn = 0) Then
                        If m_bColumnCheckboxes(lColumn) Then
                            With tRect
                                .left = .Right + 4                                      'Seal.added [ColumnCheckboxes-Buffer] HdrHitHorzSizer
                                .Right = .left + 4                                      'Seal.added [ColumnCheckboxes-Buffer] HdrHitHorzSizer
                            End With
        
                            If Not (PtInRect(tRect, tPnt.x, tPnt.y) = 0) Then
                                HeaderHitTest = HdrHitCheckboxes_Buffer                 'Seal.added [ColumnCheckboxes-Buffer] HdrHitHorzSizer
        'Debug.Print "HdrHitHorzSizer: .x " & tPnt.x & " .y: " & tPnt.y
                            Else
                                HeaderHitTest = HdrHitHorzSizer
                       '.         Debug.Print "HHT_ONDIVIDER, HHT_ONDIVOPEN: Else "
                            End If
                        Else
                            HeaderHitTest = HdrHitHorzSizer
                       '.     Debug.Print "HHT_ONDIVIDER, HHT_ONDIVOPEN: Else (m_bColumnCheckboxes(lColumn)) "
                        End If
                    End If
                    'e.......Seal.added: ColumnCheckboxes-Buffer
                Case HHT_ONHEADER
    'rem.Seal: Relocated                If m_bIsNt Then
    'rem.Seal: Relocated                    SendMessageW m_lHdrHwnd, HDM_GETITEMRECT, lColumn, tRect
    'rem.Seal: Relocated                Else
    'rem.Seal: Relocated                    SendMessageA m_lHdrHwnd, HDM_GETITEMRECT, lColumn, tRect
    'rem.Seal: Relocated                End If
    'rem.Seal: Relocated                CopyRect tRcpy, tRect
                    CopyRect tRcpyChkBox, tRect                                     'Seal.added ColumnCheckboxes
                    With tRect
                        .top = .Bottom - 2 '8                                       'Seal.modified [8 to 2] HdrHitVertSizer
                        .Bottom = .Bottom + 2 '8                                    'Seal.modified [8 to 2] HdrHitVertSizer
                    End With
                    If Not (PtInRect(tRect, tPnt.x, tPnt.y) = 0) Then
                        HeaderHitTest = HdrHitVertSizer
                    Else
                      '  If m_bColumnFilters Then                                    'Seal.added: bug (If m_bColumnFiltered(lColumn) Then)
                      '      If m_bColumnFiltered(lColumn) Then
                      '          lHzOffset = ((tRcpy.Bottom \ 2) - 7)
                      '          With tRBtn
                      '              If (lColumn = m_lColumnSorted) Then
                      '                  .left = tRcpy.left + ((tRcpy.Right - tRcpy.left) - 44)
                      '                  .Right = (tRcpy.Right - 30)
                      '              Else
                      '                  .left = ((tRcpy.left + (tRcpy.Right - tRcpy.left)) - 20)
                      '                  .Right = (tRcpy.Right - 4)
                      '              End If
                      '              .top = lHzOffset
                      '              .Bottom = (lHzOffset + 14)
                      '          End With
                      '          With tPnt
                      '              If Not (PtInRect(tRBtn, .x, .y) = 0) Then
                      '                  HeaderHitTest = HdrHitFilter
                      '              Else
                      '                  HeaderHitTest = HdrHitColumn
                      '              End If
                      '          End With
                      '      End If
    's........Seal.added.ColumnCheckboxes adopted from ColumnFilter
                      '  ElseIf m_bColumnCheckboxes(lColumn) Then
                            If m_bColumnCheckboxes(lColumn) Then
                                lHzOffset = ((tRcpyChkBox.Bottom - tRcpyChkBox.top) - 14) / 2    'Seal.modified (to centre ColumnCheckBox
                                With tRBtnChkBox
                                    If (lColumn = m_lColumnSorted) Then
                                        .left = tRcpyChkBox.left  '+ 1 '(tRcpyChkBox.Right - tRcpyChkBox.left)) - 20)
                                        .Right = tRcpyChkBox.left + 17 '(tRcpyChkBox.Right - 4)
                                    End If
                                    .top = lHzOffset
                                    .Bottom = (lHzOffset + 13)
                                End With
                                With tPnt
                                    If Not (PtInRect(tRBtnChkBox, .x, .y) = 0) Then
                                        HeaderHitTest = HdrHitCheckboxes
    'Debug.Print "HdrHitCheckboxes: .x " & .x & " .y: " & .y
                                    Else
                                        HeaderHitTest = HdrHitColumn
                                    End If
                                End With
                         '.   End If
    'e........Seal.added.ColumnCheckboxes adopted from ColumnFilter
                        Else
                            HeaderHitTest = HdrHitColumn
                        End If
                    End If
                End Select
            Else
                HeaderHitTest = HdrOffColumn
            End If
        End With
    
    End Function
    ...its a mess, but it works

    LucasMKG
    Last edited by LucasMKG; Apr 23rd, 2022 at 12:03 AM.

  12. #12

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: Missing CURSOR_RESOURCE?

    ..just added cursor files to Resource file:
    Name:  RH.jpg
Views: 184
Size:  15.2 KB

    , and I was pleased with the results:
    Name:  vSplit02.png
Views: 183
Size:  27.2 KB

    ..more options
    Name:  vSplit01.png
Views: 183
Size:  37.4 KB

    LucasMKG

    ..attaching images to this forum is now problematic
    The above issue of attaching images to the forum seems to be resolved
    Last edited by LucasMKG; Apr 25th, 2022 at 01:24 AM.

  13. #13

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: Missing CURSOR_RESOURCE?

    The author of vhGrid asked this question:

    Quote Originally Posted by LucasMKG View Post
    ...
    '/* why does this work in c++, but not in vb? poor vb6 res implementation..
    'm_lhNormalCursor = LoadCursorEx(App.hInstance, "CURSOR-ARROW")...
    Is it still the relationship between vb6 and LoadCursorEx?


    LucasMKG
    ?
    Last edited by LucasMKG; Apr 23rd, 2022 at 12:12 AM.

  14. #14
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,651

    Re: [RESOLVED] Missing CURSOR_RESOURCE?

    What is LoadCursorEx? All that comes up is this thread and sketchy Chinese sites that look like they'd kill my computer and pee on it's grave.

  15. #15

    Thread Starter
    Hyperactive Member LucasMKG's Avatar
    Join Date
    Jun 2015
    Location
    South Africa (ZAR)
    Posts
    338

    Re: [RESOLVED] Missing CURSOR_RESOURCE?

    Quote Originally Posted by fafalone View Post
    What is LoadCursorEx? All that comes up is this thread and sketchy Chinese sites that look like they'd kill my computer and pee on it's grave.


    all I could gather from those sites (原文網址:https://kknews.cc/news/3okx8a8.html) is:
    Code:
    LoadCursorEx(){
    hCursorArrow =LoadCursor(NULL, IDC_ARROW);
    hCursorXiGuan = AfxGetApp()->LoadCursor(IDC_XIGUAN);
    hCursorXuanzhuan = AfxGetApp()->LoadCursor(IDC_XUANZHUAN);
    hCursorShensuo = AfxGetApp()->LoadCursor(IDC_SHENSUO);
    hCursorNS = LoadCursor(NULL, IDC_SIZENS);
    hCursorWE = LoadCursor(NULL, IDC_SIZEWE);
    hCursorTuceng = AfxGetApp()->LoadCursor(IDC_TUCENG);
    hCursorMove = AfxGetApp()->LoadCursor(IDC_MOVE);
    //LoadCursor(NULL, IDC_CROSS);//
    }
    but, at the end of the day it seems like 'LoadCursor' is used.

    LucasMKG
    ..happy with progress
    Last edited by LucasMKG; Apr 25th, 2022 at 01:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width