Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

fedaYkin99

windows/graphicstorage/visual c++

This topic is 5707 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, my name is Tobias and i live in Austria... i and two of my classmates are working @ a very complicated diploma for our school-leaving examination. it will cost too much time if i explain the whole work now but i will tell you the thing in broad outline. our goal is to make computergraphics visible for blind people. there are three parts: the software, the hardware and the interface between this two. I have to do the softwarepart. I work with microsoft visual c++ (and i`m not very familiar with this language). i have to write a programm wich can read the windows graphic storage arround the mouse in a 7x7 pixel big field. or if the resolution is higher, die field has to be bigger. that means if the mouse is above a black straight vertical line wich is one pixel broad on a white background, the middle line are ones, and the others 0`s... look like --> 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 in the outputfile. darker colours are a 1, lighter colours a 0. my question is how can i get access to the windows graphic storage with visual c++ and save it in a file?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
GetDIBits is the api call you''re looking for.

to create the bitmap that GetDIBits drives off of, just CreateBitmap a 24bpp bitmap of the size you need, SelectObject that into a memory DC that you created via CreateCompatibleDC, and then BitBlit the window''s DC into the memory DC.

then use GetDIBits to gain access to the color data. i said 24bpp bitmap since they''re easy to deal with, having one pixel per memory DWORD. you could use other formats, such as monochrome, which i believe will give you one pixel per memory bit.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
btw, just in case you don''t know, this type of device has already been created.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!