Description window position…...

so i got problem

i hover my item and description  windows shows all the way up same for spell description….

blt itemdesc and blt spell decs idk if it helps but i tryed to copy same code from my older version of engines and it dont help

Public Sub BltItemDesc(ByVal ItemNum As Long)
Dim rec As RECT, rec_pos As RECT
Dim itempic As Long

' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler

frmMain.picItemDescPic.Cls

If ItemNum > 0 And ItemNum <= MAX_ITEMS Then
itempic = Item(ItemNum).Pic

If itempic = 0 Then Exit Sub

' Load item if not loaded, and reset timer
ItemTimer(itempic) = GetTickCount + SurfaceTimerMax

If DDS_Item(itempic) Is Nothing Then
Call InitDDSurf("Items\" & itempic, DDSD_Item(itempic), DDS_Item(itempic))
End If

With rec
.top = 0
.Bottom = .top + PIC_Y
.Left = DDSD_Item(itempic).lWidth / 2
.Right = .Left + PIC_X
End With

With rec_pos
.top = 0
.Bottom = 64
.Left = 0
.Right = 64
End With
Engine_BltToDC DDS_Item(itempic), rec, rec_pos, frmMain.picItemDescPic, False
End If

' Error handler
Exit Sub
errorhandler:
HandleError "BltItemDesc", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

Public Sub BltSpellDesc(ByVal spellnum As Long)
Dim rec As RECT, rec_pos As RECT
Dim spellpic As Long

' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler

frmMain.picSpellDescPic.Cls

If spellnum > 0 And spellnum <= MAX_SPELLS Then
spellpic = Spell(spellnum).Icon

If spellpic <= 0 Or spellpic > NumSpellIcons Then Exit Sub

' Load item if not loaded, and reset timer
SpellIconTimer(spellpic) = GetTickCount + SurfaceTimerMax

If DDS_SpellIcon(spellpic) Is Nothing Then
Call InitDDSurf("SpellIcons\" & spellpic, DDSD_SpellIcon(spellpic), DDS_SpellIcon(spellpic))
End If

With rec
.top = 0
.Bottom = .top + PIC_Y
.Left = 0
.Right = .Left + PIC_X
End With

With rec_pos
.top = 0
.Bottom = 64
.Left = 0
.Right = 64
End With
Engine_BltToDC DDS_SpellIcon(spellpic), rec, rec_pos, frmMain.picSpellDescPic, False
End If

' Error handler
Exit Sub
errorhandler:
HandleError "BltSpellDesc", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

anyone have idea how to fix this?

Some one had fixed this already here:  http://www.eclipseorigins.com/community/index.php?/topic/135006

so i got problem

i hover my item and description  windows shows all the way up same for spell description….

blt itemdesc and blt spell decs idk if it helps but i tryed to copy same code from my older version of engines and it dont help

Public Sub BltItemDesc(ByVal ItemNum As Long)
Dim rec As RECT, rec_pos As RECT
Dim itempic As Long

' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler

frmMain.picItemDescPic.Cls

If ItemNum > 0 And ItemNum <= MAX_ITEMS Then
itempic = Item(ItemNum).Pic

If itempic = 0 Then Exit Sub

' Load item if not loaded, and reset timer
ItemTimer(itempic) = GetTickCount + SurfaceTimerMax

If DDS_Item(itempic) Is Nothing Then
Call InitDDSurf("Items\" & itempic, DDSD_Item(itempic), DDS_Item(itempic))
End If

With rec
.top = 0
.Bottom = .top + PIC_Y
.Left = DDSD_Item(itempic).lWidth / 2
.Right = .Left + PIC_X
End With

With rec_pos
.top = 0
.Bottom = 64
.Left = 0
.Right = 64
End With
Engine_BltToDC DDS_Item(itempic), rec, rec_pos, frmMain.picItemDescPic, False
End If

' Error handler
Exit Sub
errorhandler:
HandleError "BltItemDesc", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

Public Sub BltSpellDesc(ByVal spellnum As Long)
Dim rec As RECT, rec_pos As RECT
Dim spellpic As Long

' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler

frmMain.picSpellDescPic.Cls

If spellnum > 0 And spellnum <= MAX_SPELLS Then
spellpic = Spell(spellnum).Icon

If spellpic <= 0 Or spellpic > NumSpellIcons Then Exit Sub

' Load item if not loaded, and reset timer
SpellIconTimer(spellpic) = GetTickCount + SurfaceTimerMax

If DDS_SpellIcon(spellpic) Is Nothing Then
Call InitDDSurf("SpellIcons\" & spellpic, DDSD_SpellIcon(spellpic), DDS_SpellIcon(spellpic))
End If

With rec
.top = 0
.Bottom = .top + PIC_Y
.Left = 0
.Right = .Left + PIC_X
End With

With rec_pos
.top = 0
.Bottom = 64
.Left = 0
.Right = 64
End With
Engine_BltToDC DDS_SpellIcon(spellpic), rec, rec_pos, frmMain.picSpellDescPic, False
End If

' Error handler
Exit Sub
errorhandler:
HandleError "BltSpellDesc", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

anyone have idea how to fix this?

Just for the sake of putting it here… its been a while since ive dealt with VB6 especially DX7 xD But im going to guess try replacing this:

With rec_pos
.top = 0
.Bottom = 64
.Left = 0
.Right = 64
End With

with this

With rec_pos
.top = 0
.Bottom = .top + PIC_Y
.Left = 0
.Right = 64
End With

nop that wont work

well i think problem is not in bltitem desc it is somewhere else but idk where 😕

I don’t exactly get what’s the problem?

Log in to reply