|
-
Dec 13th, 2002, 04:52 PM
#1
Thread Starter
Hyperactive Member
createing surface from picturebox
is it possible to create a surface from a picture box useing directdraw 7
thanx
-
Dec 13th, 2002, 08:20 PM
#2
You couls always save it to the disk, and then make a surface...
BTW why do you want to do that????
-
Dec 13th, 2002, 08:44 PM
#3
Addicted Member
What do you mean by "create a surface from a PictureBox"? If you want to blt the contents of a PictureBox to a surface, create the surface, call the GetDC method of it, then use BitBlt to blit the contents to the surface. If that's not what you mean, provide more explanation on what you want to do.
-
Dec 13th, 2002, 10:32 PM
#4
Thread Starter
Hyperactive Member
ok first off what marchaira said sounds like it would work but im not fimilar with the getdc method but what im guessing is i just say GetDC(surfacename) and that gives me the hdc of the surface please correct me if im wrong.
now to answer noteme i dont save it to a file and then load because that takes longer (i think?) once again i might be wrong api calls are know for their slowness.
and notmes secound question:
im working on a game to be like midtownmadness drive car throuhg city but 2d so i have the car wich i will rotate useing some code i got, and now that i think of it will copy after rortaed directly into the surface area so your right that is a good questoin why am i useing a piturebox?
that makes the question above change from can i use the GetDC(picture name) to get the pic hdc.
also why is it getdc not hdc whats the differentce and what so they both stand for?
thanx
-
Dec 13th, 2002, 10:35 PM
#5
Thread Starter
Hyperactive Member
one more question does ne one know how much memory the driectdrawsurface takes up
-
Dec 14th, 2002, 07:30 AM
#6
I still can't see why you want to have your picture in a picture box before you want to load it to your surface. Why not just use a .bmp file or something and then load the surface from there....and BTW if you are concerned about memory use, I think your way of doing it with the picture box will take up more memory then just loading it from the file...
-
Dec 14th, 2002, 08:58 AM
#7
Thread Starter
Hyperactive Member
yes i decide not to use the picture box any more
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|