-
Mar 16th, 2022, 01:58 AM
#1
Thread Starter
Hyperactive Member
Last edited by LucasMKG; Apr 25th, 2022 at 01:37 AM.
-
Mar 16th, 2022, 03:22 AM
#2
Re: Missing CURSOR_RESOURCE?
Where did you get those resources? And what are bolded threads?
-
Mar 16th, 2022, 03:40 AM
#3
Thread Starter
Hyperactive Member
Re: Missing CURSOR_RESOURCE?
Swinkels,
Originally Posted by Peter Swinkels
Where did you get those resources?...
from vhGrid...clsSkinHeader
Originally Posted by Peter Swinkels
...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.
-
Mar 16th, 2022, 03:45 AM
#4
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.
-
Mar 16th, 2022, 03:51 AM
#5
Thread Starter
Hyperactive Member
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.
-
Mar 16th, 2022, 04:10 AM
#6
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.
-
Mar 16th, 2022, 04:34 AM
#7
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.
-
Mar 16th, 2022, 04:44 AM
#8
Thread Starter
Hyperactive Member
Re: Missing CURSOR_RESOURCE?
Originally Posted by Peter Swinkels
I am glad you understand. I am afraid your question is about something I can't readily help you with. Sorry.
no worries
LucasMKG
.
-
Mar 16th, 2022, 04:46 AM
#9
Thread Starter
Hyperactive Member
Re: Missing CURSOR_RESOURCE?
Arnoutdv,
Originally Posted by Arnoutdv
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
-
Mar 18th, 2022, 08:19 PM
#10
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.
-
Apr 22nd, 2022, 12:46 PM
#11
Thread Starter
Hyperactive Member
Re: Missing CURSOR_RESOURCE?
Originally Posted by fafalone
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.
-
Apr 22nd, 2022, 02:56 PM
#12
Thread Starter
Hyperactive Member
-
Apr 23rd, 2022, 12:09 AM
#13
Thread Starter
Hyperactive Member
Re: Missing CURSOR_RESOURCE?
The author of vhGrid asked this question:
Originally Posted by LucasMKG
...
'/* 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.
-
Apr 23rd, 2022, 02:06 PM
#14
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.
-
Apr 25th, 2022, 12:56 AM
#15
Thread Starter
Hyperactive Member
Re: [RESOLVED] Missing CURSOR_RESOURCE?
Originally Posted by fafalone
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|