PDA

View Full Version : Drawing pixels in a window in Windows


chroot
Dec9-04, 04:24 PM
I need to implement a sort of "framebuffer in a window" for a digital video application I'm working on. I need the window to be displayed alongside other windows (running Windows XP) and get along nicely with other windows on the desktop. The window will display the pixel data in an arbitrary framebuffer. I need the solution to be as efficient as possible, as I'm hoping to display full-motion color standard-resolution TV.

I roughly know the terms "device context" and "overlay," but I'm not sure how to proceed, or even if I'm supposed to be using overlays, or DirectX, or what. MSDN.com provides inspiring glimpses, but I largely cannot make heads or tails of what to do. I know it can be done, because, well, lots of applications do it.

- Warren

wave
Dec10-04, 02:39 AM
I need the window to be displayed alongside other windows (running Windows XP) and get along nicely with other windows on the desktop.

Create a Win32 or MFC application and the framework will take care of that for you.

I roughly know the terms "device context" and "overlay," but I'm not sure how to proceed, or even if I'm supposed to be using overlays, or DirectX, or what.

Have you considered integrating Windows Media Player into your application? That is the easiest way to accomplish what you want. Otherwise you'll have to write it from scratch and deal with DirectX, OpenGL or some video library.

chroot
Dec10-04, 04:38 PM
Wave,

Sorry, but both of those suggestions are very poor, as they do not even approach the efficiency I need. (Think high-end video game efficiency.)

I discovered that the correct way to go about doing this is to use DIB (device independent bitmaps) and blit the bitmaps to the primary surface.

- Warren

wave
Dec10-04, 10:16 PM
Wave,

Sorry, but both of those suggestions are very poor, as they do not even approach the efficiency I need. (Think high-end video game efficiency.)

I discovered that the correct way to go about doing this is to use DIB (device independent bitmaps) and blit the bitmaps to the primary surface.

- Warren

I thought you wanted digital video playback. Consider DDB if efficiency is what you're looking for.