The MASM Forum

General => The Campus => Topic started by: alex-rudenkiy on July 17, 2016, 07:33:16 AM

Title: Video buffer in Windows XP+
Post by: alex-rudenkiy on July 17, 2016, 07:33:16 AM
Hello. Please tell me whether my masm refer to a line in the output video buffer to paint like a pair of blue pixels possible? Provided that the program runs on windows xp and above. In dos you can do all this reading about 13h and 10h interrupt, but it's all repeat runs on dos and above. In principle, under the dos could do it all by reading about 13h and 10h interrupt, but it's all repeat runs on dos and above :(
Title: Re: Video buffer in Windows XP+
Post by: jj2007 on July 17, 2016, 09:56:13 AM
SetPixel for single pixels, SetDIBits if speed is important.
Title: Re: Video buffer in Windows XP+
Post by: alex-rudenkiy on July 17, 2016, 06:25:56 PM
How to paint a pixel on top of everything? :)
Title: Re: Video buffer in Windows XP+
Post by: jj2007 on July 17, 2016, 08:05:29 PM
Post your complete source, then we'll may be able to help you.
Title: Re: Video buffer in Windows XP+
Post by: alex-rudenkiy on July 17, 2016, 09:03:31 PM
Source is not present at me, I'm just interested in theory :biggrin:
Title: Re: Video buffer in Windows XP+
Post by: Siekmanski on July 17, 2016, 09:49:03 PM
It depends on what you want to do with graphics.
You can use SetPixel and SetDIBits for simple windows drawing as jj2007 wrote.

If you want realy high performance graphics you're better off with for example Direct3D.
Direct3D can also do fast 2D drawing and works on WindowsXP and up. ( accessing the video buffer directly )
Title: Re: Video buffer in Windows XP+
Post by: alex-rudenkiy on July 19, 2016, 07:39:38 AM
Well, I wonder whether it is possible to put a hook to send pictures from windows on the graphics card or the fact that the image displays on your computer and prepared windows paint a couple of pixels on top of EVERYTHING.
Title: Re: Video buffer in Windows XP+
Post by: Siekmanski on July 19, 2016, 09:31:37 AM
GetDesktopWindow retrieves a handle to the desktop window.