is it possible to create a surface from a picture box useing directdraw 7
thanx
Printable View
is it possible to create a surface from a picture box useing directdraw 7
thanx
You couls always save it to the disk, and then make a surface...:D
BTW why do you want to do that????
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.
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
one more question does ne one know how much memory the driectdrawsurface takes up
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...
yes i decide not to use the picture box any more