Mirage Engine
RTE 91 In BltToDc - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: RTE 91 In BltToDc (/showthread.php?tid=1938)



RTE 91 In BltToDc - jsventor - 20-07-2008

Ok, so I have a set of codes that displays a picture based on the characters class in a picturebox on frmMirage, and here is the code.

Code:
Call BltClassPic(Class(Int(Parse(10))).Pic, frmMirage.picClass)

And the BltClass Sub
Code:
Sub BltClassPic(ByVal PicNum As Long, PictureBox As PictureBox)
    With rec
        .top = PicNum * CLASS_PIC_Y
        .Bottom = .top + CLASS_PIC_Y
        .Left = 0
        .Right = .Left + CLASS_PIC_X
    End With
  
    With rec_pos
        .top = 0
        .Bottom = CLASS_PIC_Y
        .Left = 0
        .Right = CLASS_PIC_X
    End With

    DD_ClassSurf.BltToDC PictureBox.hDC, rec, rec_pos
    PictureBox.Refresh
End Sub

I get the RTE 91 on;
DD_ClassSurf.BltToDC PictureBox.hDC, rec, rec_pos

NOTE: I also tried "val(Parse(10))" nothing :/


Re: RTE 91 In BltToDc - GIAKEN - 20-07-2008

Make sure you're loading DX before you start using it.