PDA

Click to See Complete Forum and Search --> : General BitBlt Knowledge


Sastraxi
Jan 28th, 2001, 08:35 AM
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!


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)

Jan 28th, 2001, 12:02 PM
I don't really understnad your question...

/\/\isanThr0p
Jan 29th, 2001, 09:36 AM
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.

Sastraxi
Jan 29th, 2001, 07:00 PM
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? :)

/\/\isanThr0p
Jan 29th, 2001, 08:27 PM
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.

Sastraxi
Jan 31st, 2001, 07:28 PM
No prob.

Feb 1st, 2001, 02:19 PM
Originally posted by YoungBuck
WEBSITE HAS BITBLT TUTORIALS COME TO MY WEBSITE COME TO MY WEBSITE!!!!!!!!!1

lol :)

Sastraxi
Feb 1st, 2001, 08:33 PM
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/

sastraxitech@programmer.net

YoungBuck
Feb 1st, 2001, 10:38 PM
Originally posted by Sastraxi

Don't use bitblt, use DirectDraw!



Use DirectDraw for games, BitBlt is sufficient for other graphical purposes.

plenderj
Feb 2nd, 2001, 09:13 AM
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

Mad Compie
Feb 2nd, 2001, 01:32 PM
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?

Feb 2nd, 2001, 01:58 PM
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).

kedaman
Feb 2nd, 2001, 05:47 PM
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.

parksie
Feb 2nd, 2001, 06:13 PM
It's like the Kai programs...I had a hell of a time using those :eek: