Hi!

Have a few problems here maybe someone can figure out. I am learning Direct Draw. I have a basic application going that changes the mode to 800x600x16bit, that works fine, I can load bitmaps into surfaces fine, but what I need/want to do is load in a bitmap and cut it up on the fly.

Currently I have all my buttons in one bitmap file (each one is 30x20 seperated by 1px). I want to pull out the button at 0,0 and put it into a surface DDButton1, then the one at 31,0 and put it into DDButton2. I have tried Set DDButton1.GetSurfaceFromDC(thehdc) and get an error Automation Error -200532417 (887600ff).

How can I do this correctly?

I know I am getting a good hdc with the bitmap because if I bitblt it to the forms hdc it shows up.

My other problem is setting up hotspots on the screen so if the if the mouse goes over somthing it catches it.

Currently I have in the Form_MouseMove this code

If X > 100 and X < 200 and Y > 100 and Y < 200 then
'do the code here
ElseIf.......etc

My concern is there are so many mouse move events triggered that every time you go through this sub it will slow the program down. (I have a good amount of hotspots)

Is there a better way to do this?

Any help is appreciated