Results 1 to 14 of 14

Thread: General BitBlt Knowledge

  1. #1

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Arrow

    If you are using BitBlt, come to this page.
    This is where you will find the Knowledge of BitBlt.
    Gurus and good BitBltters are welcome to share their
    knowledge.

    Knowledge from Me:
    Basic Blitting!

    Code:
    Option Explicit
    
    Public Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
    
    Public Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    
    Function RectBlit(Dest as PictureBox, X as Integer, Y as integer, Source as Picturebox) as Long
    Dim RetCode
    Dim HoldScale1, HoldScale2
    
       HoldScale1=Dest.Scalemode
       Dest.Scalemode=3
    
       HoldScale2=Source.Scalemode
       Source.Scalemode=3
    
       RectBlit = 0 'for now, we will assume it failed
       
       RetCode = BitBlt(dest.hdc,x,y,source.scalewidth,source.scaleheight,source.hdc,0,0,SrcCopy)
       
       Dest.ScaleMode=HoldScale1
       Source.ScaleMode=HoldScale2
    
       RectBlit=RetCode
    End Function
    
    'usage:
    
    RC=RectBlit(picture2,0,0,picture1)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  2. #2
    Guest
    I don't really understnad your question...

  3. #3
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Hm When I look through the code, I really can't see why I should use this function. I have all those lines executet, just because I can't write picturebox.hwnd but I write picturebox??
    And what if I want to blt from one rect from the source picbox, instead of the whole thing??
    So I am not really sure, if that is a good function.
    Sanity is a full time job

    Puh das war harter Stoff!

  4. #4

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I know that it isn't useful for that, I was just saying that its a function if you have one pic you want to cover with another. Simple. The Basics. Notice how I say BASIC blitting? hmm? HMM?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Oh well I really didn't want to offend you, but you know here in this forum I basically, expect questions or some a little more special stuff

    If you felt offended, I am sorry.
    Sanity is a full time job

    Puh das war harter Stoff!

  6. #6

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Talking

    No prob.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7
    Guest
    Originally posted by YoungBuck
    WEBSITE HAS BITBLT TUTORIALS COME TO MY WEBSITE COME TO MY WEBSITE!!!!!!!!!1
    lol

  8. #8

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    And now, the most special note to new BitBlitters:

    Don't use bitblt, use DirectDraw!

    http://www.cason.addr.com/
    http://www.ur.co.nz/

    [email protected]
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  9. #9
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Originally posted by Sastraxi

    Don't use bitblt, use DirectDraw!
    Use DirectDraw for games, BitBlt is sufficient for other graphical purposes.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  10. #10
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well if you think about it, one could actually program an entire 3D game just using bitblt.

    Just look at duke nukem

    Stretching the term 3D I know but anyway ...

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  11. #11
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    Damn! You all want to program games with DirectX. Why won't people program a serious GUI app instead of a classic boring and sttttt..tttupid looking applications with a lot of textboxes and grids.
    I'm a GUI lover, any one else?

  12. #12
    Guest
    Because those "boring GUI's" are the ones that most Windows users are familiar with. Image what it would be like if each program had a different GUI. (It would especially affect those who are learning computers).

  13. #13
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I think i'm on meg's side, if you have a skin for each app, then it would look terrible,
    There's progs like windowblinds that skins the whole environment, and it would look better if the theme matched, instead of having some other apps that have their own skins.
    I'm thinking about the DFX plugin for winamp for instance, you can't even change the skin.
    Now there's people who don't want skinned apps at all and those who really don't want to waste their resources on skinned apps.
    I'm probably one of them, but i still like a colorful theme, and you could get a reasonable compromise because of the very large selection of apps for this purpose.

    I still think apps should be kept as simple and purposeful as possible, i'm using ICQ, and i'm stuck with it.
    It consumes like 40M ram and 10% resources and startup tales 10 seconds. How great is that? I use a tenth of all the features it has.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It's like the Kai programs...I had a hell of a time using those
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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